mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-17 04:29:57 -06:00
* modifying object after array combination to hold older values * regression test * made suggested changes * config defaults * log * logs * log * log again * update log * changelog * updates changelog * fix typo and move changelog entry and fix link --------- Co-authored-by: Nihar Phansalkar <phansalkarnihar@gmail.com> Co-authored-by: Jennifer Shehane <jennifer@cypress.io> Co-authored-by: Cacie Prins <cacieprins@users.noreply.github.com> Co-authored-by: Cacie Prins <cacie@cypress.io> Co-authored-by: AtofStryker <bglesias@gmail.com>
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
|
||||
## 13.7.2
|
||||
|
||||
_Released 4/2/2024 (PENDING)_
|
||||
|
||||
**Bugfixes:**
|
||||
|
||||
- Fixed a bug where fields using arrays in `cypress.config` are not correctly processed. Fixes [#27103](https://github.com/cypress-io/cypress/issues/27103). Fixed in [#27312](https://github.com/cypress-io/cypress/pull/27312).
|
||||
|
||||
## 13.7.1
|
||||
|
||||
_Released 3/21/2024_
|
||||
|
||||
@@ -444,6 +444,40 @@ e2e: {
|
||||
|
||||
cy.get('[data-cy="file-match-indicator"]', { timeout: 7500 })
|
||||
.should('contain', '3 matches')
|
||||
|
||||
// Regression for https://github.com/cypress-io/cypress/issues/27103
|
||||
cy.withCtx(async (ctx) => {
|
||||
await ctx.actions.file.writeFileInProject('cypress.config.js',
|
||||
`
|
||||
module.exports = {
|
||||
projectId: 'abc123',
|
||||
experimentalInteractiveRunEvents: true,
|
||||
component: {
|
||||
specPattern: 'src/**/*.{spec,cy}.{js,jsx,ts,tsx}',
|
||||
supportFile: false,
|
||||
devServer: {
|
||||
framework: 'react',
|
||||
bundler: 'webpack',
|
||||
}
|
||||
},
|
||||
e2e: {
|
||||
specPattern: ['cypress/e2e/**/dom-cont*.spec.{js,ts}'],
|
||||
supportFile: false,
|
||||
setupNodeEvents(on, config) {
|
||||
/**
|
||||
* This should make Cypress yield a "no specs found" error.
|
||||
*
|
||||
* This stops being the case if 'specPattern' is an array.
|
||||
*/
|
||||
config.specPattern = [];
|
||||
return config;
|
||||
},
|
||||
},
|
||||
}`)
|
||||
})
|
||||
|
||||
cy.get('[data-cy="create-spec-page-title"]')
|
||||
.should('contain', defaultMessages.createSpec.page.customPatternNoSpecs.title)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -105,8 +105,16 @@ export function updateWithPluginValues (cfg: FullConfig, modifiedConfig: any, te
|
||||
debug('resolved config object %o', cfg.resolved)
|
||||
}
|
||||
|
||||
const diffsClone = _.cloneDeep(diffs) ?? {}
|
||||
|
||||
// merge cfg into overrides
|
||||
const merged = _.defaultsDeep(diffs, cfg)
|
||||
const merged = _.defaultsDeep(diffs, cfg) ?? {}
|
||||
|
||||
for (const [key, value] of Object.entries(diffsClone)) {
|
||||
if (Array.isArray(value)) {
|
||||
merged[key] = _.cloneDeep(value)
|
||||
}
|
||||
}
|
||||
|
||||
debug('merged config object %o', merged)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user