mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-13 21:27:53 +02:00
✅(e2e) update access denied tests for new 401 and 403 copy
Align e2e assertions with redesigned access denied pages.
This commit is contained in:
@@ -9,6 +9,7 @@ and this project adheres to
|
||||
### Added
|
||||
|
||||
- ♿️(frontend) restore skip to content link after header redesign #2510
|
||||
- 💄(frontend) redesign error pages with Figma layout #2528
|
||||
|
||||
## [v5.4.1] - 2026-07-09
|
||||
|
||||
|
||||
@@ -141,15 +141,17 @@ test.describe('Doc Routing', () => {
|
||||
|
||||
await responsePromise;
|
||||
|
||||
await expect(page.getByText('Log in to access the document.')).toBeVisible({
|
||||
timeout: 10000,
|
||||
});
|
||||
await expect(page.getByText('Sign in to access the document.')).toBeVisible(
|
||||
{
|
||||
timeout: 10000,
|
||||
},
|
||||
);
|
||||
|
||||
await expect(page.locator('meta[name="robots"]')).toHaveAttribute(
|
||||
'content',
|
||||
'noindex',
|
||||
);
|
||||
await expect(page).toHaveTitle(/401 Unauthorized - Docs/);
|
||||
await expect(page).toHaveTitle(/Access denied - Docs/);
|
||||
});
|
||||
|
||||
test('checks redirect if unsync version', async ({ page }) => {
|
||||
@@ -202,7 +204,7 @@ test.describe('Doc Routing: Not logged', () => {
|
||||
await expect(
|
||||
page2
|
||||
.getByRole('main', { name: 'Main content' })
|
||||
.getByRole('button', { name: 'Login' }),
|
||||
.getByRole('button', { name: 'Sign in' }),
|
||||
).toBeVisible({
|
||||
timeout: 10000,
|
||||
});
|
||||
@@ -212,7 +214,7 @@ test.describe('Doc Routing: Not logged', () => {
|
||||
await expect(
|
||||
page
|
||||
.getByRole('main', { name: 'Main content' })
|
||||
.getByRole('button', { name: 'Login' }),
|
||||
.getByRole('button', { name: 'Sign in' }),
|
||||
).toBeVisible({
|
||||
timeout: 10000,
|
||||
});
|
||||
@@ -220,7 +222,7 @@ test.describe('Doc Routing: Not logged', () => {
|
||||
// Reconnected
|
||||
await page
|
||||
.getByRole('main', { name: 'Main content' })
|
||||
.getByRole('button', { name: 'Login' })
|
||||
.getByRole('button', { name: 'Sign in' })
|
||||
.click();
|
||||
await SignIn(page, browserName, false);
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ test.describe('Doc Visibility: Restricted', () => {
|
||||
await page.goto(urlDoc);
|
||||
|
||||
await expect(
|
||||
page.getByText('Log in to access the document.'),
|
||||
page.getByText('Sign in to access the document.'),
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
@@ -354,7 +354,7 @@ test.describe('Doc Visibility: Authenticated', () => {
|
||||
await expect(otherPage.locator('h2').getByText(docTitle)).toBeHidden();
|
||||
|
||||
await expect(
|
||||
otherPage.getByText('Log in to access the document.'),
|
||||
otherPage.getByText('Sign in to access the document.'),
|
||||
).toBeVisible();
|
||||
|
||||
await cleanup();
|
||||
|
||||
@@ -129,7 +129,7 @@ export const connectOtherUserToDoc = async ({
|
||||
if (!withoutSignIn) {
|
||||
const loginFromApp = otherPage
|
||||
.getByRole('main', { name: 'Main content' })
|
||||
.getByLabel('Login');
|
||||
.getByLabel('Sign in');
|
||||
const loginFromHome = otherPage.getByRole('button', {
|
||||
name: process.env.SIGN_IN_EL_TRIGGER,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user