Skip to content

Commit

Permalink
add test for testing shortcut in embed-widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
ericlln committed Jan 8, 2025
1 parent 5d3167a commit 275d16e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/shortcuts.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@ test('shortcut downloads logs', async ({ page }) => {
});

test('shortcut downloads logs in full screen error', async ({ page }) => {
await gotoPage(page, 'localhost:4010/iframe/widget');
// Go to embed-widget page without url parameter to trigger a full screen error
await gotoPage(page, 'http://localhost:4010/');

const downloadPromise = page.waitForEvent('download');
await page.keyboard.press('ControlOrMeta+Alt+Shift+KeyL');
const download = await downloadPromise;

expect(download).not.toBeNull();
});

test('shortcut downloads logs in embeded-widget', async ({ page }) => {
await gotoPage(page, 'http://localhost:4010?name=all_types');

const downloadPromise = page.waitForEvent('download');
await page.keyboard.press('ControlOrMeta+Alt+Shift+KeyL');
Expand Down

0 comments on commit 275d16e

Please sign in to comment.