mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 14:27:02 +08:00
test: remove deprecated api usage (#4577)
This commit is contained in:
@@ -124,7 +124,7 @@ test.describe('basic', () => {
|
||||
});
|
||||
const nameInput = page.getByPlaceholder('Input account name');
|
||||
await nameInput.clear();
|
||||
await nameInput.type(newName, {
|
||||
await nameInput.pressSequentially(newName, {
|
||||
delay: 50,
|
||||
});
|
||||
await page.getByTestId('save-user-name').click({
|
||||
|
||||
@@ -49,7 +49,7 @@ test.describe('collaboration', () => {
|
||||
);
|
||||
await enableCloudWorkspace(page);
|
||||
const title = getBlockSuiteEditorTitle(page);
|
||||
await title.type('TEST TITLE', {
|
||||
await title.pressSequentially('TEST TITLE', {
|
||||
delay: 50,
|
||||
});
|
||||
await page.keyboard.press('Enter', { delay: 50 });
|
||||
@@ -102,7 +102,7 @@ test.describe('collaboration', () => {
|
||||
await page2.goto(currentUrl);
|
||||
{
|
||||
const title = getBlockSuiteEditorTitle(page);
|
||||
await title.type('TEST TITLE', {
|
||||
await title.pressSequentially('TEST TITLE', {
|
||||
delay: 50,
|
||||
});
|
||||
}
|
||||
@@ -124,7 +124,7 @@ test.describe('collaboration', () => {
|
||||
await clickUserInfoCard(page);
|
||||
const input = page.getByTestId('user-name-input');
|
||||
await input.clear();
|
||||
await input.type('TEST USER', {
|
||||
await input.pressSequentially('TEST USER', {
|
||||
delay: 50,
|
||||
});
|
||||
await page.getByTestId('save-user-name').click({
|
||||
@@ -167,7 +167,7 @@ test.describe('collaboration', () => {
|
||||
const page2 = await context.newPage();
|
||||
await loginUser(page2, user.email);
|
||||
await page2.goto(page.url());
|
||||
waitForEditorLoad(page2);
|
||||
await waitForEditorLoad(page2);
|
||||
const collections = page2.getByTestId('collections');
|
||||
await expect(collections.getByText('test collection')).toBeVisible();
|
||||
}
|
||||
@@ -235,7 +235,7 @@ test.describe('collaboration members', () => {
|
||||
.all();
|
||||
|
||||
// make sure the first member is the owner
|
||||
expect(page.getByTestId('member-item').first()).toContainText(
|
||||
await expect(page.getByTestId('member-item').first()).toContainText(
|
||||
'Workspace Owner'
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user