Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pageHeader): ent-3533 check consistent html for Pendo #580

Merged
merged 1 commit into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/cspell.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"openshift",
"optin",
"patternfly",
"pendo",
"perpage",
"qe's",
"random'ish",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,50 @@ exports[`PageHeader Component should render the subtitle when viewId is provided
</PageHeader>
`;

exports[`PageHeader Component should render the tour button when includeTour is provided: consistent html output for Pendo CSS selector 1`] = `
<section
class="pf-l-page-header pf-c-page-header pf-l-page__main-section pf-c-page__main-section pf-m-light"
widget-type="InsightsPageHeader"
>
<div
class="pf-l-flex pf-m-justify-content-space-between-on-sm"
>
<div
class=""
>
<h1
class="pf-c-title pf-m-2xl pf-u-mb-sm"
widget-type="InsightsPageHeaderTitle"
>
lorem
</h1>
</div>
<div
class=""
>
<button
aria-disabled="false"
class="pf-c-button pf-m-link pf-m-inline uxui-curiosity__button-tour"
data-ouia-component-id="OUIA-Generated-Button-link-1"
data-ouia-component-type="PF4/Button"
data-ouia-safe="true"
type="button"
>
<span
class="pf-c-label pf-m-blue"
>
<span
class="pf-c-label__content"
>
t(curiosity-optin.buttonTour)
</span>
</span>
</button>
</div>
</div>
</section>
`;

exports[`PageHeader Component should render the tour button when includeTour is provided: with tour button 1`] = `
<PageHeader
includeTour={true}
Expand Down
1 change: 1 addition & 0 deletions src/components/pageLayout/__tests__/pageHeader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ describe('PageHeader Component', () => {
it('should render the tour button when includeTour is provided', () => {
const component = mount(<PageHeader includeTour>lorem</PageHeader>);
expect(component).toMatchSnapshot('with tour button');
expect(component.render()).toMatchSnapshot('consistent html output for Pendo CSS selector');
});
});