Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7163794
D6008.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D6008.diff
View Options
diff --git a/cypress/integration/layout.spec.js b/cypress/integration/layout.spec.js
--- a/cypress/integration/layout.spec.js
+++ b/cypress/integration/layout.spec.js
@@ -162,28 +162,15 @@
}
];
- const responses = [];
- for (const std of statusTestData) {
- responses.push(genStatusResponse(std.status, std.statusCode));
- }
-
- const checkStatusDisplay = (i) => {
+ for (let i = 0; i < statusTestData.length; ++i) {
cy.visit(url);
- // trick to override the response of an intercepted request
- // https://github.com/cypress-io/cypress/issues/9302
- cy.intercept(`${statusUrl}/**`, req => req.reply(responses.shift()))
- .as(`getSwhStatusData${i}`);
- cy.wait(`@getSwhStatusData${i}`);
+ cy.intercept(`${statusUrl}/**`, {
+ body: genStatusResponse(statusTestData[i].status, statusTestData[i].statusCode)
+ }).as(`getSwhStatusData`);
+ cy.wait(`@getSwhStatusData`);
cy.get('.swh-current-status-indicator').should('have.class', statusTestData[i].color);
cy.get('#swh-current-status-description').should('have.text', statusTestData[i].status);
- };
-
- checkStatusDisplay(0); // Operationnal
- checkStatusDisplay(1); // Scheduled Maintenance
- checkStatusDisplay(2); // Degraded Performance
- checkStatusDisplay(3); // Partial Service Disruption
- checkStatusDisplay(4); // Service Disruption
- checkStatusDisplay(5); // Security Event
+ }
});
diff --git a/package.json b/package.json
--- a/package.json
+++ b/package.json
@@ -67,7 +67,7 @@
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^9.0.1",
"css-loader": "^5.2.6",
- "cypress": "^7.7.0",
+ "cypress": "^8.0.0",
"cypress-hmr-restarter": "^2.0.2",
"cypress-multi-reporters": "^1.5.0",
"ejs": "^3.1.6",
@@ -135,4 +135,4 @@
"engines": {
"node": ">=12.0.0"
}
-}
\ No newline at end of file
+}
diff --git a/yarn.lock b/yarn.lock
--- a/yarn.lock
+++ b/yarn.lock
@@ -4578,10 +4578,10 @@
debug "^4.1.1"
lodash "^4.17.15"
-cypress@^7.7.0:
- version "7.7.0"
- resolved "https://registry.yarnpkg.com/cypress/-/cypress-7.7.0.tgz#0839ae28e5520536f9667d6c9ae81496b3836e64"
- integrity sha512-uYBYXNoI5ym0UxROwhQXWTi8JbUEjpC6l/bzoGZNxoKGsLrC1SDPgIDJMgLX/MeEdPL0UInXLDUWN/rSyZUCjQ==
+cypress@^8.0.0:
+ version "8.0.0"
+ resolved "https://registry.yarnpkg.com/cypress/-/cypress-8.0.0.tgz#bd68f4cff9ffb0c1176e9dd87d020cbdd0001ab8"
+ integrity sha512-Hhbc7FtbeCSg5Ui2zxXQLynk7IYGIygG8NqTauS4EtCWyp2k6s4g8P4KUZXwRbhuryN/+/dCd1kPtFbhBx8MuQ==
dependencies:
"@cypress/request" "^2.88.5"
"@cypress/xvfb" "^1.2.4"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 30, 3:41 PM (1 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218228
Attached To
D6008: cypress: Upgrade to 8.0 and fix flaky test
Event Timeline
Log In to Comment