d84f972fbe
* feat(ui-toolkit): smaller and simpler Card api fixes: #809 fixes: #777 * feat(ui-toolkit) - Make adjustments to header (#824) * feat(ui-toolkit) - Make adjustments to header * feat(ui-toolkit) - Make adjustments to header * add issue and pull request templates (#819) * feat(all) - Add issue and pull ruequest templates * Update PULL_REQUEST_TEMPLATE.md * Create COMMIT_GUIDELINES.md * Update PULL_REQUEST_TEMPLATE.md * Update PULL_REQUEST_TEMPLATE.md * Update COMMIT_GUIDELINES.md * feat(ui-toolkit): smaller and simpler Card api fixes: #809 fixes: #777
42 lines
1.1 KiB
JavaScript
42 lines
1.1 KiB
JavaScript
const { Chrome } = require('navalia');
|
|
const { toMatchImageSnapshot } = require('jest-image-snapshot');
|
|
|
|
expect.extend({ toMatchImageSnapshot });
|
|
|
|
describe('Visual Regressions', () => {
|
|
let chrome = null;
|
|
|
|
beforeEach(() => {
|
|
chrome = new Chrome();
|
|
});
|
|
|
|
afterEach(() => {
|
|
chrome.done();
|
|
});
|
|
|
|
it('Card > Headed > Collapsed', () =>
|
|
chrome
|
|
.goto('http://0.0.0.0:6060/#!/Card/1')
|
|
.wait('div[name="card"]')
|
|
.then(() => chrome.screenshot())
|
|
.then(image => expect(image).toMatchImageSnapshot()));
|
|
|
|
it('Card > Headed', () =>
|
|
chrome
|
|
.goto('http://0.0.0.0:6060/#!/Card/2')
|
|
.then(() => chrome.screenshot())
|
|
.then(image => expect(image).toMatchImageSnapshot()));
|
|
|
|
it('Card > Headed > Collapsed', () =>
|
|
chrome
|
|
.goto('http://0.0.0.0:6060/#!/Card/3')
|
|
.then(() => chrome.screenshot())
|
|
.then(image => expect(image).toMatchImageSnapshot()));
|
|
|
|
it('Card > Headed', () =>
|
|
chrome
|
|
.goto('http://0.0.0.0:6060/#!/Card/4')
|
|
.then(() => chrome.screenshot())
|
|
.then(image => expect(image).toMatchImageSnapshot()));
|
|
});
|