Skip to content

Commit

Permalink
update for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
romainseb committed Jul 27, 2023
1 parent 28849c5 commit e27e9e6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ function SubHeaderBar({
size="M"
onClick={onGoBack}
id="backArrow"
data-testid="tc-subheader-backArrow"
data-feature={goBackDataFeature}
>
{t('BACK_ARROW_TOOLTIP', { defaultValue: 'Go back' })}
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/SubHeaderBar/SubHeaderBar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ describe('SubHeaderBar', () => {
};
render(<SubHeaderBar {...props} />);
expect(screen.getByText('myTitle')).toBeVisible();
expect(screen.getByLabelText('Go back')).toBeVisible();
expect(screen.getByTestId('tc-subheader-backArrow')).toBeVisible();
});

it('Should render SubHeader component if right actions are in loading state', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ exports[`SubHeaderBar should render 1`] = `
<div
class="theme-navbar-left navbar-left"
>
<button
aria-describedby="42"
aria-label="Go back"
class="theme-tc-subheader-back-button tc-subheader-back-button btn-icon-only btn btn-link"
id="backArrow"
type="button"
<div
class="theme-tc-subheader-back-button tc-subheader-back-button"
>
<span
class="CoralIcon"
name="talend-arrow-left"
/>
</button>
class="CoralButtonIcon"
data-testid="tc-subheader-backArrow"
icon="arrow-left"
id="backArrow"
>
Go back
</span>
</div>
<div
class="tc-subheader-details theme-tc-subheader-details"
>
Expand Down

0 comments on commit e27e9e6

Please sign in to comment.