Summary: | Upgrade Cypress | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, matt.blenkinsop, pedro.amorim, tomascohen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34076 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 34690 | ||
Attachments: |
Bug 34319: Upgrade cypress 9.7.0 to 12.17.1
Bug 34319: Upgrade cypress 9.7.0 to 12.17.2 Bug 34319: Upgrade cypress 9.7.0 to 12.17.2 Bug 34319: Fix dialog_spec.ts Bug 34319: (QA follow-up) Add cypress.config.ts to Makefile.PL mapping Bug 34319: Remove cypress.json from Makefile.PL |
Description
Jonathan Druart
2023-07-20 09:49:51 UTC
Created attachment 153714 [details] [review] Bug 34319: Upgrade cypress 9.7.0 to 12.17.1 We are currently using 9.7.0. Since 10 the config file structure changed, and has been renamed cypress.json to cypress.config.ts https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-version-10-0 Also cypress-studio (used for bug 34076) is not working on 9.7.0. Test plan: yarn install yarn build mv /root/.cache/Cypress/12.17.1/ /kohadevbox/Cypress/ perl /kohadevbox/misc4dev/run_tests.pl --run-cypress-tests-only You should not get any failures from the tests. Tomas, do we have something to trigger ktd in this situation? I don't think so, we will need to do it manually. (In reply to Jonathan Druart from comment #2) > Tomas, do we have something to trigger ktd in this situation? I don't think > so, we will need to do it manually. Right, we should do it in advance. I'm getting an error on yarn build: ERROR in /kohadevbox/koha/cypress.config.ts 17:8-20:9 [tsl] ERROR in /kohadevbox/koha/cypress.config.ts(17,9) TS2322: Type '{ devServer: { framework: string; bundler: string; }; }' is not assignable to type 'Partial<Omit<ResolvedConfigOptions, TestingType>>'. Object literal may only specify known properties, and 'devServer' does not exist in type 'Partial<Omit<ResolvedConfigOptions, TestingType>>'. ts-loader-default_0c5a263502dc9404 Created attachment 153952 [details] [review] Bug 34319: Upgrade cypress 9.7.0 to 12.17.2 We are currently using 9.7.0. Since 10 the config file structure changed, and has been renamed cypress.json to cypress.config.ts https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-version-10-0 Also cypress-studio (used for bug 34076) is not working on 9.7.0. Test plan: yarn install yarn build mv /root/.cache/Cypress/12.17.2/ /kohadevbox/Cypress/ perl /kohadevbox/misc4dev/run_tests.pl --run-cypress-tests-only You should not get any failures from the tests. It was missing the change from package.json (which I certainly dropped with yarn.lock before I submitted the first patch). Created attachment 153954 [details] [review] Bug 34319: Upgrade cypress 9.7.0 to 12.17.2 We are currently using 9.7.0. Since 10 the config file structure changed, and has been renamed cypress.json to cypress.config.ts https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-version-10-0 Also cypress-studio (used for bug 34076) is not working on 9.7.0. Test plan: yarn install yarn build mv /root/.cache/Cypress/12.17.2/ /kohadevbox/Cypress/ perl /kohadevbox/misc4dev/run_tests.pl --run-cypress-tests-only You should not get any failures from the tests. Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Created attachment 155097 [details] [review] Bug 34319: Fix dialog_spec.ts Follow the cypress upgrade instructions in the previous patch Run the tests, verify they fail Apply this patch, run tests again, verify they now pass Tests are passing for me without this patch. Apply first patch only # inside ktd yarn install yarn build yarn cypress run --spec t/cypress/integration/ERM/Dialog_spec.ts Cypress 12.17.4 (In reply to Jonathan Druart from comment #9) > Tests are passing for me without this patch. > > Apply first patch only > # inside ktd > yarn install > yarn build > yarn cypress run --spec t/cypress/integration/ERM/Dialog_spec.ts > > Cypress 12.17.4 Make sure you have 0 packages in your local DB. Restart yarn js:watch if it was already running. Run again: yarn cypress run --spec t/cypress/integration/ERM/Dialog_spec.ts Fails for me everytime. Alternatively, run cypress tests visually to make the issue obvious yarn run cypress open I have 0 package... Comment on attachment 155097 [details] [review] Bug 34319: Fix dialog_spec.ts This is fixing a random failure. It should be moved to its own bug report. Moved the random failure fix to bug 34690 Pushed to master for 23.11. Nice work everyone, thanks! I now triggered a manual KTD build: https://gitlab.com/koha-community/koha-testing-docker/-/pipelines/993420482 Things worked great locally. Created attachment 155234 [details] [review] Bug 34319: (QA follow-up) Add cypress.config.ts to Makefile.PL mapping Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> (In reply to Tomás Cohen Arazi from comment #16) > Created attachment 155234 [details] [review] [review] > Bug 34319: (QA follow-up) Add cypress.config.ts to Makefile.PL mapping > > Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> But then I think we should remove cypress.json Created attachment 155272 [details] [review] Bug 34319: Remove cypress.json from Makefile.PL And move cypress.config.ts with the others NONE Follow-up pushed. Thanks Jonathan! May we backport this one ? I would recommend backporting this Fridolin, the cypress tests won't run without it (In reply to Matt Blenkinsop from comment #21) > I would recommend backporting this Fridolin, the cypress tests won't run > without it They should, if you are using the correct ktd's image. |