Skip to content

Commit

Permalink
[7.17] Bump cypress@13.3.0 (#162383) (#167738)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `7.17`:
- [Bump cypress@13.3.0
(#162383)](#162383)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Patryk
Kopyciński","email":"contact@patrykkopycinski.com"},"sourceCommit":{"committedDate":"2023-10-01T08:55:01Z","message":"Bump
cypress@13.3.0 (#162383)\n\n## Summary\r\n\r\nBump Cypress-related
dependencies to the latest versions and update\r\n`renovate.json` to do
it automatically in the future\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Gloria Hornero
<gloria.hornero@elastic.co>","sha":"924664fc79d29a3f77014902c1d7d24537a5d9e3","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:APM","release_note:skip","Team:Fleet","ci:all-cypress-suites","backport:prev-minor","backport:prev-MAJOR","v8.11.0"],"number":162383,"url":"https://github.com/elastic/kibana/pull/162383","mergeCommit":{"message":"Bump
cypress@13.3.0 (#162383)\n\n## Summary\r\n\r\nBump Cypress-related
dependencies to the latest versions and update\r\n`renovate.json` to do
it automatically in the future\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Gloria Hornero
<gloria.hornero@elastic.co>","sha":"924664fc79d29a3f77014902c1d7d24537a5d9e3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/162383","number":162383,"mergeCommit":{"message":"Bump
cypress@13.3.0 (#162383)\n\n## Summary\r\n\r\nBump Cypress-related
dependencies to the latest versions and update\r\n`renovate.json` to do
it automatically in the future\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Gloria Hornero
<gloria.hornero@elastic.co>","sha":"924664fc79d29a3f77014902c1d7d24537a5d9e3"}}]}]
BACKPORT-->

---------

Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co>
  • Loading branch information
patrykkopycinski and MadameSheema authored Oct 2, 2023
1 parent 8794d36 commit ea08ee4
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 62 deletions.
4 changes: 2 additions & 2 deletions .buildkite/pipelines/pull_request/security_solution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ steps:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 60
parallelism: 10
parallelism: 16
retry:
automatic:
- exit_status: '*'
Expand All @@ -18,7 +18,7 @@ steps:
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
timeout_in_minutes: 60
parallelism: 1
soft_fail: true
artifact_paths:
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"**/@babel/traverse": "^7.21.2",
"**/@babel/types": "^7.21.2",
"**/@types/babel__generator/@babel/types": "^7.21.0",
"**/@types/node": "18.17.1",
"**/@types/node": "18.17.5",
"**/@types/react": "^16.14.25",
"**/@types/react-dom": "^16.9.8",
"**/@typescript-eslint/utils": "5.62.0",
Expand Down Expand Up @@ -581,7 +581,7 @@
"@types/mustache": "^0.8.31",
"@types/ncp": "^2.0.1",
"@types/nock": "^10.0.3",
"@types/node": "18.17.1",
"@types/node": "18.17.5",
"@types/node-fetch": "2.6.4",
"@types/node-forge": "^1.3.1",
"@types/nodemailer": "^6.4.0",
Expand Down Expand Up @@ -680,12 +680,12 @@
"cpy": "^8.1.1",
"css-loader": "^3.4.2",
"cssnano": "5.0.0",
"cypress": "12.17.4",
"cypress-axe": "^1.4.0",
"cypress": "^13.3.0",
"cypress-axe": "^1.5.0",
"cypress-file-upload": "^5.0.8",
"cypress-multi-reporters": "^1.6.3",
"cypress-pipe": "^2.0.0",
"cypress-real-events": "^1.10.0",
"cypress-real-events": "^1.10.3",
"debug": "^2.6.9",
"delete-empty": "^2.0.0",
"dependency-check": "^4.1.0",
Expand Down
6 changes: 5 additions & 1 deletion x-pack/plugins/apm/ftr_e2e/cypress_start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ export function cypressRunTests(spec?: string) {
return async ({ getService }: FtrProviderContext) => {
const result = await cypressStart(getService, cypress.run, spec);

if (result && (result.status === 'failed' || result.totalFailed > 0)) {
if (
(result as CypressCommandLine.CypressFailedRunResult)?.status ===
'failed' ||
(result as CypressCommandLine.CypressRunResult)?.totalFailed
) {
throw new Error(`APM Cypress tests failed`);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* 2.0.
*/

import { waitForAlertsToPopulate } from 'cypress/tasks/create_new_rule';
import {
ALERT_FLYOUT,
CELL_TEXT,
Expand All @@ -13,11 +14,7 @@ import {
TABLE_ROWS,
} from '../../screens/alerts_details';

import {
expandFirstAlert,
waitForAlertsIndexToBeCreated,
waitForAlertsPanelToBeLoaded,
} from '../../tasks/alerts';
import { expandFirstAlert } from '../../tasks/alerts';
import { openJsonView, openTable } from '../../tasks/alerts_details';
import { createCustomRuleActivated } from '../../tasks/api_calls/rules';
import { cleanKibana } from '../../tasks/common';
Expand All @@ -32,12 +29,9 @@ describe('Alert details with unmapped fields', () => {
beforeEach(() => {
cleanKibana();
esArchiverLoad('unmapped_fields');
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
waitForAlertsPanelToBeLoaded();
waitForAlertsIndexToBeCreated();
createCustomRuleActivated(getUnmappedRule());
loginAndWaitForPageWithoutDateRange(ALERTS_URL);
waitForAlertsPanelToBeLoaded();
waitForAlertsToPopulate();
expandFirstAlert();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,9 @@ ${JSON.stringify(cyCustomEnv, null, 2)}
renderSummaryTable(results as CypressCommandLine.CypressRunResult[]);
const hasFailedTests = _.some(
results,
(result) => result?.status === 'finished' && result.totalFailed > 0
(result) =>
(result as CypressCommandLine.CypressFailedRunResult)?.status === 'failed' ||
(result as CypressCommandLine.CypressRunResult)?.totalFailed
);
if (hasFailedTests) {
throw createFailError('Not all tests passed');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ export function renderSummaryTable(results: CypressCommandLine.CypressRunResult[
const parsedResults = _.reduce(
results,
(acc: CypressCommandLine.CypressRunResult, result) => {
acc.status = result.status;
acc.startedTestsAt =
acc.startedTestsAt && new Date(result.startedTestsAt) > new Date(acc.startedTestsAt)
? acc.startedTestsAt
Expand Down Expand Up @@ -358,12 +357,8 @@ export function renderSummaryTable(results: CypressCommandLine.CypressRunResult[

_.each(runs, (run) => {
const { spec, stats } = run;
const ms = durationInMinutes(stats.duration);
const formattedSpec = formatPath(spec.relativeToCommonRoot, getWidth(table2, 1));

if (run.skippedSpec) {
return table2.push(['-', formattedSpec, color('SKIPPED', 'gray'), '-', '-', '-', '-', '-']);
}
const ms = durationInMinutes(stats?.duration ?? 0);
const formattedSpec = formatPath(spec.relative, getWidth(table2, 1));

return table2.push([
formatSymbolSummary(stats.failures),
Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/security_solution/cypress/tasks/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ export const addDescriptionToTimeline = (description: string) => {

export const addNameToTimeline = (name: string) => {
cy.get(TIMELINE_EDIT_MODAL_OPEN_BUTTON).first().click();
cy.get(TIMELINE_TITLE_INPUT).should('exist');
cy.get(TIMELINE_TITLE_INPUT).should('be.visible');
cy.get(TIMELINE_TITLE_INPUT).type(`${name}{enter}`);
cy.get(TIMELINE_TITLE_INPUT).should('have.attr', 'value', name);
cy.get(TIMELINE_EDIT_MODAL_SAVE_BUTTON).click();
Expand All @@ -98,6 +100,8 @@ export const addNameToTimeline = (name: string) => {

export const addNameAndDescriptionToTimeline = (timeline: Timeline) => {
cy.get(TIMELINE_EDIT_MODAL_OPEN_BUTTON).first().click();
cy.get(TIMELINE_TITLE_INPUT).should('exist');
cy.get(TIMELINE_TITLE_INPUT).should('be.visible');
cy.get(TIMELINE_TITLE_INPUT).type(`${timeline.title}{enter}`);
cy.get(TIMELINE_TITLE_INPUT).should('have.attr', 'value', timeline.title);
cy.get(TIMELINE_DESCRIPTION_INPUT).type(timeline.description);
Expand Down
67 changes: 30 additions & 37 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1635,10 +1635,10 @@
find-test-names "^1.19.0"
globby "^11.0.4"

"@cypress/request@2.88.12":
version "2.88.12"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.12.tgz#ba4911431738494a85e93fb04498cb38bc55d590"
integrity sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA==
"@cypress/request@^3.0.0":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.1.tgz#72d7d5425236a2413bd3d8bb66d02d9dc3168960"
integrity sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==
dependencies:
aws-sign2 "~0.7.0"
aws4 "^1.8.0"
Expand All @@ -1653,7 +1653,7 @@
json-stringify-safe "~5.0.1"
mime-types "~2.1.19"
performance-now "^2.1.0"
qs "~6.10.3"
qs "6.10.4"
safe-buffer "^5.1.2"
tough-cookie "^4.1.3"
tunnel-agent "^0.6.0"
Expand Down Expand Up @@ -6331,10 +6331,10 @@
dependencies:
"@types/node" "*"

"@types/node@*", "@types/node@18.17.1", "@types/node@>= 8", "@types/node@>=8.9.0", "@types/node@^10.1.0", "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0", "@types/node@^16.18.39":
version "18.17.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.1.tgz#84c32903bf3a09f7878c391d31ff08f6fe7d8335"
integrity sha512-xlR1jahfizdplZYRU59JlUx9uzF1ARa8jbhM11ccpCJya8kvos5jwdm2ZAgxSCwOl0fq21svP18EVwPBXMQudw==
"@types/node@*", "@types/node@18.17.5", "@types/node@>= 8", "@types/node@>=8.9.0", "@types/node@^10.1.0", "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0", "@types/node@^18.17.5":
version "18.17.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.5.tgz#c58b12bca8c2a437b38c15270615627e96dd0bc5"
integrity sha512-xNbS75FxH6P4UXTPUJp/zNPq6/xsfdJKussCWNOnz4aULWIRwMgP1LgaB5RiBnMX1DPCYenuqGZfnIAx5mbFLA==

"@types/nodemailer@^6.4.0":
version "6.4.0"
Expand Down Expand Up @@ -11127,10 +11127,10 @@ cyclist@~0.2.2:
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640"
integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA=

cypress-axe@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/cypress-axe/-/cypress-axe-1.4.0.tgz#e67482bfe9e740796bf77c7823f19781a8a2faff"
integrity sha512-Ut7NKfzjyKm0BEbt2WxuKtLkIXmx6FD2j0RwdvO/Ykl7GmB/qRQkwbKLk3VP35+83hiIr8GKD04PDdrTK5BnyA==
cypress-axe@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/cypress-axe/-/cypress-axe-1.5.0.tgz#95082734583da77b51ce9b7784e14a442016c7a1"
integrity sha512-Hy/owCjfj+25KMsecvDgo4fC/781ccL+e8p+UUYoadGVM2ogZF9XIKbiM6KI8Y3cEaSreymdD6ZzccbI2bY0lQ==

cypress-file-upload@^5.0.8:
version "5.0.8"
Expand All @@ -11150,21 +11150,19 @@ cypress-pipe@^2.0.0:
resolved "https://registry.yarnpkg.com/cypress-pipe/-/cypress-pipe-2.0.0.tgz#577df7a70a8603d89a96dfe4092a605962181af8"
integrity sha512-KW9s+bz4tFLucH3rBGfjW+Q12n7S4QpUSSyxiGrgPOfoHlbYWzAGB3H26MO0VTojqf9NVvfd5Kt0MH5XMgbfyg==

cypress-real-events@^1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/cypress-real-events/-/cypress-real-events-1.10.0.tgz#6827ae4667561471c2a86bb4be30061fa9b177b8"
integrity sha512-ALSdCiG+Rj3Sl6qooqTFeFGBxOIe8QJUcgIuJ6ZVBanTEijXRzqxqstMC2ZKfixqj1TyNjolyZU4zOoN/jtHpg==
dependencies:
prettier "^3.0.0"
cypress-real-events@^1.10.3:
version "1.10.3"
resolved "https://registry.yarnpkg.com/cypress-real-events/-/cypress-real-events-1.10.3.tgz#e2e949ea509cc4306df6c238de1a9982d67360e5"
integrity sha512-YN3fn+CJIAM638sE6uMvv2/n3PsWowdd0rOiN6ZoyezNAMyENfuQHvccLKZpN+apGfQZYetCml6QXLYgDid2fg==

cypress@12.17.4:
version "12.17.4"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.17.4.tgz#b4dadf41673058493fa0d2362faa3da1f6ae2e6c"
integrity sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ==
cypress@^13.3.0:
version "13.3.0"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.3.0.tgz#d00104661b337d662c5a4280a051ee59f8aa1e31"
integrity sha512-mpI8qcTwLGiA4zEQvTC/U1xGUezVV4V8HQCOYjlEOrVmU1etVvxOjkCXHGwrlYdZU/EPmUiWfsO3yt1o+Q2bgw==
dependencies:
"@cypress/request" "2.88.12"
"@cypress/request" "^3.0.0"
"@cypress/xvfb" "^1.2.4"
"@types/node" "^16.18.39"
"@types/node" "^18.17.5"
"@types/sinonjs__fake-timers" "8.1.1"
"@types/sizzle" "^2.3.2"
arch "^2.2.0"
Expand Down Expand Up @@ -22694,11 +22692,6 @@ prettier@^2.7.1:
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64"
integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==

prettier@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.0.tgz#e7b19f691245a21d618c68bc54dc06122f6105ae"
integrity sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==

pretty-bytes@^5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb"
Expand Down Expand Up @@ -23087,6 +23080,13 @@ q@^1.5.1:
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=

qs@6.10.4:
version "6.10.4"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.4.tgz#6a3003755add91c0ec9eacdc5f878b034e73f9e7"
integrity sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==
dependencies:
side-channel "^1.0.4"

qs@6.11.0:
version "6.11.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
Expand All @@ -23101,13 +23101,6 @@ qs@^6.10.0, qs@^6.11.0, qs@^6.7.0:
dependencies:
side-channel "^1.0.4"

qs@~6.10.3:
version "6.10.5"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.5.tgz#974715920a80ff6a262264acd2c7e6c2a53282b4"
integrity sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ==
dependencies:
side-channel "^1.0.4"

qs@~6.5.2:
version "6.5.3"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.3.tgz#3aeeffc91967ef6e35c0e488ef46fb296ab76aad"
Expand Down

0 comments on commit ea08ee4

Please sign in to comment.