AP
Size: a a a
AP
Т
Т
AP
Т
Т
AP
Т
Т
Sb
Sb
const fs = require('fs-extra')
const path = require('path')
function getConfigurationByFile (file) {
const pathToConfigFile = path.resolve('.', 'cypress', 'config', `${file}.json`)
return fs.readJson(pathToConfigFile)
}
module.exports = (on, config) => {
// accept a configFile value or use release by default
const file = config.env.configFile || 'rigel'
return getConfigurationByFile(file)
}
"cy.run:prod": "npm run cy.run -- --env configFile=production",
"cy.run:dev": "npm run cy.run -- --env configFile=development",
"cy.run": "cypress run --browser chrome --spec \"cypress/integration/front/folder_to_run_only_this_tests/**/*\" ",
Sb
"trip_id:{"thai_railway":33292,"violette_express":128858}
"trip_id_thai_railway": "33292",
"trip_desc_thai_railway": "2nd Class Sleeper AC",
"trip_id_violette_express": "128858",
"trip_desc_violette_express": "VIP Sleeper 4x",
D
const fs = require('fs-extra')
const path = require('path')
function getConfigurationByFile (file) {
const pathToConfigFile = path.resolve('.', 'cypress', 'config', `${file}.json`)
return fs.readJson(pathToConfigFile)
}
module.exports = (on, config) => {
// accept a configFile value or use release by default
const file = config.env.configFile || 'rigel'
return getConfigurationByFile(file)
}
"cy.run:prod": "npm run cy.run -- --env configFile=production",
"cy.run:dev": "npm run cy.run -- --env configFile=development",
"cy.run": "cypress run --browser chrome --spec \"cypress/integration/front/folder_to_run_only_this_tests/**/*\" ",
Sb
"cy.run": "cypress run --browser chrome --spec \"cypress/integration/front/folder_to_run_only_this_tests/**/*\" ",
Sb
D
"cy.run": "cypress run --browser chrome --spec \"cypress/integration/front/folder_to_run_only_this_tests/**/*\" ",
Sb
it('runs if task returns production', () => {
cy.task('getDbName').then(name => cy.onlyOn(name === 'production'))
// equivalent
cy.task('getDbName').then(name => onlyOn(name === 'production'))
// equivalent
cy.task('getDbName')
.then(name => name === 'production')
.then(onlyOn)
})
OK
RS
RS