-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d27604
commit 6d89d80
Showing
4 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
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
27 changes: 27 additions & 0 deletions
27
packages/dnb-ui-lib/src/style/elements/__tests__/Typography.screenshot.test.js
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,27 @@ | ||
/** | ||
* Screenshot Test | ||
* This file will not run on "test:staged" because we dont require any related files | ||
*/ | ||
|
||
import { | ||
testPageScreenshot, | ||
setupPageScreenshot | ||
} from '../../../core/jest/jestSetupScreenshots' | ||
|
||
// NB: Remember that the fonts are swapped out with arial during the tests | ||
|
||
describe('Heading screenshot', () => { | ||
setupPageScreenshot({ url: '/uilib/typography' }) | ||
it('have to match the additional heading examples', async () => { | ||
const screenshot = await testPageScreenshot({ | ||
selector: '[data-dnb-test="heading-additional"] article' | ||
}) | ||
expect(screenshot).toMatchImageSnapshot() | ||
}) | ||
it('have to match the paragraph example', async () => { | ||
const screenshot = await testPageScreenshot({ | ||
selector: '[data-dnb-test="paragraph-example"] .dnb-p' | ||
}) | ||
expect(screenshot).toMatchImageSnapshot() | ||
}) | ||
}) |
Binary file added
BIN
+16.4 KB
...ading-screenshot-have-to-match-the-additional-heading-examples-1-dfc56.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+21 KB
...test-js-heading-screenshot-have-to-match-the-paragraph-example-1-40869.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.