test: remove deprecated api usage (#4577)

This commit is contained in:
Alex Yang
2023-10-11 01:05:06 -05:00
committed by GitHub
parent 1f6a105e5c
commit 8f5ee9234c
11 changed files with 49 additions and 39 deletions

View File

@@ -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({

View File

@@ -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'
);