Skip to content

Commit

Permalink
fix(pageHeader): ent-3533 check consistent html for Pendo (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Apr 13, 2021
1 parent 3d70cb7 commit f141eb3
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/cspell.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,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');
});
});

0 comments on commit f141eb3

Please sign in to comment.