You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ghost/apps/admin-x-settings/test/acceptance/routing.test.ts

24 lines
767 B

import {expect, test} from '@playwright/test';
import {globalDataRequests, mockApi} from '@tryghost/admin-x-framework/test/acceptance';
test.describe('Routing', async () => {
test('Reopens the opened modal when refreshing the page', async ({page}) => {
await mockApi({page, requests: globalDataRequests});
await page.goto('/');
const section = page.getByTestId('portal');
await section.getByRole('button', {name: 'Customize'}).click();
await page.waitForSelector('[data-testid="portal-modal"]');
expect(page.url()).toMatch(/\/portal\/edit$/);
await page.reload();
await page.waitForSelector('[data-testid="portal-modal"]');
expect(page.url()).toMatch(/\/portal\/edit$/);
});
});