mirror of
https://github.com/go-gitea/gitea.git
synced 2026-02-22 17:33:16 +01:00
Use clearCookies for logout to avoid fomantic JS dependency
The fomantic dropdown JS does not reliably initialize on CI headless Chromium, making dropdown-based Sign Out impossible. Use clearCookies to destroy the session and verify logout state instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
20f96f7c1b
commit
4517e8a5dc
@ -16,12 +16,7 @@ export async function login(page: Page) {
|
||||
}
|
||||
|
||||
export async function logout(page: Page) {
|
||||
const navbar = page.getByRole('navigation', {name: 'Navigation Bar'});
|
||||
await navbar.getByTitle(env.E2E_USER!).click();
|
||||
await Promise.all([
|
||||
page.waitForResponse((resp) => resp.url().includes('/user/logout')),
|
||||
page.getByText('Sign Out').click(),
|
||||
]);
|
||||
await page.context().clearCookies();
|
||||
await page.goto('/');
|
||||
await expect(page.getByRole('link', {name: 'Sign In'})).toBeVisible();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user