Append address extension to a domain loaded in from fixture #14561
Unanswered
Alex-passiv
asked this question in
Component Testing
Replies: 1 comment
-
You can use cypress.env.json files. Create some files for each environments, like:
with content:
Add next code in
Before run tests, execute:
In tests you can use relative path, like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have created a file where I am loading in a fixture domain, this is in order to have cleaner tests and be able to test locally, beta and on prod without changing anything except for one fixture.
My question is, for pages that are extensions of the main domain, any ideas how i would append the extension to the read in fixture data? Is this even possible?
Here is my code:
cy.fixture('testDomain').as('server') cy.get('@server').then(domain => { cy.visit(domain.test) + "/app/help" })
currently it doesnt work like this but I kept it this way to make it easier to visualize what I want.
Cheers.
Beta Was this translation helpful? Give feedback.
All reactions