steep-morning-65056
09/14/2022, 2:39 PMnutritious-army-46708
09/14/2022, 2:45 PMnutritious-army-46708
09/14/2022, 2:47 PMorange-shampoo-39617
09/14/2022, 3:23 PMcypress.config.ts
? The documentation I found (https://github.com/cypress-io/cypress/tree/master/npm/webpack-preprocessor#modifying-default-options) seems to use plugins
which are deprecatedpurple-train-63923
09/14/2022, 3:26 PMJSON.stringify(myfunction())
but got TS errorsclever-table-91477
09/14/2022, 4:40 PMcold-apartment-77594
09/14/2022, 4:41 PMorange-shampoo-39617
09/14/2022, 5:22 PMgray-kilobyte-89541
09/14/2022, 5:45 PM.should("contain", links[0].href)
should probably be .should("contain", links[index].href)
polite-jordan-30716
09/14/2022, 7:45 PMlimited-barista-33480
09/14/2022, 9:23 PMpurple-train-63923
09/14/2022, 11:37 PMcy.intercept('GET', `*/stable-url?${dynamicQuery}`)
delightful-microphone-80931
09/15/2022, 8:36 AMenough-author-35578
09/15/2022, 9:27 AMtestIsolation=legacy
option to prevent page reloads between tests that don't need to refresh the entire page.
Currently we do the following
js
beforeEach(() => {
cy.login()
cy.visit("/some-page-to-test")
})
Where cy.login()
is a custom command that uses cy.session()
to login as recommended in the docs.
Since we now no longer want to reset the page between every test. I've moved this code from beforeEach
to before
so we only run it once per suite.
This works fine for the first test, but after the first test it gets redirected to our login page since we no longer call cy.login()
between tests.
Splitting it up so we do the visit()
in before
and login
in beforeEach
seems like it should help, but this causes it to end up at the about:blank
page since cy.session()
seems to always clear the page after running, regardless of the testisolation
option.
If it is indeed the case that cy.session()
always clears the page, then I wonder what the point of the testIsolation
option is? Unless I am misunderstanding/misusing it?polite-painting-51763
09/15/2022, 10:26 AMspan:contains("${objText}")
).parents('div[class^=sc-]').find('input') this element is visible on UI then return the same or else
return cy.get(span:contains("${objText}")
).parents('div[class^=sc-]').find('Span') how can I write a code using cypress-if plugin?
Please note objText I am passing as an argument in the cypress commandgray-kilobyte-89541
09/15/2022, 10:29 AMcy.get(...).parents(...).find('input').if('not.exist').find('Span')
does not work?cool-fountain-61225
09/15/2022, 10:44 AMacceptable-hamburger-48790
09/15/2022, 11:25 AMpolite-painting-51763
09/15/2022, 11:33 AMcool-fountain-61225
09/15/2022, 11:38 AMpolite-painting-51763
09/15/2022, 11:53 AMgray-kilobyte-89541
09/15/2022, 1:18 PMpolite-painting-51763
09/15/2022, 1:38 PMbitter-fountain-36713
09/15/2022, 1:41 PMlittle-france-10142
09/15/2022, 1:42 PMcypress-firebase
library? Is that reliable? How's the upkeep? Any other suggestions?proud-breakfast-29892
09/15/2022, 3:04 PMcy.visit
, Cypress simply crashes without any error message.proud-breakfast-29892
09/15/2022, 3:06 PMproud-breakfast-29892
09/15/2022, 3:06 PMproud-breakfast-29892
09/15/2022, 3:07 PMts
const loginSaml = (userName: string, password: string, idpUrl: string) => {
cy.clearLocalStorage();
cy.clearCookies();
cy.origin('https://admin.us1.gigya.com', {args: idpUrl}, (url) => {
cy.request({
method: 'GET',
url
}).then(() => {
cy.request({
method: 'GET',
url: 'https://admin.us1.gigya.com/admin.console.getSamlSettingsByDomain?domainName=cdpe2e&isCDP=true'
});
});
});
};
it('Should manage permission in Universe & log-in using SAML', () => {
const idpUrl = `https://cdpe2e.my.st1.universe.cdp.gigya.com`;
loginSaml('a', 'b', idpUrl);
cy.visit(idpUrl);
proud-breakfast-29892
09/15/2022, 3:08 PM