Skip to content

Commit

Permalink
export base config from primary cypress config in driver for use in i…
Browse files Browse the repository at this point in the history
…nject-document-domain test subset
  • Loading branch information
cacieprins committed Dec 20, 2024
1 parent 6c52c93 commit 34e0573
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 33 deletions.
35 changes: 4 additions & 31 deletions packages/driver/cypress.config-injectDocumentDomain.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,12 @@
import { defineConfig } from 'cypress'
import { baseConfig } from './cypress.config'

export default defineConfig({
projectId: 'ypt4pf',
experimentalStudio: true,
experimentalMemoryManagement: true,
experimentalWebKitSupport: true,
hosts: {
'foobar.com': '127.0.0.1',
'*.foobar.com': '127.0.0.1',
'barbaz.com': '127.0.0.1',
'*.barbaz.com': '127.0.0.1',
'*.idp.com': '127.0.0.1',
'localalias': '127.0.0.1',
},
reporter: '../../node_modules/cypress-multi-reporters/index.js',
reporterOptions: {
configFile: '../../mocha-reporter-config.json',
},
...baseConfig,
e2e: {
...baseConfig.e2e,
specPattern: '{cypress/**/origin/**/*.cy.{js,ts},cypress/**/cookies.cy.js,cypress/**/net_stubbing.cy.js}',
injectDocumentDomain: true,
experimentalOriginDependencies: true,
experimentalModifyObstructiveThirdPartyCode: true,
setupNodeEvents: (on, config) => {
on('task', {
log (message) {
// eslint-disable-next-line no-console
console.log(message)

return null
},
})

return require('./cypress/plugins')(on, config)
},
baseUrl: 'http://localhost:3500',
},
component: undefined,
})
6 changes: 4 additions & 2 deletions packages/driver/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from 'cypress'
import { devServer as cypressWebpackDevServer } from '@cypress/webpack-dev-server'

export default defineConfig({
export const baseConfig: Cypress.ConfigOptions = {
projectId: 'ypt4pf',
experimentalStudio: true,
experimentalMemoryManagement: true,
Expand Down Expand Up @@ -46,4 +46,6 @@ export default defineConfig({
})
},
},
})
}

export default defineConfig(baseConfig)

0 comments on commit 34e0573

Please sign in to comment.