Skip to content
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

Prepare test for CI/CD #78

Open
2 tasks done
Nithador opened this issue Jul 10, 2024 · 2 comments
Open
2 tasks done

Prepare test for CI/CD #78

Nithador opened this issue Jul 10, 2024 · 2 comments
Assignees

Comments

@Nithador
Copy link
Collaborator

Nithador commented Jul 10, 2024

  • Check JS for Cypress
  • Functions from logic to testthat
@osalamon
Copy link
Collaborator

Hey,

regarding testing of Javascript (and HTML): I added two sets of Cypress E2E tests here https://github.com/BioDT/biodt-shiny/tree/add-first-Cypress-test

The first set applies to the app generally (if the app starts; if it has correct document title; if can be switched from Honeybee and back to HP) and to the content of home/landing page (three paragraphs with its given texts; 4 cards/categories with links to pDTs).

The second set checks whether our translation plugin works OK (if the default language is set to EN; after switching to CZ if the text in homepage is in Czech language accordingly).

In the regard of second part of task, I am going to look into the "testthat" package... to see if I'll be able to come up with tests of functions in /logic folder:-)

@osalamon
Copy link
Collaborator

Ok, I was also able to develop at least one test (via testthat) which tests whether the function get_coords_deimsid() from file app/logic/deimsid_coordinates.R works correctly.

The test can be run locally from working dir by:

testthat::test_file("tests//testthat//test-deimsid_coordinates.R", reporter = "progress")

(Just for the record, I also add here how to run Cypress tests locally in interactive mode - via command rhino::test_e2e(interactive = T).)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants