Skip to content

Commit

Permalink
fix(HelpButton): Adds test when used inside texts (#1404)
Browse files Browse the repository at this point in the history
  • Loading branch information
langz authored May 9, 2022
1 parent eda70d0 commit f8a7795
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,16 @@ import ComponentBox from 'dnb-design-system-portal/src/shared/tags/ComponentBox'
</HelpButton>
`}
</ComponentBox>

### Help button used inside text

<ComponentBox data-visual-test="help-button-inline">
{
() => /* jsx */ `
Text
<HelpButton>
Text
</HelpButton>
Text
`}
</ComponentBox>
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,11 @@ describe('HelpButton screenshot', () => {
})
expect(screenshot).toMatchImageSnapshot()
})

it('have to match help button used inside text', async () => {
const screenshot = await testPageScreenshot({
selector: '[data-visual-test="help-button-inline"]',
})
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 f8a7795

Please sign in to comment.