blob: 2417d98a085bd2dc8732b59ec59ff2018c242fc1 [file] [log] [blame]
import { loadCachedTestBed, takeScreenshot, TestBed } from '../../../puppeteer-tests/util';
describe('device-editor-sk', () => {
let testBed: TestBed;
before(async () => {
testBed = await loadCachedTestBed();
});
describe('screenshots', () => {
it('shows place holder text when no dimensions are given', async () => {
await navigateTo('');
await takeScreenshot(testBed.page, 'machine', 'device-editor-sk');
});
it('shows a view when no dimensions given', async () => {
await navigateTo('#preexisting');
await takeScreenshot(testBed.page, 'machine', 'device-editor-sk_with_ssh_device');
});
it('does not show dimensions if there is no user ip set', async () => {
await navigateTo('#no_sshuserip');
await takeScreenshot(testBed.page, 'machine', 'device-editor-sk_normal_machine');
});
});
async function navigateTo(hash: string) {
await testBed.page.goto(testBed.baseUrl + hash);
await testBed.page.setViewport({ width: 640, height: 480 });
}
});