StatCan/jupyter-apis

Update jupyter-apis cypress tests to KF1.7

mathis-marcotte opened this issue · 3 comments

Update the cypress package to match upstream.
Also make sure that cypress.json got updated and renamed to cypress.config.ts.

One thing to note is that they updated their cypress version from v7 to v10.

List of files under Jupyter folder (note: Not counting common or volume folder)

Cypress

jupyter/frontend/cypress

  • .prettierrc
  • tsconfig.json
  • support/e2e.ts
  • support/commands.ts

jupyter/frontend/cypress/e2e

  • main-page.cy.ts
  • form-page.cy.ts

jupyter/frontend/cypress/fixtures

  • notebooks.json
  • poddefaults.json
  • config.json
  • settings.json
  • namespaces.json

Notes from jupyter

jupyter/frontend

  • cypress.config.ts NEW FILE. I added it since upstream did (This is the new configuration file that we need to take it)
  • Cypress.json : Upstream does not have it. I kept it. We will determine when dealing with cypress (This was the old configuration file that is no longer needed).

One of the big things with cypress in Kubeflow 1.7 is that it got upgraded from v7 to v10. With this major version change, some things got updated in the code structure. These are some of the things that impact our code:

  • The configuration of cypress changed. It used to support a cypress.json file. Now, it supports a cypress.config.js (this could also be a .ts file, which is what we have).
  • No more cypress/plugins folder, but we weren't using that. And if we do want to use that, it is now in the configuration file with the setupNodeEvents() function.
  • The cypress/support/index.ts file got renamed to cypress/support/e2e.ts
  • The path and naming for test files got changed from cypress/integrations/*.spec.ts to cypress/e2e/*.cy.ts

Tests are passing for the form
image

Most of the tests for the main page are failing though. Will have to look at that and determine why.

For the main-page tests, I had to fix some references since we have multiple tables displayed in our main page, but upstream they only have one table shown at a time. Also, we use different volume statuses than upstream so had to adjust the test case for that.

image