magnificent-finland-58048
01/13/2023, 2:50 PMearly-egg-66445
01/13/2023, 2:55 PMjs
context('Login', () => {
it('should visit /', () => {
cy.visit('/')
})
})
Then I close everything and run npx cypress open
again, it opens the browser at localhost:8001
, but as soon as I click any test, it reloads the browser page to keycloak:8080
. Not only the "child" browser, but the top level chrome being controlled by Cypressearly-egg-66445
01/13/2023, 2:56 PMearly-egg-66445
01/13/2023, 2:56 PMmagnificent-finland-58048
01/13/2023, 2:56 PMearly-egg-66445
01/13/2023, 2:57 PMmagnificent-finland-58048
01/13/2023, 2:57 PMearly-egg-66445
01/13/2023, 2:57 PMmagnificent-finland-58048
01/13/2023, 2:57 PMearly-egg-66445
01/13/2023, 2:58 PMearly-egg-66445
01/13/2023, 2:58 PMthankful-tomato-3609
01/13/2023, 3:46 PMabundant-tailor-4878
01/13/2023, 5:08 PMmagnificent-finland-58048
01/13/2023, 7:24 PMnarrow-artist-87113
01/14/2023, 5:53 AMnarrow-artist-87113
01/14/2023, 5:53 AMbitter-fountain-36713
01/14/2023, 6:33 AMnarrow-artist-87113
01/14/2023, 6:35 AMbitter-fountain-36713
01/14/2023, 6:36 AMnarrow-artist-87113
01/14/2023, 6:40 AMcolossal-mouse-44047
01/14/2023, 11:12 AMdescribe('Cypress 10 vs 12 migration investigation: Started breaking after login test.', () => {
it('Login: Works fine in Cypress 10 and 12.', () => {
cy.visit(url)
cy.contains(' Later✓').click() // Calibrate dialog
cy.get('[data-cy="login__email"]').type(email)
cy.get('[data-cy="login__password"]').type(pwd)
cy.get('[data-cy="login__submit"]').click()
cy.wait(15000)
});
it('Select Location: Breaks in Cypress 12.', () => {
// When this test start, the following is shown in the TEST BODY:
// (xhr)POST /api/Practitioners/logout?
// and the Cypress App shows "Default blank page"
cy.contains('22123001').click(); // Pick this location from the list.
cy.contains('Yes').click(); // Location selection confirmation.
})
})
gray-kilobyte-89541
01/14/2023, 3:42 PMmodern-dawn-86006
01/14/2023, 5:00 PMit('Select Location: Breaks in Cypress 12.', () => {
// When this test start, the following is shown in the TEST BODY:
// (xhr)POST /api/Practitioners/logout?
// and the Cypress App shows "Default blank page"
cy.contains('22123001').click(); // Pick this location from the list.
cy.contains('Yes').click(); // Location selection confirmation.
})
If this is your test where the code breaks, it maybe because you are not vising the website.
cy.visit is missingmodern-dawn-86006
01/14/2023, 5:02 PMcolossal-mouse-44047
01/14/2023, 8:21 PMcolossal-mouse-44047
01/14/2023, 9:14 PMdescribe('Cypress 10 vs 12 migration investigation: Started breaking after login test.',{testIsolation: false}, () => {
clever-salesmen-46486
01/14/2023, 10:03 PMlively-balloon-98986
01/15/2023, 7:52 AMpowerful-orange-86819
01/15/2023, 9:47 AMpowerful-orange-86819
01/15/2023, 9:48 AM