strapi/e2e/tests/admin/logout.spec.js
Josh b9aef55175
fix(cm): create entries (#19254)
* test(e2e): add better e2e tests for EditView CM

* fix(cm): handle that the `id` might be `create`

* docs: update e2e content-type docs
2024-01-18 10:22:06 +00:00

20 lines
681 B
JavaScript

import { test, expect } from '@playwright/test';
// eslint-disable-next-line import/extensions
import { resetDatabaseAndImportDataFromPath } from '../../scripts/dts-import';
import { login } from '../../utils/login';
test.describe('Log Out', () => {
test.beforeEach(async ({ page }) => {
await resetDatabaseAndImportDataFromPath('./e2e/data/with-admin.tar');
await page.goto('/admin');
await login({ page });
});
test('a user should be able to logout', async ({ page }) => {
await page.getByText('test testing').click();
await page.getByText('Logout').click();
await expect(page.getByText('Log in to your Strapi account')).toBeVisible();
});
});