feat(Page): rename 'header' prop to 'masthead' by adamviktora · Pull Request #10454 · patternfly/patternfly-react
Expand Up
@@ -22,15 +22,15 @@ const props = {
describe('Page', () => { test('Check page vertical layout example against snapshot', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = ( <PageSidebar isSidebarOpen> <PageSidebarBody>Navigation</PageSidebarBody> </PageSidebar> );
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageSection variant="default">Section with default background</PageSection> </Page> ); Expand All @@ -39,15 +39,15 @@ describe('Page', () => { });
test('Check dark page against snapshot', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = ( <PageSidebar isSidebarOpen> <PageSidebarBody>Navigation</PageSidebarBody> </PageSidebar> );
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageSection variant="default">Section with default background</PageSection> </Page> ); Expand All @@ -56,11 +56,11 @@ describe('Page', () => { });
test('Check page horizontal layout example against snapshot', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />;
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageSection variant="default">Section with default background</PageSection> </Page> ); Expand All @@ -69,7 +69,7 @@ describe('Page', () => { });
test('Check page to verify breadcrumb is created', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />; const PageBreadcrumb = () => ( <Breadcrumb> Expand All @@ -83,7 +83,7 @@ describe('Page', () => { );
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar} breadcrumb={<PageBreadcrumb />}> <Page {...props} masthead={masthead} sidebar={Sidebar} breadcrumb={<PageBreadcrumb />}> <PageSection variant="default">Section with default background</PageSection> </Page> ); Expand All @@ -93,7 +93,7 @@ describe('Page', () => { });
test('Verify sticky top breadcrumb on all height breakpoints', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />; const PageBreadcrumb = () => ( <Breadcrumb> Expand All @@ -109,7 +109,7 @@ describe('Page', () => { const { asFragment } = render( <Page {...props} header={Header} masthead={masthead} sidebar={Sidebar} breadcrumb={<PageBreadcrumb />} breadcrumbProps={{ stickyOnBreakpoint: { sm: 'top', md: 'top', lg: 'top', xl: 'top', '2xl': 'top' } }} Expand All @@ -123,7 +123,7 @@ describe('Page', () => { });
test('Verify sticky bottom breadcrumb on all height breakpoints', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />; const PageBreadcrumb = () => ( <Breadcrumb> Expand All @@ -139,7 +139,7 @@ describe('Page', () => { const { asFragment } = render( <Page {...props} header={Header} masthead={masthead} sidebar={Sidebar} breadcrumb={<PageBreadcrumb />} breadcrumbProps={{ Expand All @@ -155,11 +155,11 @@ describe('Page', () => { });
test('Check page to verify breadcrumb is created - PageBreadcrumb syntax', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />;
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageBreadcrumb> <Breadcrumb> <BreadcrumbItem>Section Home</BreadcrumbItem> Expand All @@ -179,11 +179,11 @@ describe('Page', () => { });
test('Verify sticky top breadcrumb on all height breakpoints - PageBreadcrumb syntax', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />;
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageBreadcrumb stickyOnBreakpoint={{ sm: 'top', md: 'top', lg: 'top', xl: 'top', '2xl': 'top' }}> <Breadcrumb> <BreadcrumbItem>Section Home</BreadcrumbItem> Expand All @@ -203,11 +203,11 @@ describe('Page', () => { });
test('Sticky bottom breadcrumb on all height breakpoints - PageBreadcrumb syntax', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />;
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageBreadcrumb stickyOnBreakpoint={{ sm: 'bottom', md: 'bottom', lg: 'bottom', xl: 'bottom', '2xl': 'bottom' }} > Expand All @@ -229,11 +229,11 @@ describe('Page', () => { });
test('Check page to verify nav is created - PageNavigation syntax', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />;
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageNavigation> <Nav aria-label="Nav" variant="horizontal-subnav"> <NavList> Expand All @@ -256,11 +256,11 @@ describe('Page', () => { });
test('Check page to verify grouped nav and breadcrumb - new components syntax', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />;
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageGroup stickyOnBreakpoint={{ default: 'bottom' }}> <PageBreadcrumb> <Breadcrumb> Expand Down Expand Up @@ -295,7 +295,7 @@ describe('Page', () => { });
test('Check page to verify grouped nav and breadcrumb - old / props syntax', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />; const crumb = ( <PageBreadcrumb> Expand Down Expand Up @@ -326,7 +326,7 @@ describe('Page', () => { const { asFragment } = render( <Page {...props} header={Header} masthead={masthead} sidebar={Sidebar} breadcrumb={crumb} horizontalSubnav={nav} Expand All @@ -349,7 +349,7 @@ describe('Page', () => { });
test('Check page to verify skip to content points to main content region', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />; const PageBreadcrumb = ( <Breadcrumb> Expand All @@ -367,7 +367,7 @@ describe('Page', () => { const { asFragment } = render( <Page {...props} header={Header} masthead={masthead} sidebar={Sidebar} breadcrumb={PageBreadcrumb} skipToContent={PageSkipToContent} Expand Down
describe('Page', () => { test('Check page vertical layout example against snapshot', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = ( <PageSidebar isSidebarOpen> <PageSidebarBody>Navigation</PageSidebarBody> </PageSidebar> );
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageSection variant="default">Section with default background</PageSection> </Page> ); Expand All @@ -39,15 +39,15 @@ describe('Page', () => { });
test('Check dark page against snapshot', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = ( <PageSidebar isSidebarOpen> <PageSidebarBody>Navigation</PageSidebarBody> </PageSidebar> );
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageSection variant="default">Section with default background</PageSection> </Page> ); Expand All @@ -56,11 +56,11 @@ describe('Page', () => { });
test('Check page horizontal layout example against snapshot', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />;
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageSection variant="default">Section with default background</PageSection> </Page> ); Expand All @@ -69,7 +69,7 @@ describe('Page', () => { });
test('Check page to verify breadcrumb is created', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />; const PageBreadcrumb = () => ( <Breadcrumb> Expand All @@ -83,7 +83,7 @@ describe('Page', () => { );
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar} breadcrumb={<PageBreadcrumb />}> <Page {...props} masthead={masthead} sidebar={Sidebar} breadcrumb={<PageBreadcrumb />}> <PageSection variant="default">Section with default background</PageSection> </Page> ); Expand All @@ -93,7 +93,7 @@ describe('Page', () => { });
test('Verify sticky top breadcrumb on all height breakpoints', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />; const PageBreadcrumb = () => ( <Breadcrumb> Expand All @@ -109,7 +109,7 @@ describe('Page', () => { const { asFragment } = render( <Page {...props} header={Header} masthead={masthead} sidebar={Sidebar} breadcrumb={<PageBreadcrumb />} breadcrumbProps={{ stickyOnBreakpoint: { sm: 'top', md: 'top', lg: 'top', xl: 'top', '2xl': 'top' } }} Expand All @@ -123,7 +123,7 @@ describe('Page', () => { });
test('Verify sticky bottom breadcrumb on all height breakpoints', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />; const PageBreadcrumb = () => ( <Breadcrumb> Expand All @@ -139,7 +139,7 @@ describe('Page', () => { const { asFragment } = render( <Page {...props} header={Header} masthead={masthead} sidebar={Sidebar} breadcrumb={<PageBreadcrumb />} breadcrumbProps={{ Expand All @@ -155,11 +155,11 @@ describe('Page', () => { });
test('Check page to verify breadcrumb is created - PageBreadcrumb syntax', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />;
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageBreadcrumb> <Breadcrumb> <BreadcrumbItem>Section Home</BreadcrumbItem> Expand All @@ -179,11 +179,11 @@ describe('Page', () => { });
test('Verify sticky top breadcrumb on all height breakpoints - PageBreadcrumb syntax', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />;
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageBreadcrumb stickyOnBreakpoint={{ sm: 'top', md: 'top', lg: 'top', xl: 'top', '2xl': 'top' }}> <Breadcrumb> <BreadcrumbItem>Section Home</BreadcrumbItem> Expand All @@ -203,11 +203,11 @@ describe('Page', () => { });
test('Sticky bottom breadcrumb on all height breakpoints - PageBreadcrumb syntax', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />;
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageBreadcrumb stickyOnBreakpoint={{ sm: 'bottom', md: 'bottom', lg: 'bottom', xl: 'bottom', '2xl': 'bottom' }} > Expand All @@ -229,11 +229,11 @@ describe('Page', () => { });
test('Check page to verify nav is created - PageNavigation syntax', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />;
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageNavigation> <Nav aria-label="Nav" variant="horizontal-subnav"> <NavList> Expand All @@ -256,11 +256,11 @@ describe('Page', () => { });
test('Check page to verify grouped nav and breadcrumb - new components syntax', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />;
const { asFragment } = render( <Page {...props} header={Header} sidebar={Sidebar}> <Page {...props} masthead={masthead} sidebar={Sidebar}> <PageGroup stickyOnBreakpoint={{ default: 'bottom' }}> <PageBreadcrumb> <Breadcrumb> Expand Down Expand Up @@ -295,7 +295,7 @@ describe('Page', () => { });
test('Check page to verify grouped nav and breadcrumb - old / props syntax', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />; const crumb = ( <PageBreadcrumb> Expand Down Expand Up @@ -326,7 +326,7 @@ describe('Page', () => { const { asFragment } = render( <Page {...props} header={Header} masthead={masthead} sidebar={Sidebar} breadcrumb={crumb} horizontalSubnav={nav} Expand All @@ -349,7 +349,7 @@ describe('Page', () => { });
test('Check page to verify skip to content points to main content region', () => { const Header = <Masthead />; const masthead = <Masthead />; const Sidebar = <PageSidebar isSidebarOpen />; const PageBreadcrumb = ( <Breadcrumb> Expand All @@ -367,7 +367,7 @@ describe('Page', () => { const { asFragment } = render( <Page {...props} header={Header} masthead={masthead} sidebar={Sidebar} breadcrumb={PageBreadcrumb} skipToContent={PageSkipToContent} Expand Down