mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-06 15:20:25 -06:00
server: remove defaults.js from being scaffolded. update on.cypress.io links
This commit is contained in:
@@ -1 +1,2 @@
|
||||
__snapshots__
|
||||
packages/server/lib/scaffold/index.js
|
||||
|
||||
@@ -97,9 +97,8 @@ module.exports = {
|
||||
return Promise.resolve() if not config.supportFile or not isDefault(config, "supportFile")
|
||||
|
||||
@verifyScaffolding(folder, =>
|
||||
log("copying defaults and commands to #{folder}")
|
||||
log("copying index and commands to #{folder}")
|
||||
Promise.join(
|
||||
@_copy("defaults.js", folder, config)
|
||||
@_copy("commands.js", folder, config)
|
||||
@_copy("index.js", folder, config)
|
||||
)
|
||||
@@ -161,7 +160,6 @@ module.exports = {
|
||||
log "supporting files from folder #{config.supportFolder}"
|
||||
files = files.concat([
|
||||
getFilePath(config.supportFolder, "commands.js")
|
||||
getFilePath(config.supportFolder, "defaults.js")
|
||||
getFilePath(config.supportFolder, "index.js")
|
||||
])
|
||||
log("scaffolded files %j", files)
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
// ***********************************************
|
||||
// This example defaults.js shows you how to
|
||||
// customize the internal behavior of Cypress.
|
||||
//
|
||||
// The defaults.js file is a great place to
|
||||
// override defaults used throughout all tests.
|
||||
//
|
||||
// ***********************************************
|
||||
//
|
||||
// Cypress.Server.defaults({
|
||||
// delay: 500,
|
||||
// whitelist: function(xhr){}
|
||||
// })
|
||||
|
||||
// Cypress.Cookies.defaults({
|
||||
// whitelist: ["session_id", "remember_token"]
|
||||
// })
|
||||
@@ -10,14 +10,12 @@
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/guides/configuration#section-global
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js and defaults.js
|
||||
// Import commands.js
|
||||
// using ES2015 syntax:
|
||||
import "./commands"
|
||||
import "./defaults"
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require("./commands")
|
||||
// require("./defaults")
|
||||
|
||||
@@ -389,8 +389,6 @@ describe "lib/cypress", ->
|
||||
fs.statAsync path.join(supportFolder, "index.js")
|
||||
.then =>
|
||||
fs.statAsync path.join(supportFolder, "commands.js")
|
||||
.then =>
|
||||
fs.statAsync path.join(supportFolder, "defaults.js")
|
||||
|
||||
it "removes fixtures when they exist and fixturesFolder is false", (done) ->
|
||||
config.get(@idsPath)
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
// ***********************************************
|
||||
// This example defaults.js shows you how to
|
||||
// customize the internal behavior of Cypress.
|
||||
//
|
||||
// The defaults.js file is a great place to
|
||||
// override defaults used throughout all tests.
|
||||
//
|
||||
// ***********************************************
|
||||
//
|
||||
// Cypress.Server.defaults({
|
||||
// delay: 500,
|
||||
// whitelist: function(xhr){}
|
||||
// })
|
||||
|
||||
// Cypress.Cookies.defaults({
|
||||
// whitelist: ["session_id", "remember_token"]
|
||||
// })
|
||||
@@ -184,7 +184,7 @@ describe "lib/scaffold", ->
|
||||
.catch (err = {}) =>
|
||||
expect(err.stack).to.contain("not in the scaffolded file tree")
|
||||
|
||||
it "creates supportFolder and commands.js, defaults.js, and index.js when supportFolder does not exist", ->
|
||||
it "creates supportFolder and commands.js, and index.js when supportFolder does not exist", ->
|
||||
## todos has a _support folder so let's first nuke it and then scaffold
|
||||
scaffold.support(@supportFolder, @cfg)
|
||||
.then =>
|
||||
@@ -233,55 +233,32 @@ describe "lib/scaffold", ->
|
||||
|
||||
"""
|
||||
|
||||
fs.readFileAsync(@supportFolder + "/defaults.js", "utf8").then (str) =>
|
||||
fs.readFileAsync(@supportFolder + "/index.js", "utf8").then (str) =>
|
||||
expect(str).to.eq """
|
||||
// ***********************************************
|
||||
// This example defaults.js shows you how to
|
||||
// customize the internal behavior of Cypress.
|
||||
// ***********************************************************
|
||||
// This example support/index.js is processed and
|
||||
// loaded automatically before your other test files.
|
||||
//
|
||||
// The defaults.js file is a great place to
|
||||
// override defaults used throughout all tests.
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// ***********************************************
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// Cypress.Server.defaults({
|
||||
// delay: 500,
|
||||
// whitelist: function(xhr){}
|
||||
// })
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js
|
||||
// using ES2015 syntax:
|
||||
import "./commands"
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require("./commands")
|
||||
|
||||
// Cypress.Cookies.defaults({
|
||||
// whitelist: ["session_id", "remember_token"]
|
||||
// })
|
||||
"""
|
||||
|
||||
fs.readFileAsync(@supportFolder + "/index.js", "utf8").then (str) =>
|
||||
expect(str).to.eq """
|
||||
// ***********************************************************
|
||||
// This example support/index.js is processed and
|
||||
// loaded automatically before your other test files.
|
||||
//
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/guides/configuration#section-global
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js and defaults.js
|
||||
// using ES2015 syntax:
|
||||
import "./commands"
|
||||
import "./defaults"
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require("./commands")
|
||||
// require("./defaults")
|
||||
|
||||
"""
|
||||
|
||||
context ".fixture", ->
|
||||
beforeEach ->
|
||||
pristinePath = Fixtures.projectPath("pristine")
|
||||
@@ -364,7 +341,6 @@ describe "lib/scaffold", ->
|
||||
name: "_support"
|
||||
children: [
|
||||
{ name: "commands.js" }
|
||||
{ name: "defaults.js" }
|
||||
{ name: "index.js" }
|
||||
]
|
||||
}
|
||||
@@ -384,7 +360,6 @@ describe "lib/scaffold", ->
|
||||
name: "_support"
|
||||
children: [
|
||||
{ name: "commands.js" }
|
||||
{ name: "defaults.js" }
|
||||
{ name: "index.js" }
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user