silly-laptop-48411
09/19/2022, 12:15 AMbrash-magazine-98754
09/19/2022, 6:30 AMsilly-laptop-48411
09/19/2022, 6:57 AMstrong-horse-65997
09/19/2022, 7:08 AMfast-motherboard-28167
09/19/2022, 7:33 AMcold-van-45410
09/19/2022, 8:01 AMsalmon-hydrogen-86446
09/19/2022, 10:47 AMsalmon-hydrogen-86446
09/19/2022, 10:48 AMmysterious-belgium-25713
09/19/2022, 10:48 AMsalmon-hydrogen-86446
09/19/2022, 10:50 AMsalmon-hydrogen-86446
09/19/2022, 10:50 AMhundreds-diamond-79222
09/19/2022, 11:29 AMblue-battery-71202
09/19/2022, 12:02 PMfull-yacht-67771
09/19/2022, 12:44 PMmysterious-belgium-25713
09/19/2022, 12:50 PMjs
import * as myJson from '../../fixtures/example.json'
describe('Actions', () => {
it("json file reading", ()=> {
cy.log(myJson.name)
cy.log(myJson.email)
})
})
mysterious-belgium-25713
09/19/2022, 12:50 PMfull-yacht-67771
09/19/2022, 12:54 PMfew-umbrella-8290
09/19/2022, 3:31 PMsparse-plastic-94963
09/19/2022, 3:36 PMvictorious-father-41976
09/19/2022, 5:45 PMadventurous-zoo-38990
09/19/2022, 7:10 PMripe-account-85587
09/20/2022, 5:51 AMflaky-mouse-81684
09/20/2022, 6:16 AMstrong-cat-47196
09/20/2022, 6:43 AMmysterious-belgium-25713
09/20/2022, 7:27 AMsilly-laptop-48411
09/20/2022, 7:49 AMts
cy.visit(url).get('.thing').should('not.exist'); // always passes (false positive potentially)
cy.visit(url).get('.first').get('.thing').should('not.exist'); // correctly passes
In this instance, if I change .first
to another name or remove it, then the test is impacted even though it is not a concern or focus of this particular test, rather it is a means to an end.
What the more common or correct approach to this test?cold-apartment-77594
09/20/2022, 7:52 AMplugins/index.js
file. The old file looks as follows.
const fs = require('fs-extra')
const path = require('path')
module.exports = (on, config) => {
const file = config.env.configFile || 'development'
const pathToConfigFile = path.resolve('config', `${file}.json`)
return fs.readJson(pathToConfigFile)
}
Where the config files look as follows.
{
"baseUrl": "https://local.example.com",
"cypressEnv": "local",
"gtmId": "ID-666",
"video": false
}
I had a look at the migration guide and it seems that I have to move this logic into the setupNodeEvents()
function. However, I have no idea how to set for example baseUrl
and cypressEnv
inside setupNodeEvents()
. Any help would be appreciated.strong-cat-47196
09/20/2022, 8:40 AMvictorious-father-41976
09/20/2022, 9:26 AMadorable-easter-66676
09/20/2022, 3:48 PM