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

fix feature tests #1263

Merged
merged 8 commits into from Feb 16, 2023
Merged

fix feature tests #1263

merged 8 commits into from Feb 16, 2023

Conversation

afeld
Copy link
Contributor

@afeld afeld commented Feb 12, 2023

Fixes #340.

Gets the feature tests working again, and sets them to run on every push in CI.

@github-actions github-actions bot added back-end Django views, sessions, middleware, models, migrations etc. actions Related to GitHub Actions workflows deployment-dev [auto] Changes that will trigger a deploy if merged to dev tests Related to automated testing (unit, UI, integration, etc.) migrations [auto] Review for potential model changes/needed data migrations updates labels Feb 12, 2023
@afeld afeld force-pushed the fix/feature-tests branch 6 times, most recently from 95a73f7 to b377b69 Compare February 14, 2023 01:02
@@ -51,6 +51,8 @@ CYPRESS_baseUrl=http://localhost:8000 npm run cypress:open

See `tests/cypress/package.json` for more cypress scripts.

As of Cypress 12.5.1 with Firefox 109, there is a CSRF issue that prevents the tests from passing; unclear if this is a bug in Cypress or what. Use one of the other browser options.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Tricksy.

@@ -201,14 +202,19 @@ def load_sample_data(app, *args, **kwargs):

TransitAgency = app.get_model("core", "TransitAgency")

# load the sample data from a JSON file so that it can be accessed by Cypress as well
Copy link
Contributor Author

@afeld afeld Feb 14, 2023

Choose a reason for hiding this comment

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

See this note. Essentially going back to fixtures, just for the sake of the sample data. Doesn't change anything in Azure.

Matches the local dev setup more closely, and simplifies the CI setup.
@afeld
Copy link
Contributor Author

afeld commented Feb 14, 2023

Progress! Three Cypress tests are passing 🎉

@afeld afeld marked this pull request as ready for review February 15, 2023 02:09
@afeld afeld requested a review from a team as a code owner February 15, 2023 02:09
-p 5000:5000 \
ghcr.io/cal-itp/eligibility-server:dev
touch .env
docker compose up --detach client server
Copy link
Contributor Author

@afeld afeld Feb 15, 2023

Choose a reason for hiding this comment

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

Was able to simplify, and more closely match our local setup.

@afeld afeld mentioned this pull request Feb 16, 2023
@afeld afeld merged commit 411233f into dev Feb 16, 2023
@afeld afeld deleted the fix/feature-tests branch February 16, 2023 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions Related to GitHub Actions workflows back-end Django views, sessions, middleware, models, migrations etc. deployment-dev [auto] Changes that will trigger a deploy if merged to dev migrations [auto] Review for potential model changes/needed data migrations updates tests Related to automated testing (unit, UI, integration, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get feature tests to pass in CI
2 participants