blob: 2a09c0bc303a39119cb96c9389fbb73cd1ce097c [file] [log] [blame] [edit]
import {
loadCachedTestBed,
takeScreenshot,
TestBed,
} from '../../../puppeteer-tests/util';
import { ThemeChooserSk } from '../../../infra-sk/modules/theme-chooser-sk/theme-chooser-sk';
describe('task-sk', () => {
let testBed: TestBed;
before(async () => {
testBed = await loadCachedTestBed();
});
beforeEach(async () => {
await testBed.page.goto(testBed.baseUrl);
await testBed.page.setViewport({ width: 1429, height: 836 });
await testBed.page.evaluate(() => {
(<ThemeChooserSk>(
document.getElementsByTagName('theme-chooser-sk')[0]
)).darkmode = false;
});
});
describe('screenshots', () => {
it('shows the default view', async () => {
await takeScreenshot(testBed.page, 'task-scheduler', 'task-sk');
// Take a screenshot in dark mode.
await testBed.page.evaluate(() => {
(<ThemeChooserSk>(
document.getElementsByTagName('theme-chooser-sk')[0]
)).darkmode = true;
});
await takeScreenshot(testBed.page, 'task-scheduler', 'task-sk_dark');
});
});
});