mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-24 04:02:38 +02:00
Wait for logout response before verifying sign-out
The link-action handler does an async fetch POST then a form-based redirect chain which can be slow on CI. Wait for the /user/logout response to confirm session destruction, then navigate to verify. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5354352bee
commit
20f96f7c1b
@ -17,6 +17,11 @@ export async function login(page: Page) {
|
||||
|
||||
export async function logout(page: Page) {
|
||||
const navbar = page.getByRole('navigation', {name: 'Navigation Bar'});
|
||||
await clickDropdownItem(page, navbar.getByTitle(env.E2E_USER!), 'Sign Out');
|
||||
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.goto('/');
|
||||
await expect(page.getByRole('link', {name: 'Sign In'})).toBeVisible();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user