(e2e) update access denied tests for new 401 and 403 copy

Align e2e assertions with redesigned access denied pages.
This commit is contained in:
Cyril
2026-07-17 14:36:11 +02:00
parent 757319aa14
commit 4d66e7d4e7
4 changed files with 13 additions and 10 deletions
+1
View File
@@ -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,
});