Skip to content

Commit

Permalink
test(playwright-ct): add test for annotation toolbar popover visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
skogsmaskin committed Oct 24, 2023
1 parent 8ea5cff commit e68189c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ test.describe('Portable Text Input', () => {
// Assertion: Wait for link to be re-rendered / PTE internal state to be done
await expect($pte.locator('span[data-link]')).toBeVisible()

// Assertion: the annotation toolbar popover should not be visible
await expect(page.getByTestId('annotation-toolbar-popover')).not.toBeVisible()

// Now we check if the edit popover shows automatically
await expect(page.getByLabel('Link').first()).toBeAttached({timeout: 10000})

Expand All @@ -38,6 +41,9 @@ test.describe('Portable Text Input', () => {

// Expect the editor to have focus after closing the popover
await expect($pte).toBeFocused()

// Assertion: the annotation toolbar popover should be visible
await expect(page.getByTestId('annotation-toolbar-popover')).toBeVisible()
})
})
})

0 comments on commit e68189c

Please sign in to comment.