Skip to content

Commit cdce57c

Browse files
committed
Stabilize frontend smoke test
1 parent 01d9e23 commit cdce57c

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

frontend/e2e/smoke.spec.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,41 @@ import { expect, test } from '@playwright/test';
22

33
test.describe('frontend smoke', () => {
44
test('loads create flow and inline access-token gate', async ({ page }) => {
5+
await page.route('**/api/v1', async (route) => {
6+
await route.fulfill({
7+
status: 200,
8+
contentType: 'application/json',
9+
body: JSON.stringify({
10+
success: true,
11+
data: {
12+
instance: {
13+
feed_creation: {
14+
enabled: true,
15+
access_token_required: true,
16+
},
17+
featured_feeds: [],
18+
},
19+
},
20+
}),
21+
});
22+
});
23+
24+
await page.route('**/api/v1/strategies', async (route) => {
25+
await route.fulfill({
26+
status: 200,
27+
contentType: 'application/json',
28+
body: JSON.stringify({
29+
success: true,
30+
data: {
31+
strategies: [
32+
{ id: 'faraday', name: 'Faraday' },
33+
{ id: 'browserless', name: 'Browserless' },
34+
],
35+
},
36+
}),
37+
});
38+
});
39+
540
await page.goto('/');
641

742
await expect(page.getByLabel('PAGE URL')).toBeVisible();

0 commit comments

Comments
 (0)