StatCan/jupyter-apis

Implement defined use cases as jupyter-apis cypress tests

mathis-marcotte opened this issue · 4 comments

The test cases that need to be implemented in cypress are defined in #279.

index page

  • should have notebooks table
  • should delete notebook
  • should start notebook
  • should stop notebook
  • should have protected icon on protected b notebook
  • should filter notebook table
  • should have volumes table
  • should delete volume
  • should have protected icon on protected b volume
  • should filter volume table
  • should have cost table
  • should change cost table time window
  • should open notebook details page
  • should open volume details page
  • should open the notebook details page from the volume's used-by column

notebook details page

  • should open notebook details page
  • should start the notebook from the details page
  • should stop the notebook from the details page
  • should delete the notebook from the details page

volume details page

  • should open volume details page
  • should delete volume from details page

new notebook form

(completed in #294)

should validate every input

  • name
  • custom image
  • minimum cpu
  • minimum memory
  • maximum cpu
  • maximum memory
  • workspace volume
  • data volume
other form tests
  • should create a new jupyter-apis
  • should create a new RStudio notebook in french and with data volumes
  • should create a new protected b Ubuntu notebook
  • should create a new SAS notebook
  • should create a new GPU notebook
  • should create a custom image notebook

While writing the tests for the form, I was getting inconsistencies when testing the validator for the workspace volume name, the validator to make sure the volume name can't already be mounted. It seems like for some of the test runs, the function to get the notebooks data to see which volumes are already mounted was just not triggering, so it was acting like no volumes were mounted in the namespace. This behavior might honestly be related to how the tests are set up or how they are ran, but it also might not be because of that, and this inconsistency might be present in the actual app. I'll keep an eye out but it's hard to actually debug this since the inconsistency is randomly happening. But it might be a good idea also to just revist how that logic is done to just fix this possible inconsistency.

This bug seems to often happen on the first go of the tests for the form page, and then proceeds to be more consistently not happening after that.

There was a bug with the workspace existing volume name. The bug is with the "isProtectedBvalidator". Seems like that validator works for data volumes though, just doesn't work with workspace volume. I'll see if i can fix it since it is preventing some tests to be done.

the remaining tests for the notebook form will be tracked and completed in #294