mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 14:27:02 +08:00
fix(core): sign out jump to 404 (#4204)
This commit is contained in:
@@ -10,6 +10,11 @@ import {
|
||||
getBlockSuiteEditorTitle,
|
||||
waitForEditorLoad,
|
||||
} from '@affine-test/kit/utils/page-logic';
|
||||
import { clickUserInfoCard } from '@affine-test/kit/utils/setting';
|
||||
import {
|
||||
clickSideBarAllPageButton,
|
||||
clickSideBarSettingButton,
|
||||
} from '@affine-test/kit/utils/sidebar';
|
||||
import { createLocalWorkspace } from '@affine-test/kit/utils/workspace';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
@@ -100,4 +105,23 @@ test.describe('collaboration', () => {
|
||||
expect(await title.innerText()).toBe('TEST TITLE');
|
||||
}
|
||||
});
|
||||
|
||||
test('exit successfully and re-login', async ({ page }) => {
|
||||
await page.reload();
|
||||
await clickSideBarAllPageButton(page);
|
||||
await page.waitForTimeout(200);
|
||||
const url = page.url();
|
||||
await createLocalWorkspace(
|
||||
{
|
||||
name: 'test',
|
||||
},
|
||||
page
|
||||
);
|
||||
await enableCloudWorkspace(page);
|
||||
await clickSideBarSettingButton(page);
|
||||
await clickUserInfoCard(page);
|
||||
await page.getByTestId('sign-out-button').click();
|
||||
await page.waitForTimeout(5000);
|
||||
expect(page.url()).toBe(url);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user