Skip to content

Commit

Permalink
Add visual test
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Dec 17, 2024
1 parent 65ec55c commit 4928219
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,13 @@ export const WithinOtherComponents = () => {
</ComponentBox>
)
}

export const WithinALabel = () => {
return (
<ComponentBox data-visual-test="submit-indicator-with-label">
<Form.Handler>
<Form.SubmitIndicator state="pending" showLabel />
</Form.Handler>
</ComponentBox>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ Make a change in the input field.
### Used in other components

<Examples.WithinOtherComponents />

### With a label

<Examples.WithinALabel />
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {
makeScreenshot,
setupPageScreenshot,
} from '../../../../../core/jest/jestSetupScreenshots'

describe('Form.SubmitIndicator', () => {
setupPageScreenshot({
url: '/uilib/extensions/forms/Form/SubmitIndicator/demos',
})

it('have to match submit-indicator-with-label', async () => {
const screenshot = await makeScreenshot({
selector: '[data-visual-test="submit-indicator-with-label"]',
})
expect(screenshot).toMatchImageSnapshot()
})
})
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4928219

Please sign in to comment.