-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make textarea ux team compliant
- Loading branch information
1 parent
909fd3c
commit 47fb90f
Showing
7 changed files
with
67 additions
and
35 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
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__/Textarea.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 } from '../../../core/jest/jestSetupScreenshots' | ||
|
||
describe('Textarea screenshot', () => { | ||
const url = '/uilib/elements/textarea?fullscreen' | ||
it('have to match the "default" textarea style', async () => { | ||
const screenshot = await testPageScreenshot({ | ||
url, | ||
selector: '[data-dnb-test="textarea-default"]', | ||
padding: true | ||
}) | ||
expect(screenshot).toMatchImageSnapshot() | ||
}) | ||
it('have to match the "active" textarea style', async () => { | ||
const screenshot = await testPageScreenshot({ | ||
url, | ||
selector: '[data-dnb-test="textarea-default"]', | ||
simulate: 'active', | ||
padding: true | ||
}) | ||
expect(screenshot).toMatchImageSnapshot() | ||
}) | ||
}) |
Binary file added
BIN
+7.47 KB
...js-textarea-screenshot-have-to-match-the-active-textarea-style-1-79d70.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
+7.32 KB
...s-textarea-screenshot-have-to-match-the-default-textarea-style-1-2ef6c.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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