Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tests/e2e/blog.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ test('article code, math, image zoom, progress, taxonomy and anchor', async ({ p
await expect(page.locator('.highlight')).toBeVisible();
await expect(page.locator('.copy-button')).toBeAttached();
await context.grantPermissions(['clipboard-read', 'clipboard-write']);
await page.evaluate(() => navigator.clipboard.writeText(''));
await page.locator('.highlight-wrapper').hover();
await page.locator('.copy-button').click();
expect(await page.evaluate(() => navigator.clipboard.readText())).toContain('def learn_by_building');
await expect.poll(() => page.evaluate(() => navigator.clipboard.readText()), {
message: 'Copy button should finish writing the example to the system clipboard'
}).toContain('def learn_by_building');
await page.locator('.article-content img').first().click();
await expect(page.locator('.medium-zoom-image--opened').last()).toBeVisible();
await page.keyboard.press('Escape');
Expand Down
Loading