fix: e2e tests

pull/7358/head
Konstantinos Kaloutas 2022-11-17 17:02:25 +02:00
parent 47f7863651
commit f92e609af9
1 changed files with 7 additions and 7 deletions

View File

@ -40,11 +40,11 @@ test('can right click title to show context menu', async ({ page }) => {
await page.click('.whiteboard-page-title', {
button: 'right',
})
await expect(page.locator('#custom-context-menu')).toBeVisible()
await page.keyboard.press('Escape')
await expect(page.locator('#custom-context-menu')).toHaveCount(0)
})
@ -69,7 +69,7 @@ test('set whiteboard title', async ({ page }) => {
})
test('select rectangle tool', async ({ page }) => {
await page.keyboard.press('8')
await page.keyboard.press('7')
await expect(page.locator('.tl-geometry-tools-pane-anchor [title*="Rectangle"]')).toHaveAttribute('data-selected', 'true')
})
@ -112,11 +112,11 @@ test('quick add another whiteboard', async ({ page }) => {
// create a new board first
await page.click('.nav-header .whiteboard')
await page.click('#tl-create-whiteboard')
await page.click('.whiteboard-page-title')
await page.fill('.whiteboard-page-title input', "my-whiteboard-3")
await page.keyboard.press('Enter')
const canvas = await page.waitForSelector('.logseq-tldraw');
await canvas.dblclick({
position: {
@ -138,7 +138,7 @@ test('quick add another whiteboard', async ({ page }) => {
test('go to another board and check reference', async ({ page }) => {
await page.locator('.tl-logseq-portal-container >> text=my-whiteboard-2').click()
await expect(page.locator('.whiteboard-page-title .title')).toContainText("my-whiteboard-2");
const pageRefCount$ = page.locator('.whiteboard-page-refs-count')
await expect(pageRefCount$.locator('.open-page-ref-link')).toContainText('1')