-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add visual test file to boilerplate code
- Loading branch information
1 parent
a8b26ff
commit c27e6b3
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
tools/generate-component/boilerplate/component.visual.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { html } from 'lit'; | ||
|
||
import { describeViewports, visualDiffStandardStates } from '../core/testing/private.js'; | ||
|
||
import './__noPrefixName__.js'; | ||
|
||
describe('__name__', () => { | ||
/** | ||
* Add the `viewports` param to test only specific viewport; | ||
* add the `viewportHeight` param to set a fixed height for the browser. | ||
*/ | ||
describeViewports(() => { | ||
// Add visual tests | ||
for (const state of visualDiffStandardStates) { | ||
it( | ||
`${state.name}`, | ||
state.with(async (setup) => { | ||
await setup.withFixture(html`<__name__></__name__>`); | ||
}), | ||
); | ||
} | ||
}); | ||
}); |