Files
crank/apps/ui/tests/e2e/wizard.spec.js
T
github-ops 338bb4d74a
Deploy / deploy (push) Successful in 37s
CI / Rust Checks (push) Successful in 5m33s
CI / UI Checks (push) Successful in 5s
CI / Deployment Manifests (push) Successful in 3s
CI / Frontend E2E (push) Successful in 4m24s
chore: publish clean community baseline
2026-06-17 07:29:50 +00:00

35 lines
1.9 KiB
JavaScript

const { test, expect } = require('@playwright/test');
const { login, localized } = require('./helpers');
test('wizard loads and protocol selection updates flow', async ({ page }) => {
await login(page);
await page.goto('/wizard/');
await expect(page.locator('[data-step-counter]').first()).toContainText(localized('Step', 'Шаг'));
await expect(page.locator('#step-panel-1 .step-panel-title')).toContainText(localized('Choose a protocol', 'Выберите протокол'));
await page.locator('[data-testid="wizard-protocol-rest"]').click();
await page.locator('#btn-continue').click();
await expect(page.locator('#step-panel-2 .step-panel-title')).toContainText(localized('Select upstream', 'Выберите upstream'));
});
test('community wizard hides premium protocols and explains edition scope', async ({ page }) => {
await login(page);
await page.goto('/wizard/');
await expect(page.locator('[data-testid="wizard-protocol-rest"]')).toBeVisible();
await expect(page.locator('[data-testid="wizard-protocol-graphql"]')).toBeHidden();
await expect(page.locator('[data-testid="wizard-protocol-grpc"]')).toBeHidden();
await expect(page.locator('[data-testid="wizard-protocol-websocket"]')).toBeHidden();
await expect(page.locator('[data-testid="wizard-protocol-soap"]')).toBeHidden();
await expect(page.locator('#wizard-edition-protocol-note')).toContainText(
localized('Commercial editions unlock', 'коммерческих редакциях')
);
await page.locator('[data-testid="wizard-protocol-rest"]').click();
await page.locator('#btn-continue').click();
await page.locator('#btn-continue').click();
await page.locator('#btn-continue').click();
await page.locator('#btn-continue').click();
await expect(page.locator('#wizard-streaming-config-card')).toBeHidden();
await expect(page.locator('#wizard-streaming-capability-note')).toHaveCount(0);
});