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

Typescript project setup #19

Merged
merged 7 commits into from
Aug 4, 2023
Merged

Typescript project setup #19

merged 7 commits into from
Aug 4, 2023

Conversation

meisekimiu
Copy link
Member

@meisekimiu meisekimiu commented Aug 2, 2023

Set up the TypeScript version of the functional test. Because we don't want to use another repository, it exists in a subdirectory so the existing functional test suite can still run. A side effect of this is that we are going to be running the old python test suite for every pull request for the TypeScript version until the python version is removed from this repo.

You can run the test suite locally by going into the js directory and running:
npm install
npm start

Alternatively you can run tests from the cypress UI by running npm run cypress:open instead.

Set up a node project in a subdirectory of the functional-test repo. We
decided we don't want to create a new repo, but in the meantime we don't
want to delete the Python functional test suite. Make it a subdirectory
instead that will eventually overwrite the Python tests.

PER-9318: Write healthcheck test (webclient functional test)
Set up TypeScript, eslint, and add a .gitignore file to the project to
ignore node_modules as well as cypress specific files.

PER-9318: Write healthcheck test (webclient functional test)
Most files are autogenerated by Cypress. Add the `health.cy.ts` suite
that acts as a health check and just asserts true is true.

PER-9318: Write healthcheck test
We want this code to be well formatted even if it is just for automated
tests. To ensure this, run linting checks when opening pull requests.

PER-9318: Write healthcheck test (webclient functional test)
@meisekimiu meisekimiu marked this pull request as ready for review August 2, 2023 20:53
@meisekimiu meisekimiu changed the title Typescript setup Typescript project setup Aug 2, 2023
@meisekimiu meisekimiu added the typescript Cypress Functional Test Suite label Aug 2, 2023
Since we're creating JS tests in the same repo as Python tests, every
time we open a PR for these tests it will run the Python functional
tests as part of the CI process. We probably want to keep running these
for Dependabots and any bugfixes that need to be done for the Python
test suite, but we don't need to run these every time we update the JS
tests.
PER-9318: Write healthcheck test (webclient functional test)
"eslint-config-prettier": "^8.9.0",
"eslint-plugin-cypress": "^2.13.3",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-prettier": "^5.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This plugin means eslint will enforce all the prettier rules, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. 👍

Comment on lines 1 to 5
{
"name": "Using fixtures to represent data",
"email": "hello@cypress.io",
"body": "Fixtures are a great way to mock data for responses to routes"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't have a clear path to using this file, or the example files under support, I'd remove them. If we're going to be using them approximately as soon as we start writing real tests, though, then I'd say it's fine to leave them in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we're going to use any fixtures since these will be running on actual environments (in other words, no simulated data). I think we might be using support files to load in environment variables though.

We don't need this example file in our project. If we ever need an
example file we can have Cypress regenerate it for us.

PER-9318: Write healthcheck test (webclient functional test)
@meisekimiu meisekimiu merged commit 95d8444 into main Aug 4, 2023
4 checks passed
@meisekimiu meisekimiu deleted the typescript-setup branch August 4, 2023 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typescript Cypress Functional Test Suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants