Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: disable error-message transition in visual tests #7830

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/checkbox-group/test/visual/common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

registerStyles(
'vaadin-checkbox-group',
css`
/* Show error message immediately */
[part='error-message'] {
transition: none !important;
}
`,
);
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fixtureSync } from '@vaadin/testing-helpers/dist/fixture.js';
import { sendKeys } from '@web/test-runner-commands';
import { visualDiff } from '@web/test-runner-visual-regression';
import '../common.js';
import '../../../theme/lumo/vaadin-checkbox-group.js';

describe('checkbox-group', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fixtureSync } from '@vaadin/testing-helpers/dist/fixture.js';
import { sendKeys } from '@web/test-runner-commands';
import { visualDiff } from '@web/test-runner-visual-regression';
import '../common.js';
import '../../../theme/material/vaadin-checkbox-group.js';

describe('checkbox-group', () => {
Expand Down
11 changes: 11 additions & 0 deletions packages/checkbox/test/visual/common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

registerStyles(
'vaadin-checkbox',
css`
/* Show error message immediately */
[part='error-message'] {
transition: none !important;
}
`,
);
1 change: 1 addition & 0 deletions packages/checkbox/test/visual/lumo/checkbox.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { fixtureSync } from '@vaadin/testing-helpers';
import { sendKeys } from '@web/test-runner-commands';
import { visualDiff } from '@web/test-runner-visual-regression';
import '@vaadin/vaadin-lumo-styles/test/autoload.js';
import '../common.js';
import '../../../theme/lumo/vaadin-checkbox.js';

describe('checkbox', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/checkbox/test/visual/material/checkbox.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fixtureSync } from '@vaadin/testing-helpers';
import { sendKeys } from '@web/test-runner-commands';
import { visualDiff } from '@web/test-runner-visual-regression';
import '../common.js';
import '../../../theme/material/vaadin-checkbox.js';

describe('checkbox', () => {
Expand Down
7 changes: 6 additions & 1 deletion packages/combo-box/test/visual/common.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

/* Hide caret */
registerStyles(
'vaadin-combo-box',
css`
/* Hide caret */
:host([focus-ring]) ::slotted(input),
:host([opened]) ::slotted(input) {
caret-color: transparent;
}
/* Show error message immediately */
[part='error-message'] {
transition: none !important;
}
`,
);

Expand Down
11 changes: 11 additions & 0 deletions packages/custom-field/test/visual/common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

registerStyles(
'vaadin-custom-field vaadin-date-picker vaadin-number-field vaadin-text-field',
css`
/* Show error message immediately */
[part='error-message'] {
transition: none !important;
}
`,
);
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { fixtureSync } from '@vaadin/testing-helpers/dist/fixture.js';
import { visualDiff } from '@web/test-runner-visual-regression';
import '../common.js';
import '@vaadin/combo-box/theme/lumo/vaadin-combo-box.js';
import '@vaadin/date-picker/theme/lumo/vaadin-date-picker.js';
import '@vaadin/email-field/theme/lumo/vaadin-email-field.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { fixtureSync } from '@vaadin/testing-helpers/dist/fixture.js';
import { visualDiff } from '@web/test-runner-visual-regression';
import '../common.js';
import '@vaadin/combo-box/theme/material/vaadin-combo-box.js';
import '@vaadin/date-picker/theme/material/vaadin-date-picker.js';
import '@vaadin/form-layout/theme/material/vaadin-form-item.js';
Expand Down
7 changes: 6 additions & 1 deletion packages/date-picker/test/visual/common.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

/* Hide caret */
registerStyles(
'vaadin-date-picker',
css`
/* Hide caret */
:host([focus-ring]) ::slotted(input),
:host([opened]) ::slotted(input) {
caret-color: transparent;
}
/* Show error message immediately */
[part='error-message'] {
transition: none !important;
}
`,
);

Expand Down
7 changes: 6 additions & 1 deletion packages/date-time-picker/test/visual/common.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

/* Hide caret */
registerStyles(
'vaadin-date-picker',
css`
/* Hide caret */
:host([focused]) ::slotted(input) {
caret-color: transparent;
}
/* Show error message immediately */
[part='error-message'] {
transition: none !important;
}
`,
);
7 changes: 6 additions & 1 deletion packages/multi-select-combo-box/test/visual/common.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

/* Hide caret */
registerStyles(
'vaadin-multi-select-combo-box',
css`
/* Hide caret */
:host([focused][focus-ring]) ::slotted(input),
:host([focused][has-value]) ::slotted(input),
:host([focused][opened]) ::slotted(input) {
caret-color: transparent !important;
}
/* Show error message immediately */
[part='error-message'] {
transition: none !important;
}
`,
);
7 changes: 6 additions & 1 deletion packages/number-field/test/visual/common.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

/* Hide caret */
registerStyles(
'vaadin-number-field',
css`
/* Hide caret */
:host([focus-ring]) ::slotted(input) {
caret-color: transparent;
}
/* Show error message immediately */
[part='error-message'] {
transition: none !important;
}
`,
);
11 changes: 11 additions & 0 deletions packages/radio-group/test/visual/common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

registerStyles(
'vaadin-radio-group',
css`
/* Show error message immediately */
[part='error-message'] {
transition: none !important;
}
`,
);
1 change: 1 addition & 0 deletions packages/radio-group/test/visual/lumo/radio-group.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fixtureSync } from '@vaadin/testing-helpers/dist/fixture.js';
import { sendKeys } from '@web/test-runner-commands';
import { visualDiff } from '@web/test-runner-visual-regression';
import '../common.js';
import '../../../theme/lumo/vaadin-radio-group.js';

describe('radio-group', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fixtureSync } from '@vaadin/testing-helpers/dist/fixture.js';
import { sendKeys } from '@web/test-runner-commands';
import { visualDiff } from '@web/test-runner-visual-regression';
import '../common.js';
import '../../../theme/material/vaadin-radio-group.js';

describe('radio-group', () => {
Expand Down
11 changes: 11 additions & 0 deletions packages/select/test/visual/common.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

registerStyles(
'vaadin-select',
css`
/* Show error message immediately */
[part='error-message'] {
transition: none !important;
}
`,
);
1 change: 1 addition & 0 deletions packages/select/test/visual/lumo/select.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { visualDiff } from '@web/test-runner-visual-regression';
import '@vaadin/item/theme/lumo/vaadin-item.js';
import '@vaadin/list-box/theme/lumo/vaadin-list-box.js';
import '../../not-animated-styles.js';
import '../common.js';
import '../../../theme/lumo/vaadin-select.js';

describe('select', () => {
Expand Down
1 change: 1 addition & 0 deletions packages/select/test/visual/material/select.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { visualDiff } from '@web/test-runner-visual-regression';
import '@vaadin/item/theme/material/vaadin-item.js';
import '@vaadin/list-box/theme/material/vaadin-list-box.js';
import '../../not-animated-styles.js';
import '../common.js';
import '../../../theme/material/vaadin-select.js';

describe('select', () => {
Expand Down
7 changes: 6 additions & 1 deletion packages/text-area/test/visual/common.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

/* Hide caret */
registerStyles(
'vaadin-text-area',
css`
/* Hide caret */
::slotted(textarea) {
caret-color: transparent;
}
/* Show error message immediately */
[part='error-message'] {
transition: none !important;
}
`,
);
7 changes: 6 additions & 1 deletion packages/text-field/test/visual/common.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

/* Hide caret */
registerStyles(
'vaadin-text-field',
css`
/* Hide caret */
:host([focus-ring]) ::slotted(input) {
caret-color: transparent;
}
/* Show error message immediately */
[part='error-message'] {
transition: none !important;
}
`,
);
7 changes: 6 additions & 1 deletion packages/time-picker/test/visual/common.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

/* Hide caret */
registerStyles(
'vaadin-time-picker',
css`
/* Hide caret */
:host([focus-ring]) ::slotted(input),
:host([opened]) ::slotted(input) {
caret-color: transparent;
}
/* Show error message immediately */
[part='error-message'] {
transition: none !important;
}
`,
);
Loading