Fix community wizard e2e navigation
This commit is contained in:
@@ -46,11 +46,41 @@ test('community wizard hides premium protocols and explains edition scope', asyn
|
||||
|
||||
test('REST method callout clears when switching to methods without request body', async ({ page }) => {
|
||||
await login(page);
|
||||
const workspace = await getCurrentWorkspace(page);
|
||||
|
||||
await page.route(
|
||||
`/api/admin/workspaces/${encodeURIComponent(workspace.id)}/upstreams`,
|
||||
async (route) => {
|
||||
await route.fulfill({
|
||||
contentType: 'application/json',
|
||||
body: JSON.stringify({
|
||||
items: [
|
||||
{
|
||||
id: 'upstream_e2e_rest_methods',
|
||||
workspace_id: workspace.id,
|
||||
name: 'E2E REST target',
|
||||
base_url: 'https://api.example.test',
|
||||
static_headers: {},
|
||||
auth_profile_id: null,
|
||||
created_at: '2026-06-19T00:00:00Z',
|
||||
updated_at: '2026-06-19T00:00:00Z',
|
||||
},
|
||||
],
|
||||
}),
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
await page.goto('/wizard/');
|
||||
await expect(page.locator('[data-step-counter]').first()).toContainText(localized('Step', 'Шаг'));
|
||||
|
||||
await page.locator('[data-testid="wizard-protocol-rest"]').click();
|
||||
await page.locator('#btn-continue').click();
|
||||
await expect(page.locator('#step-panel-2')).toBeVisible();
|
||||
await page.locator('#upstream-combobox-trigger').click();
|
||||
await page.getByText('E2E REST target').click();
|
||||
await page.locator('#btn-continue').click();
|
||||
await expect(page.locator('#step-panel-3-rest')).toBeVisible();
|
||||
|
||||
const callout = page.locator('#method-callout-rest');
|
||||
await page.locator('.method-card[data-method="POST"]').click();
|
||||
|
||||
Reference in New Issue
Block a user