-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Mirone <[email protected]>
- Loading branch information
1 parent
73b4437
commit e3fac97
Showing
6 changed files
with
47 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { test } from '@affine-test/kit/playwright'; | ||
import { expect } from '@playwright/test'; | ||
|
||
import { initCodeBlockByOneStep } from './utils'; | ||
|
||
test.describe('Code Block Autocomplete Operations', () => { | ||
test('angle brackets are not supported', async ({ page }) => { | ||
// open the home page and insert the code block | ||
await initCodeBlockByOneStep(page); | ||
await page.keyboard.type('<'); | ||
const codeUnit = page.locator('affine-code-unit'); | ||
await expect(codeUnit).toHaveText('<'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { openHomePage } from '@affine-test/kit/utils/load-page'; | ||
import { | ||
addCodeBlock, | ||
clickNewPageButton, | ||
waitForEditorLoad, | ||
} from '@affine-test/kit/utils/page-logic'; | ||
import type { Page } from '@playwright/test'; | ||
|
||
export const gotoContentFromTitle = async (page: Page) => { | ||
await page.keyboard.press('Enter'); | ||
}; | ||
|
||
export const createNewPage = async (page: Page) => { | ||
await clickNewPageButton(page); | ||
}; | ||
|
||
export const initCodeBlockByOneStep = async (page: Page) => { | ||
await openHomePage(page); | ||
await createNewPage(page); | ||
await waitForEditorLoad(page); | ||
await gotoContentFromTitle(page); | ||
await addCodeBlock(page); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters