Skip to content

Commit 916d220

Browse files
authored
Merge pull request #313 from fhlavac/nav6
2 parents 1fc4f25 + 0219c05 commit 916d220

90 files changed

Lines changed: 1785 additions & 1971 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ export const MyComponent: React.FunctionComponent<MyComponentProps> = ({ customL
8686
#### Markdown file example:
8787
```
8888
---
89-
section: extensions
90-
subsection: Component groups
89+
section: Component groups
90+
subsection: My component's category
9191
id: MyComponent
9292
propComponents: ['MyComponent']
9393
---

cypress/component/Ansible.cy.tsx

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from 'react';
2+
import { AnsibleSupport } from '@patternfly/react-component-groups/dist/dynamic/AnsibleSupport';
3+
4+
describe('AnsibleSupport', () => {
5+
it('renders supported AnsibleSupport', () => {
6+
cy.mount(<AnsibleSupport />)
7+
cy.get('i').should('have.class', 'ansibleSupported-0-2-2');
8+
});
9+
it('renders unsupported Ansible', () => {
10+
cy.mount(<AnsibleSupport isSupported={false}/>)
11+
cy.get('i').should('have.class', 'ansibleUnsupported-0-2-3');
12+
});
13+
});

cypress/component/ContentHeader.cy.tsx

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React from 'react';
2-
import InvalidObject from '../../packages/module/dist/dynamic/InvalidObject';
2+
import MissingPage from '../../packages/module/dist/dynamic/MissingPage';
33

4-
describe('InvalidObject', () => {
5-
it('renders InvalidObject', () => {
6-
cy.mount(<InvalidObject />)
7-
cy.get('[data-ouia-component-id="InvalidObject"]').should('exist')
8-
cy.get('[data-ouia-component-id="InvalidObject"]').contains('We lost that page');
9-
cy.get('[data-ouia-component-id="InvalidObject-body"]').contains("Let's find you a new one. Try a new search or return home.");
10-
cy.get('[data-ouia-component-id="InvalidObject-home-button"]').contains('Return to homepage');
4+
describe('MissingPage', () => {
5+
it('renders MissingPage', () => {
6+
cy.mount(<MissingPage />)
7+
cy.get('[data-ouia-component-id="MissingPage"]').should('exist')
8+
cy.get('[data-ouia-component-id="MissingPage"]').contains('We lost that page');
9+
cy.get('[data-ouia-component-id="MissingPage-body"]').contains("Let's find you a new one. Try a new search or return home.");
10+
cy.get('[data-ouia-component-id="MissingPage-home-button"]').contains('Return to homepage');
1111
});
1212
})
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
import PageHeader from '@patternfly/react-component-groups/dist/dynamic/PageHeader';
3+
4+
describe('PageHeader', () => {
5+
it('should render PageHeader title and subtitle', () => {
6+
cy.mount(<PageHeader title='My title' subtitle='This is a subtitle for your page header' />);
7+
cy.get('title').should('exist')
8+
cy.get('[data-ouia-component-id="PageHeader-title"]').should('have.text', 'My title')
9+
cy.get('[data-ouia-component-id="PageHeader-subtitle"]').should('have.text', 'This is a subtitle for your page header')
10+
})
11+
});

cypress/component/ServiceCard.cy.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe('ServiceCard', () => {
99
title='Example'
1010
subtitle='A basic example'
1111
description='This is a basic ServiceCard Example'
12-
icon={<img src="/" alt="content-header-icon" />}
12+
icon={<img src="/" alt="page-header-icon" />}
1313
helperText='Here is helper text'
1414
ouiaId='Example'
1515
/>)
@@ -21,7 +21,7 @@ describe('ServiceCard', () => {
2121
title='Example'
2222
subtitle='A basic example'
2323
description='This is a basic ServiceCard Example'
24-
icon={<img src="/" alt="content-header-icon" />}
24+
icon={<img src="/" alt="page-header-icon" />}
2525
helperText='Here is helper text'
2626
ouiaId='Example'
2727
footer={<>

cypress/e2e/CloseButton.spec.cy.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
describe('Test the close button', () => {
22
it('passes', () => {
3-
cy.visit('http://localhost:8006/extensions/component-groups/about-component-groups', { onBeforeLoad: (win) => {cy.stub(win.console, 'log').as('consoleLog');}, });
4-
cy.wait(1000);
5-
cy.get('a[href="/extensions/component-groups/close-button"]').click();
3+
cy.visit('http://localhost:8006/component-groups/controls/close-button', { onBeforeLoad: (win) => {cy.stub(win.console, 'log').as('consoleLog');}, });
64
cy.wait(1000);
75

86
cy.get('[data-test-id="close-button-example"]').click();

package-lock.json

Lines changed: 0 additions & 72 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/module/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,8 @@
4747
"@patternfly/patternfly": "6.0.0-alpha.210",
4848
"@types/react": "^18.2.33",
4949
"@types/react-dom": "^18.2.14",
50-
"@types/react-router-dom": "^5.3.3",
5150
"react": "^18.3.1",
5251
"react-dom": "^18.3.1",
53-
"react-router": "^6.24.0",
54-
"react-router-dom": "^6.24.0",
5552
"typescript": "^5.5.2"
5653
}
5754
}

0 commit comments

Comments
 (0)