victorious-telephone-50839
02/06/2022, 10:38 AMglamorous-coat-65256
02/07/2022, 9:14 AMpowerful-orange-86819
02/07/2022, 11:09 AMbillowy-spoon-30011
02/07/2022, 11:15 AMcreamy-train-56346
02/07/2022, 1:43 PMable-microphone-67346
02/07/2022, 3:13 PMlocalhost:3000
I tried using baseUrl:"my-website.com"
and I see that baseUrl
is setting up correctly in config, but the cypress browser is still opening localhost:3000
any advice is appreciated 🙏flat-pizza-70339
02/07/2022, 6:12 PMcy.tick()
breaks the test.
https://dashboard.cypress.io/projects/2ckppp/runs/373/test-results/0ae7e4fd-88a4-445f-89f4-bcdeab828eb3?utm_source=github&statuses=%5B%7B%22value%22%3A%22FAILED%22%2C%22label%22%3A%22FAILED%22%7D%5D
Is there any workaround for this issue?
Thanks!adventurous-dream-20049
02/07/2022, 7:03 PMbeforeEach
hook is a good approach, another option is to use the experimental sessions API. This saves times by not needing to request the auth application prior to every test. Here are some docs: https://docs.cypress.io/api/commands/session#Syntaxadventurous-dream-20049
02/07/2022, 8:38 PMcy.visit()
? If you changed your base URL, you would only need to use "/"
2. Are you visiting your URL in a custom command or `before`/`beforeEach` where the visit command may have not been updated?
3. Have you tried manually saving and restarting your tests in your IDE? I often rely on the auto-save, but found when I make changes to my config, I need to restart the Cypress app and manually save in VS Code before my changes take effect.able-microphone-67346
02/08/2022, 8:11 AMmount
component before testing, not cy.visit()
or before/beforeEach
. Attaching image for more infoadamant-magazine-53646
02/08/2022, 8:19 AMadamant-magazine-53646
02/08/2022, 8:19 AMadamant-magazine-53646
02/08/2022, 8:20 AMcool-laptop-34247
02/08/2022, 1:29 PMI am at the {string} website
, (webSite) => {
cy.visit('https://'+webSite+url);
cy.url().should('include', webSite);
});
When(I am on the homepage
, () => {
cy.url().should('include', '.test.xxxxx.com/');
});
Then(I click on "inloggen"
, () => {
cy.get('.register-link.underline').should('be.visible').click();
});
After this click my test dies, no matter what.
When i put a cy.log behind it, to test if it gets to that command, it does not.
As you can see in the screenshot, it tries to redirect to another website for authorisation.
I'm actually clueless right now. What can i do to make this work?
If i need to provide other information, please let me know. I hope that someone can help me out.
Versions:
Cypress 9.4.1
Gherkin 9.0.0
Cucumber 7.3.2mysterious-area-98742
02/08/2022, 1:42 PMthis.user = 'input[type="email"]'
), but I also have contains
selectors.
It is weird (but possible?) to create this.forgot = ['a', 'Forgot password']
kind of selectors (and then maybe cy.contains(*this.forgot)
); but I'd like to declare them at construction time. (Inspiration: https://playwright.dev/docs/test-pom)
However, at construction time, cy
is not callable.
I was wondering if there is something like Cypress.Commands.add('login', (...) => { ... })
that would, however, allow me to assign it to a variable instead (i.e. it would return the function, instead of polluting the cy
namespace).brainy-photographer-13281
02/08/2022, 2:09 PMvictorious-telephone-50839
02/08/2022, 4:15 PMadventurous-dream-20049
02/08/2022, 7:28 PMlimited-keyboard-75773
02/08/2022, 10:02 PMit()
block that failed in a given test file in the afterEach
hook. For instance:
let failureItBlocks = []
beforeEach(() => {
Cypress.on('fail', function () {
failureItBlocks.push(this.currentTest)
})
})
// bunch of it() blocks & assertions
after(() => {
// run all test in the failureItBlocks here again
cypress.run(failureItBlocks)
})
limited-keyboard-75773
02/08/2022, 10:02 PMbulky-sundown-74498
02/08/2022, 10:16 PMbulky-sundown-74498
02/08/2022, 10:16 PMbulky-sundown-74498
02/08/2022, 10:17 PMlimited-keyboard-75773
02/08/2022, 10:39 PM{ retries: 3 }
object in the it
block. This is promising though https://docs.cypress.io/guides/guides/test-retries#Only-upload-videos-for-specs-with-failing-or-retried-tests is the results.tests
an it
block or the entire test file?bulky-sundown-74498
02/08/2022, 10:41 PMlimited-keyboard-75773
02/08/2022, 11:14 PMmysterious-area-98742
02/08/2022, 11:31 PMadventurous-dream-20049
02/09/2022, 1:24 AMyarn add cypress@latest
or npm install cypress@latest
wonderful-match-15836
02/09/2022, 1:59 AMmysterious-area-98742
02/09/2022, 6:15 AM