Skip to content

Commit c598d80

Browse files
authored
test: add Lumo visual tests for standalone login-form (#9688)
1 parent 1177599 commit c598d80

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { fixtureSync } from '@vaadin/testing-helpers';
2+
import { visualDiff } from '@web/test-runner-visual-regression';
3+
import '@vaadin/vaadin-lumo-styles/props.css';
4+
import '@vaadin/vaadin-lumo-styles/global.css';
5+
import '@vaadin/vaadin-lumo-styles/components/login.css';
6+
import '../common.js';
7+
import '../../../vaadin-login-form.js';
8+
9+
describe('login-form', () => {
10+
let div, element;
11+
12+
beforeEach(() => {
13+
div = document.createElement('div');
14+
div.style.display = 'inline-block';
15+
div.style.padding = '10px';
16+
element = fixtureSync('<vaadin-login-form></vaadin-login-form>', div);
17+
});
18+
19+
it('basic', async () => {
20+
element.opened = true;
21+
await visualDiff(div, 'basic');
22+
});
23+
24+
it('error', async () => {
25+
element.error = true;
26+
await visualDiff(div, 'error');
27+
});
28+
});
7.97 KB
Loading
15.6 KB
Loading

0 commit comments

Comments
 (0)