Skip to content

Using migration tool from 9.7.0 -> 12.6.0 does not convert testFiles to specPattern correctly #25947

@monkpit

Description

@monkpit

Current behavior

My original cypress.json contained testFiles: ['array', 'of', 'globs'].

During the guided migration, this was converted to one big string, but was done incorrectly: specPattern: 'cypress/e2e/array,of,globs' - cypress/e2e is only added to the first glob, and the rest are tacked on with comma separators.

This causes 2 problems.

  1. No specs are found when Cypress starts because it doesn't parse the string as multiple globs, it seems to treat it as 1 big glob.
  2. Even if it did work this way, cypress/e2e/... path prefix was only added to the first path element, so only 1 out of 3 globs would return spec files.

Desired behavior

testFiles: [ 'array', 'of', 'globs' ] should convert to specPattern: [ 'cypress/e2e/array', 'cypress/e2e/of', 'cypress/e2e/globs' ] - which seems to be the only way it works correctly (for me, anyways).

Test code to reproduce

Convert a project with cypress.json that has a testFiles value that contains an array of glob patterns.

Cypress Version

12.6.0

Node version

16 LTS

Operating System

MacOS 12.6

Debug Logs

No response

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions