Skip to content

Commit

Permalink
Upgrades cypress to 13.15.1 (elastic#198715)
Browse files Browse the repository at this point in the history
## Summary

This PR upgrades cypress to `13.15.1`. This is needed to fix an very
annoying issue where Cypress tests hangs when ran locally and when the
window is not focused

See Cypress issue here:
cypress-io/cypress#28392

---------

Co-authored-by: PhilippeOberti <[email protected]>
  • Loading branch information
michaelolo24 and PhilippeOberti authored Nov 26, 2024
1 parent f43a860 commit 1865869
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 47 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1701,7 +1701,7 @@
"cssnano": "^5.1.12",
"cssnano-preset-default": "^5.2.12",
"csstype": "^3.0.2",
"cypress": "13.6.3",
"cypress": "13.15.2",
"cypress-axe": "^1.5.0",
"cypress-file-upload": "^5.0.8",
"cypress-multi-reporters": "^1.6.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ export default defineCypressConfig({
baseUrl: 'http://localhost:5601',
supportFile: './cypress/support/e2e.ts',
specPattern: './cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
experimentalMemoryManagement: true,
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ describe('Service inventory', () => {
it('with the correct environment when changing the environment', () => {
cy.wait(mainAliasNames);

cy.getByTestSubj('environmentFilter').type('{selectall}production');

cy.contains('button', 'production').click();
cy.getByTestSubj('environmentFilter').find('input').click();
cy.getByTestSubj('comboBoxOptionsList environmentFilter-optionsList').should('be.visible');
cy.getByTestSubj('comboBoxOptionsList environmentFilter-optionsList')
.contains('button', 'production')
.click();

cy.expectAPIsToHaveBeenCalledWith({
apisIntercepted: mainAliasNames,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,19 +191,10 @@ describe('Service Overview', () => {
it('with the correct environment when changing the environment', () => {
cy.wait(aliasNames);

cy.intercept('GET', 'internal/apm/suggestions?*').as('suggestionsRequest');

cy.getByTestSubj('environmentFilter')
.find('input')
.type('{selectall}production', { force: true });

cy.expectAPIsToHaveBeenCalledWith({
apisIntercepted: ['@suggestionsRequest'],
value: 'fieldValue=production',
});

cy.getByTestSubj('environmentFilter').find('input').click();
cy.getByTestSubj('comboBoxOptionsList environmentFilter-optionsList')
.contains('production')
.should('be.visible')
.contains('button', 'production')
.click({ force: true });

cy.expectAPIsToHaveBeenCalledWith({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,18 @@ describe('Agent configuration', () => {
'serviceEnvironmentApi'
);
cy.contains('Create configuration').click();
cy.getByTestSubj('serviceNameComboBox').click().type('opbeans-node').type('{enter}');

cy.contains('opbeans-node').realClick();
cy.getByTestSubj('serviceNameComboBox').find('input').click();
cy.getByTestSubj('serviceNameComboBox').type('opbeans-node{enter}');
cy.wait('@serviceEnvironmentApi');

cy.getByTestSubj('serviceEnviromentComboBox')
.click({ force: true })
.type('prod')
.type('{enter}');
cy.contains('production').realClick();
cy.getByTestSubj('serviceEnviromentComboBox').find('input').click();
cy.getByTestSubj('comboBoxOptionsList serviceEnviromentComboBox-optionsList').should(
'be.visible'
);
cy.getByTestSubj('comboBoxOptionsList serviceEnviromentComboBox-optionsList')
.contains('button', 'production')
.click();

cy.contains('Next step').click();
cy.contains('Create configuration');
cy.contains('Edit').click();
Expand All @@ -152,13 +154,23 @@ describe('Agent configuration', () => {
'serviceEnvironmentApi'
);
cy.contains('Create configuration').click();
cy.getByTestSubj('serviceNameComboBox').click().type('All').type('{enter}');
cy.contains('All').realClick();
cy.getByTestSubj('serviceNameComboBox').find('input').type('All{enter}');
cy.getByTestSubj('serviceNameComboBox').find('input').click();
cy.getByTestSubj('comboBoxOptionsList serviceNameComboBox-optionsList').should('be.visible');

cy.getByTestSubj('comboBoxOptionsList serviceNameComboBox-optionsList')
.contains('button', 'All')
.click();
cy.wait('@serviceEnvironmentApi');

cy.getByTestSubj('serviceEnviromentComboBox').click({ force: true }).type('All');
cy.getByTestSubj('serviceEnviromentComboBox').find('input').click();
cy.getByTestSubj('comboBoxOptionsList serviceEnviromentComboBox-optionsList').should(
'be.visible'
);
cy.getByTestSubj('comboBoxOptionsList serviceEnviromentComboBox-optionsList')
.contains('button', 'All')
.click();

cy.get('mark').contains('All').click({ force: true });
cy.contains('Next step').click();
cy.get('[data-test-subj="settingsPage_serviceName"]').contains('All');
cy.get('[data-test-subj="settingsPage_environmentName"]').contains('All');
Expand Down
37 changes: 18 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,7 @@
find-test-names "^1.19.0"
globby "^11.0.4"

"@cypress/request@^3.0.0":
"@cypress/request@^3.0.6":
version "3.0.6"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.6.tgz#f5580add6acee0e183b4d4e07eff4f31327ae12b"
integrity sha512-fi0eVdCOtKu5Ed6+E8mYxUF6ZTFJDZvHogCBelM0xVXmrDEkyM22gRArQzq1YcHPm1V47Vf/iAD+WgVdUlJCGg==
Expand Down Expand Up @@ -14678,7 +14678,7 @@ buffer@^4.3.0:
ieee754 "^1.1.4"
isarray "^1.0.0"

buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0:
buffer@^5.2.1, buffer@^5.5.0, buffer@^5.7.1:
version "5.7.1"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
Expand Down Expand Up @@ -15179,6 +15179,11 @@ ci-info@^3.2.0:
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91"
integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==

ci-info@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.0.0.tgz#65466f8b280fc019b9f50a5388115d17a63a44f2"
integrity sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==

cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de"
Expand Down Expand Up @@ -16292,22 +16297,23 @@ cypress-recurse@^1.35.2:
dependencies:
humanize-duration "^3.27.3"

cypress@13.6.3:
version "13.6.3"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.6.3.tgz#54f03ca07ee56b2bc18211e7bd32abd2533982ba"
integrity sha512-d/pZvgwjAyZsoyJ3FOsJT5lDsqnxQ/clMqnNc++rkHjbkkiF2h9s0JsZSyyH4QXhVFW3zPFg82jD25roFLOdZA==
cypress@13.15.2:
version "13.15.2"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.15.2.tgz#ef19554c274bc4ff23802aeb5c52951677fa67f1"
integrity sha512-ARbnUorjcCM3XiPwgHKuqsyr5W9Qn+pIIBPaoilnoBkLdSC2oLQjV1BUpnmc7KR+b7Avah3Ly2RMFnfxr96E/A==
dependencies:
"@cypress/request" "^3.0.0"
"@cypress/request" "^3.0.6"
"@cypress/xvfb" "^1.2.4"
"@types/sinonjs__fake-timers" "8.1.1"
"@types/sizzle" "^2.3.2"
arch "^2.2.0"
blob-util "^2.0.2"
bluebird "^3.7.2"
buffer "^5.6.0"
buffer "^5.7.1"
cachedir "^2.3.0"
chalk "^4.1.0"
check-more-types "^2.24.0"
ci-info "^4.0.0"
cli-cursor "^3.1.0"
cli-table3 "~0.6.1"
commander "^6.2.1"
Expand All @@ -16322,7 +16328,6 @@ [email protected]:
figures "^3.2.0"
fs-extra "^9.1.0"
getos "^3.2.1"
is-ci "^3.0.0"
is-installed-globally "~0.4.0"
lazy-ass "^1.6.0"
listr2 "^3.8.3"
Expand All @@ -16336,7 +16341,8 @@ [email protected]:
request-progress "^3.0.0"
semver "^7.5.3"
supports-color "^8.1.1"
tmp "~0.2.1"
tmp "~0.2.3"
tree-kill "1.2.2"
untildify "^4.0.0"
yauzl "^2.10.0"

Expand Down Expand Up @@ -21245,13 +21251,6 @@ is-ci@^2.0.0:
dependencies:
ci-info "^2.0.0"

is-ci@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867"
integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==
dependencies:
ci-info "^3.2.0"

is-core-module@^2.11.0, is-core-module@^2.12.1, is-core-module@^2.13.0:
version "2.13.1"
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384"
Expand Down Expand Up @@ -31160,7 +31159,7 @@ tmp@^0.0.33:
dependencies:
os-tmpdir "~1.0.2"

tmp@^0.2.3, tmp@~0.2.1:
tmp@^0.2.3, tmp@~0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae"
integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==
Expand Down Expand Up @@ -31315,7 +31314,7 @@ traverse@^0.6.6, traverse@~0.6.6:
resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137"
integrity sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=

tree-kill@^1.2.2:
tree-kill@1.2.2, tree-kill@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc"
integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==
Expand Down

0 comments on commit 1865869

Please sign in to comment.