Skip to content

Commit

Permalink
backfill test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewedstrom committed Dec 17, 2023
1 parent b78781b commit d6944e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/widget/src/assets/copy-to-clipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export const copyToClipboardButton = (
</svg>
`;

// Be aware: the copy-to-clipboard functionality is not tested. It is difficult to test clipboard functionality in
// playwright.
// Be aware: the copy-to-clipboard functionality is not tested. Sadly, it is basically impossible to test clipboard
// functionality in Playwright.
const copyToClipboard = (
event: PointerEvent,
textToCopy: string,
Expand Down
6 changes: 6 additions & 0 deletions packages/widget/test/integration/docmaps-widget.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ test('Tooltips appear on mouseover', async ({ page, browserName }) => {
await assertGraphTooltipAppearsOnHover(widget, widget.locator('.label').first(), 'Preprint');
await assertGraphTooltipAppearsOnHover(widget, widget.locator('.label').nth(3), 'Reply');
}

// tooltips should still appear after the details pane is opened and then closed
const nodeToClick = widget.locator('.node').first();
await nodeToClick.click({ force: true });
await widget.locator('.close-button').click({ force: true });
await assertGraphTooltipAppearsOnHover(widget, widget.locator('.node').nth(3), 'Reply');
});

test(`Can display details view for a Preprint with every field`, async ({ page }) => {
Expand Down

0 comments on commit d6944e4

Please sign in to comment.