Skip to content

Commit a144ea3

Browse files
authored
Merge pull request #152 from fhlavac/clean-docs
Clean up the docs
2 parents 6b5a13f + 21a99a7 commit a144ea3

29 files changed

+735
-571
lines changed

cypress/e2e/DataView.spec.cy.ts

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
describe('Test the Data view docs page', () => {
2-
2+
33
it('displays a layout with a table and paginates', () => {
44
const ouiaId = 'LayoutExample';
5+
cy.viewport(1400, 2800)
56

6-
cy.visit('http://localhost:8006/extensions/data-view/layout');
7+
cy.visit('http://localhost:8006/extensions/data-view/overview');
78

9+
cy.get(`[data-ouia-component-id="${ouiaId}-th-0"]`).scrollIntoView().contains('Repository');
810
cy.get(`[data-ouia-component-id="${ouiaId}Header-pagination"]`).should('exist');
911
cy.get(`[data-ouia-component-id="${ouiaId}Header-bulk-select"]`).should('exist');
1012

1113
cy.get(`[data-ouia-component-id="${ouiaId}Footer-pagination"]`).should('exist');
1214
cy.get(`[data-ouia-component-id="${ouiaId}Footer-bulk-select"]`).should('not.exist');
1315

14-
cy.get(`[data-ouia-component-id="${ouiaId}-th-0"]`).contains('Repositories');
16+
cy.get(`[data-ouia-component-id="${ouiaId}-th-0"]`).contains('Repository');
1517
cy.get(`[data-ouia-component-id="${ouiaId}-th-4"]`).contains('Last commit');
1618

1719
cy.get(`[data-ouia-component-id="${ouiaId}-td-0-0"]`).contains('Repository one');
@@ -27,33 +29,33 @@ describe('Test the Data view docs page', () => {
2729
cy.get(`[data-ouia-component-id="${ouiaId}-td-0-4"]`).contains('Timestamp one');
2830

2931
// test bulk select
30-
cy.get(`input[type="checkbox"`).each(($checkbox) => {cy.wrap($checkbox).should('not.be.checked')});
32+
cy.get('[data-ouia-component-id="LayoutExample"] input[type="checkbox"]')
33+
.each(($checkbox) => {
34+
cy.wrap($checkbox).should('not.be.checked');
35+
});
3136

3237
// page checkbox select
3338
cy.get(`[data-ouia-component-id="BulkSelect-checkbox"`).first().click();
34-
cy.get(`input[type="checkbox"`).each(($checkbox) => {cy.wrap($checkbox).should('be.checked')});
39+
cy.get('[data-ouia-component-id="LayoutExample"] input[type="checkbox"]')
40+
.each(($checkbox) => {
41+
cy.wrap($checkbox).should('be.checked');
42+
});
3543
cy.contains('5 selected').should('exist');
3644

37-
// select none
38-
cy.get(`[data-ouia-component-id="BulkSelect-toggle"`).first().click({ force: true });
39-
cy.get(`[data-ouia-component-id="BulkSelect-select-none"`).first().click();
40-
cy.contains('5 selected').should('not.exist');
41-
42-
// select all
43-
cy.get(`[data-ouia-component-id="BulkSelect-toggle"`).first().click({ force: true });
44-
cy.get(`[data-ouia-component-id="BulkSelect-select-all"`).first().click();
45-
cy.get(`input[type="checkbox"`).each(($checkbox) => {cy.wrap($checkbox).should('be.checked')});
46-
cy.contains('6 selected').should('exist');
47-
4845
// page checkbox deselect
4946
cy.get(`[data-ouia-component-id="BulkSelect-checkbox"`).first().click();
50-
cy.get(`input[type="checkbox"`).each(($checkbox) => {cy.wrap($checkbox).should('not.be.checked')});
51-
cy.contains('1 selected').should('exist');
47+
cy.get('[data-ouia-component-id="LayoutExample"] input[type="checkbox"]')
48+
.each(($checkbox) => {
49+
cy.wrap($checkbox).should('not.be.checked');
50+
});
5251

5352
// select page
5453
cy.get(`[data-ouia-component-id="BulkSelect-toggle"`).first().click({ force: true });
5554
cy.get(`[data-ouia-component-id="BulkSelect-select-page"`).first().click();
56-
cy.get(`input[type="checkbox"`).each(($checkbox) => {cy.wrap($checkbox).should('be.checked')});
57-
cy.contains('6 selected').should('exist');
55+
cy.get('[data-ouia-component-id="LayoutExample"] input[type="checkbox"]')
56+
.each(($checkbox) => {
57+
cy.wrap($checkbox).should('be.checked');
58+
});
59+
cy.contains('5 selected').should('exist');
5860
})
5961
});

cypress/e2e/DataViewEvents.spec.cy.ts renamed to cypress/e2e/DataViewEventsContext.spec.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ describe('Test the Data view docs page', () => {
33
it('displays a table and opens detail', () => {
44
const ouiaId = 'ContextExample';
55

6-
cy.visit('http://localhost:8006/extensions/data-view/events-context');
6+
cy.visit('http://localhost:8006/extensions/data-view/overview');
77

8-
cy.get(`[data-ouia-component-id="${ouiaId}-th-0"]`).contains('Repositories');
8+
cy.get(`[data-ouia-component-id="${ouiaId}-th-0"]`).scrollIntoView().contains('Repositories');
99
cy.get(`[data-ouia-component-id="${ouiaId}-th-4"]`).contains('Last commit');
1010

1111
cy.get(`[data-ouia-component-id="${ouiaId}-td-0-0"]`).contains('Repository one');

cypress/e2e/Components.spec.cy.ts renamed to cypress/e2e/TreeTable.spec.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ describe('Test the Data view docs with tree table', () => {
33
it('displays a a components page with tree table', () => {
44
const ouiaId = 'TreeTableExample';
55

6-
cy.visit('http://localhost:8006/extensions/data-view/components');
6+
cy.visit('http://localhost:8006/extensions/data-view/table');
77

88
cy.get(`[data-ouia-component-id="${ouiaId}-th-0"]`).scrollIntoView().contains('Repositories');
99
cy.get(`[data-ouia-component-id="${ouiaId}-th-1"]`).contains('Branches');

package-lock.json

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

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
"serve:a11y": "npm run serve:a11y -w @patternfly/react-data-view"
3333
},
3434
"devDependencies": {
35-
"@patternfly/patternfly": "^5.4.0",
36-
"@patternfly/documentation-framework": "5.23.0",
37-
"@patternfly/react-core": "^5.4.0",
38-
"@patternfly/react-icons": "^5.4.0",
39-
"@patternfly/react-table": "^5.4.0",
35+
"@patternfly/patternfly": "^5.4.2",
36+
"@patternfly/documentation-framework": "5.26.1",
37+
"@patternfly/react-core": "^5.4.8",
38+
"@patternfly/react-icons": "^5.4.2",
39+
"@patternfly/react-table": "^5.4.1",
4040
"@patternfly/react-component-groups": "^5.5.1",
4141
"@babel/core": "^7.24.7",
4242
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",

packages/module/patternfly-docs/content/extensions/data-view/about-data-view.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)