-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: fix 2 broken tests for Windows #26854
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
@@ -606,9 +606,12 @@ export class ProjectActions { | |||
// Now that we're in the correct testingType, verify the requested spec actually exists | |||
// We don't have specs available until a testingType is loaded, so even through we validated | |||
// a matching file exists above it may not end up loading as a valid spec so we validate that here | |||
const spec = this.ctx.project.getCurrentSpecByAbsolute(absoluteSpecPath) | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: remove this empty comment?
* chore: add Nx Cloud (#26712) * chore: add empty nx.json [run ci] * chore: add nx cloud runner [run ci] * chore: add nx-cloud dep [run ci] * chore: update local nx cloud accessToken to be read-only * feat: update git related messages for runs and debug (#26758) * feat(app): update DebugError copy * feat: set isUsingGit project flag and consume in DebugContainer * feat(app): update not using git icon for DebugError * feat(app): displays alert on runs page when not using git * feat(app): add component for when no runs for current branch * feat(app): add warning for no runs for branch on runs container * chore: add feat to CHANGELOG * chore: remove logged status value * chore: resolve import from merge conflict * test(app): stub branch name for e2e runs spec * chore: add line break in changelog entry * chore: cleanup PR * chore: fix i18n import for DebugBranchError * chore: add utm and update Warning links to inline * chore: capitalize Git in i18n * ref: warning liink * test: add i18n to tests * test(app): change utm_source assertions * chore: cleanup pr * chore: remove unused prop * test(app): remove no git warning when moving to runs page in e2e * chore: change template logic * chore: remove duplicate RUNS_TAB_MEDIUM const * Changed Debug test assertion and reordered new components for Debug --------- Co-authored-by: Stokes Player <[email protected]> * chore: rename video processing events to capture/compress (#26800) * chore: change processing nomenclature to compressing when printing the run. * chore: rename 'capturing of' to 'capturing' * chore: rename upload results to upload screenshots & videos (#26811) * chore: rename upload results to upload screenshots & videos * run ci * chore: capture versions of relevant dependencies with `x-dependencies` header (#26814) * chore: update changlelog script to handle revert pr ref (#26801) * fix: Correct typescript scaffold dependency (#26815) * fix: correct typescript scaffold dependency (#26204) * add changelog * Update change log for PR comment Co-authored-by: Mike Plummer <[email protected]> --------- Co-authored-by: Mike Plummer <[email protected]> Co-authored-by: Mark Noonan <[email protected]> * chore: 12.13.0 prep (#26833) * chore: 12.13.0 release (#26834) * chore: 12.13.0 changelog fix * remove pending, bump version * fix typo * chore: release @cypress/vite-plugin-cypress-esm-v1.0.1 [skip ci] * chore: Implement runSpec mutation (#26782) * chore: replace gitter badge with discord on readme (#26771) * chore: add GraphQL mutation for sending system notifications via Electron (#26773) * fix: upgrade typescript from 4.7.4 to 4.9.5 (#26826) Snyk has created this PR to upgrade typescript from 4.7.4 to 4.9.5. See this package in npm: See this project in Snyk: https://app.snyk.io/org/cypress-opensource/project/d5b36925-e6ee-455d-9649-6560a9aca413?utm_source=github&utm_medium=referral&page=upgrade-pr * test: fix 2 broken tests for Windows (#26854) * Update stale_issues_and_pr_cleanup.yml Upped the number of operations per run. Have been manually doing that so this job can get through all the issues in the repo with no problems. * chore(dep): [Snyk] Upgrade vite from 2.9.13 to 2.9.15 (#26830) Co-authored-by: Ben M <[email protected]> * Update triage_add_to_project.yml * chore: fix minor background color styling in debug results component (#26887) * Update stale_issues_and_pr_cleanup.yml stalebot was incorrectly configured to run in debug mode. I have updated the default to run in normal mode when running scheduled * chore: Deprecate @cypress/xpath package (#26893) * chore: add telemetry realworld app (#26896) * chore: capture telemetry for realworld app maybe * idk what i was doing * setup record key and telemetry * testing * override project id * some times we just need a little context. * Adding tests * Adding comment * fix yarn lock * Trying this.... * fix tests? --------- Co-authored-by: Jordan <[email protected]> Co-authored-by: Stokes Player <[email protected]> Co-authored-by: Bill Glesias <[email protected]> Co-authored-by: Adam Stone-Lord <[email protected]> Co-authored-by: Emily Rohrbough <[email protected]> Co-authored-by: Dave Kasper <[email protected]> Co-authored-by: Mike Plummer <[email protected]> Co-authored-by: Mark Noonan <[email protected]> Co-authored-by: Chris Breiding <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> Co-authored-by: Ely Lucas <[email protected]> Co-authored-by: Snyk bot <[email protected]> Co-authored-by: Stokes Player <[email protected]> Co-authored-by: Ben M <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]>
* chore: add Nx Cloud (#26712) * chore: add empty nx.json [run ci] * chore: add nx cloud runner [run ci] * chore: add nx-cloud dep [run ci] * chore: update local nx cloud accessToken to be read-only * feat: update git related messages for runs and debug (#26758) * feat(app): update DebugError copy * feat: set isUsingGit project flag and consume in DebugContainer * feat(app): update not using git icon for DebugError * feat(app): displays alert on runs page when not using git * feat(app): add component for when no runs for current branch * feat(app): add warning for no runs for branch on runs container * chore: add feat to CHANGELOG * chore: remove logged status value * chore: resolve import from merge conflict * test(app): stub branch name for e2e runs spec * chore: add line break in changelog entry * chore: cleanup PR * chore: fix i18n import for DebugBranchError * chore: add utm and update Warning links to inline * chore: capitalize Git in i18n * ref: warning liink * test: add i18n to tests * test(app): change utm_source assertions * chore: cleanup pr * chore: remove unused prop * test(app): remove no git warning when moving to runs page in e2e * chore: change template logic * chore: remove duplicate RUNS_TAB_MEDIUM const * Changed Debug test assertion and reordered new components for Debug --------- Co-authored-by: Stokes Player <[email protected]> * chore: rename video processing events to capture/compress (#26800) * chore: change processing nomenclature to compressing when printing the run. * chore: rename 'capturing of' to 'capturing' * chore: rename upload results to upload screenshots & videos (#26811) * chore: rename upload results to upload screenshots & videos * run ci * chore: capture versions of relevant dependencies with `x-dependencies` header (#26814) * chore: update changlelog script to handle revert pr ref (#26801) * fix: Correct typescript scaffold dependency (#26815) * fix: correct typescript scaffold dependency (#26204) * add changelog * Update change log for PR comment Co-authored-by: Mike Plummer <[email protected]> --------- Co-authored-by: Mike Plummer <[email protected]> Co-authored-by: Mark Noonan <[email protected]> * chore: 12.13.0 prep (#26833) * chore: 12.13.0 release (#26834) * chore: 12.13.0 changelog fix * remove pending, bump version * fix typo * chore: release @cypress/vite-plugin-cypress-esm-v1.0.1 [skip ci] * chore: Implement runSpec mutation (#26782) * chore: replace gitter badge with discord on readme (#26771) * chore: add GraphQL mutation for sending system notifications via Electron (#26773) * fix: upgrade typescript from 4.7.4 to 4.9.5 (#26826) Snyk has created this PR to upgrade typescript from 4.7.4 to 4.9.5. See this package in npm: See this project in Snyk: https://app.snyk.io/org/cypress-opensource/project/d5b36925-e6ee-455d-9649-6560a9aca413?utm_source=github&utm_medium=referral&page=upgrade-pr * test: fix 2 broken tests for Windows (#26854) * Update stale_issues_and_pr_cleanup.yml Upped the number of operations per run. Have been manually doing that so this job can get through all the issues in the repo with no problems. * chore(dep): [Snyk] Upgrade vite from 2.9.13 to 2.9.15 (#26830) Co-authored-by: Ben M <[email protected]> * Update triage_add_to_project.yml * chore: fix minor background color styling in debug results component (#26887) * Update stale_issues_and_pr_cleanup.yml stalebot was incorrectly configured to run in debug mode. I have updated the default to run in normal mode when running scheduled * chore: Deprecate @cypress/xpath package (#26893) * chore: add telemetry realworld app (#26896) * chore: capture telemetry for realworld app maybe * idk what i was doing * setup record key and telemetry * testing * override project id * some times we just need a little context. * Adding tests * Adding comment * chore(deps): update dependency find-process to v1.4.7 🌟 (#26906) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jennifer Shehane <[email protected]> * chore(deps): update dependency firefox-profile to v4.3.2 🌟 (#26912) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jennifer Shehane <[email protected]> --------- Co-authored-by: Jordan <[email protected]> Co-authored-by: Stokes Player <[email protected]> Co-authored-by: Bill Glesias <[email protected]> Co-authored-by: Adam Stone-Lord <[email protected]> Co-authored-by: Emily Rohrbough <[email protected]> Co-authored-by: Dave Kasper <[email protected]> Co-authored-by: Mike Plummer <[email protected]> Co-authored-by: Mark Noonan <[email protected]> Co-authored-by: Chris Breiding <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> Co-authored-by: Ely Lucas <[email protected]> Co-authored-by: Snyk bot <[email protected]> Co-authored-by: Stokes Player <[email protected]> Co-authored-by: Ben M <[email protected]> Co-authored-by: Jennifer Shehane <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Additional details
Test 1
cypress/packages/app/cypress/e2e/specs_list_e2e.cy.ts
Line 88 in 3487209
Failing test in windows introduced with PR: #26723
See example of failed test here: https://app.circleci.com/pipelines/github/cypress-io/cypress/52876/workflows/f790b06f-4a4c-4efc-b901-6151139f5947/jobs/2180318/tests#failed-test-1
Solution is to convert the value used for the selector for windows since the id for the element is created from a file system path
Test 2
cypress/packages/app/cypress/e2e/cypress-in-cypress.cy.ts
Line 399 in 3487209
Solution is to call
toPosix
on the absolute spec path to align the Windows path with what is actually stored in the data context. For this test, the absolute windows path isC:\Users\ADMINI~1\AppData\Local\Temp\2\cy-projects\cypress-in-cypress\cypress\e2e\dom-content.spec.js
but what is stored in the data context under
project.specs
is:C:/Users/ADMINI~1/AppData/Local/Temp/2/cy-projects/cypress-in-cypress/cypress/e2e/dom-content.spec.js
Notice the forward versus backwards slashes
Steps to test
Confirm test is passing in linux and windows on CI
How has the user experience changed?
PR Tasks
cypress-documentation
?type definitions
?