blob: 5f127a116c4606df7d8e5f636394a06bcd9acadb [file] [log] [blame]
import * as path from 'path';
import { expect } from 'chai';
import { setUpPuppeteerAndDemoPageServer, takeScreenshot } from '../../../puppeteer-tests/util';
describe('suggest-input-sk', () => {
const testBed = setUpPuppeteerAndDemoPageServer(path.join(__dirname, '..', '..', 'webpack.config.ts'));
beforeEach(async () => {
await testBed.page.goto(`${testBed.baseUrl}/dist/suggest-input-sk.html`);
await testBed.page.setViewport({ width: 400, height: 500 });
});
it('should render the demo page', async () => {
// Smoke test.
expect(await testBed.page.$$('suggest-input-sk')).to.have.length(1);
});
describe('screenshots', () => {
it('shows the default view', async () => {
await takeScreenshot(testBed.page, 'ct', 'suggest-input-sk');
});
it('shows the suggestions', async () => {
await testBed.page.click('input');
await takeScreenshot(testBed.page, 'ct', 'suggest-input-sk_suggestions');
});
});
});