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

feat(Select, dropdown, options menu, contect selector, app launcher): Remove deprecated components #10345

Merged
merged 5 commits into from
May 16, 2024
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
28 changes: 14 additions & 14 deletions packages/react-core/src/components/Page/__tests__/Page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as React from 'react';
import { render, screen } from '@testing-library/react';

import { Page } from '../Page';
import { PageHeader } from '../../../deprecated/components/PageHeader';
import { PageSidebar } from '../PageSidebar';
import { PageSidebarBody } from '../PageSidebarBody';
import { PageSection } from '../PageSection';
Expand All @@ -13,6 +12,7 @@ import { SkipToContent } from '../../SkipToContent';
import { PageBreadcrumb } from '../PageBreadcrumb';
import { PageNavigation } from '../PageNavigation';
import { PageGroup } from '../PageGroup';
import { Masthead } from '../../Masthead';

const props = {
'aria-label': 'Page layout',
Expand All @@ -22,7 +22,7 @@ const props = {

describe('Page', () => {
test('Check page vertical layout example against snapshot', () => {
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" onNavToggle={() => undefined} />;
const Header = <Masthead />;
const Sidebar = (
<PageSidebar isSidebarOpen>
<PageSidebarBody>Navigation</PageSidebarBody>
Expand All @@ -39,7 +39,7 @@ describe('Page', () => {
});

test('Check dark page against snapshot', () => {
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" onNavToggle={() => undefined} />;
const Header = <Masthead />;
const Sidebar = (
<PageSidebar isSidebarOpen>
<PageSidebarBody>Navigation</PageSidebarBody>
Expand All @@ -56,7 +56,7 @@ describe('Page', () => {
});

test('Check page horizontal layout example against snapshot', () => {
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" topNav="Navigation" />;
const Header = <Masthead />;
const Sidebar = <PageSidebar isSidebarOpen />;

const { asFragment } = render(
Expand All @@ -69,7 +69,7 @@ describe('Page', () => {
});

test('Check page to verify breadcrumb is created', () => {
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" topNav="Navigation" />;
const Header = <Masthead />;
const Sidebar = <PageSidebar isSidebarOpen />;
const PageBreadcrumb = () => (
<Breadcrumb>
Expand All @@ -93,7 +93,7 @@ describe('Page', () => {
});

test('Verify sticky top breadcrumb on all height breakpoints', () => {
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" topNav="Navigation" />;
const Header = <Masthead />;
const Sidebar = <PageSidebar isSidebarOpen />;
const PageBreadcrumb = () => (
<Breadcrumb>
Expand Down Expand Up @@ -123,7 +123,7 @@ describe('Page', () => {
});

test('Verify sticky bottom breadcrumb on all height breakpoints', () => {
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" topNav="Navigation" />;
const Header = <Masthead />;
const Sidebar = <PageSidebar isSidebarOpen />;
const PageBreadcrumb = () => (
<Breadcrumb>
Expand Down Expand Up @@ -155,7 +155,7 @@ describe('Page', () => {
});

test('Check page to verify breadcrumb is created - PageBreadcrumb syntax', () => {
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" topNav="Navigation" />;
const Header = <Masthead />;
const Sidebar = <PageSidebar isSidebarOpen />;

const { asFragment } = render(
Expand All @@ -179,7 +179,7 @@ describe('Page', () => {
});

test('Verify sticky top breadcrumb on all height breakpoints - PageBreadcrumb syntax', () => {
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" topNav="Navigation" />;
const Header = <Masthead />;
const Sidebar = <PageSidebar isSidebarOpen />;

const { asFragment } = render(
Expand All @@ -203,7 +203,7 @@ describe('Page', () => {
});

test('Sticky bottom breadcrumb on all height breakpoints - PageBreadcrumb syntax', () => {
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" topNav="Navigation" />;
const Header = <Masthead />;
const Sidebar = <PageSidebar isSidebarOpen />;

const { asFragment } = render(
Expand All @@ -229,7 +229,7 @@ describe('Page', () => {
});

test('Check page to verify nav is created - PageNavigation syntax', () => {
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" topNav="Navigation" />;
const Header = <Masthead />;
const Sidebar = <PageSidebar isSidebarOpen />;

const { asFragment } = render(
Expand All @@ -256,7 +256,7 @@ describe('Page', () => {
});

test('Check page to verify grouped nav and breadcrumb - new components syntax', () => {
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" topNav="Navigation" />;
const Header = <Masthead />;
const Sidebar = <PageSidebar isSidebarOpen />;

const { asFragment } = render(
Expand Down Expand Up @@ -295,7 +295,7 @@ describe('Page', () => {
});

test('Check page to verify grouped nav and breadcrumb - old / props syntax', () => {
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" topNav="Navigation" />;
const Header = <Masthead />;
const Sidebar = <PageSidebar isSidebarOpen />;
const crumb = (
<PageBreadcrumb>
Expand Down Expand Up @@ -349,7 +349,7 @@ describe('Page', () => {
});

test('Check page to verify skip to content points to main content region', () => {
const Header = <PageHeader logo="Logo" headerTools="PageHeaderTools | Avatar" topNav="Navigation" />;
const Header = <Masthead />;
const Sidebar = <PageSidebar isSidebarOpen />;
const PageBreadcrumb = (
<Breadcrumb>
Expand Down
Loading
Loading