Ghost/apps/admin-x-demo/test/acceptance/example.test.ts
Jono M a8083960d8
Added test examples to AdminX demo (#19116)
refs https://github.com/TryGhost/Product/issues/4182

Updated framework to include shared test config for easier app setup.
2023-11-23 12:59:48 +00:00

19 lines
574 B
TypeScript

import {expect, test} from '@playwright/test';
import {mockApi, responseFixtures} from '@tryghost/admin-x-framework/test/acceptance';
test.describe('Demo', async () => {
test('Renders the list page', async ({page}) => {
await mockApi({page, requests: {
browseSettings: {
method: 'GET',
path: /^\/settings\/\?group=/,
response: responseFixtures.settings
}
}});
await page.goto('/');
await expect(page.locator('body')).toContainText('AdminX Demo App');
});
});