Skip to content

Commit 2358348

Browse files
authored
chore(deps): update dependency cypress to ^14.0.1 (#11625)
* chore(deps): update dependency cypress to ^14.0.1 * added cypress config file * updated aboutmodal.spec.ts file * added before() hook * added before() to few test suites * testing beforeEach() hook * set test isolation to false * added support file * fixed errors
1 parent 2d06857 commit 2358348

File tree

7 files changed

+127
-125
lines changed

7 files changed

+127
-125
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { defineConfig } from 'cypress';
2+
3+
export default defineConfig({
4+
e2e: {
5+
specPattern: 'cypress/integration/**/*.spec.ts',
6+
video: false,
7+
screenshotOnRunFailure: false,
8+
viewportWidth: 1200,
9+
viewportHeight: 792,
10+
supportFile: 'cypress/support/index.js',
11+
testIsolation: false
12+
},
13+
reporter: 'junit',
14+
reporterOptions: {
15+
mochaFile: 'results/my-test-output-[hash].xml',
16+
toConsole: true
17+
},
18+
waitForAnimations: false
19+
});

packages/react-integration/cypress.json

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

packages/react-integration/cypress/integration/drawer.spec.ts

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,28 +44,16 @@ describe('Drawer Demo Test', () => {
4444
$drawerPanel.should('have.class', 'pf-m-width-50-on-lg');
4545
$drawerPanel.should('have.class', 'pf-m-width-33-on-xl');
4646
$drawerPanel.should('have.class', 'pf-m-width-25-on-2xl');
47-
$drawerPanel.should('have.css', 'flex-basis', 'max(0% + 24px, min(0% + 300px, 100% + 0px))');
47+
$drawerPanel.should('have.css', 'flex-basis', 'max(24px, min(300px, 100%))');
4848
// Medium viewport
4949
cy.viewport(800, 660);
50-
cy.get('#basic-drawer .pf-v6-c-drawer__panel').should(
51-
'have.css',
52-
'flex-basis',
53-
'max(0% + 24px, min(100% + 0px, 100% + 0px))'
54-
);
50+
cy.get('#basic-drawer .pf-v6-c-drawer__panel').should('have.css', 'flex-basis', 'max(24px, min(100%, 100%))');
5551
// Xl viewport
5652
cy.viewport(1200, 660);
57-
cy.get('#basic-drawer .pf-v6-c-drawer__panel').should(
58-
'have.css',
59-
'flex-basis',
60-
'max(0% + 24px, min(0% + 300px, 100% + 0px))'
61-
);
53+
cy.get('#basic-drawer .pf-v6-c-drawer__panel').should('have.css', 'flex-basis', 'max(24px, min(300px, 100%))');
6254
// 2Xl viewport
6355
cy.viewport(1450, 660);
64-
cy.get('#basic-drawer .pf-v6-c-drawer__panel').should(
65-
'have.css',
66-
'flex-basis',
67-
'max(0% + 24px, min(0% + 300px, 100% + 0px))'
68-
);
56+
cy.get('#basic-drawer .pf-v6-c-drawer__panel').should('have.css', 'flex-basis', 'max(24px, min(300px, 100%))');
6957
});
7058

7159
it('Verify that focus gets sent to drawer', () => {

packages/react-integration/cypress/integration/drawerresize.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ describe('Drawer Resize Demo Test', () => {
44
});
55

66
it('Verify resizable drawer', () => {
7-
cy.get('.pf-v6-c-drawer__panel').should('have.css', 'flex-basis', 'max(0% + 24px, min(0% + 200px, 100% + 0px))');
7+
cy.get('.pf-v6-c-drawer__panel').should('have.css', 'flex-basis', 'max(24px, min(200px, 100%))');
88
cy.get('.pf-v6-c-drawer__panel').should('have.class', 'pf-m-resizable');
99
cy.get('.pf-v6-c-drawer').should('not.have.class', 'pf-m-expanded');
1010
cy.get('#toggleButton').click();

packages/react-integration/cypress/integration/form.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ describe('Form Demo Test', () => {
8989

9090
it('Verify pressing spacebar selects the checkbox component', () => {
9191
const $checkbox = cy.get('#subscribe');
92-
$checkbox.should('not.be.checked');
92+
$checkbox.should('not.be.checked').focus();
9393
$checkbox.type(' ');
9494
$checkbox.should('be.checked');
9595
$checkbox.type(' '); // should be unchecked but isn't

packages/react-integration/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"test:integration": "cypress run"
2929
},
3030
"devDependencies": {
31-
"cypress": "^8.7.0",
31+
"cypress": "^14.0.1",
3232
"cypress-plugin-tab": "^1.0.5",
3333
"junit-merge": "^2.0.0"
3434
}

0 commit comments

Comments
 (0)