Skip to content

Commit

Permalink
add tests for downloading logs shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
ericlln committed Jan 7, 2025
1 parent 91b77ad commit ce0a9fd
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/shortcuts.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { test, expect } from '@playwright/test';
import { gotoPage } from './utils';

test('shortcut downloads logs', async ({ page }) => {
await gotoPage(page, '');

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 full screen error', async ({ page }) => {
// Go to embed-widget page without url parameter to trigger a full screen error
await gotoPage(page, 'localhost:4010');

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

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

0 comments on commit ce0a9fd

Please sign in to comment.