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

Field Slip system test adjustments #2141

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nimmolo
Copy link
Contributor

@nimmolo nimmolo commented May 16, 2024

Refactors the field_slips_test as a sequence of actions within a single session. Should run faster and be just as effective.

Background:

With system tests, the setup/teardown for individual tests is kind of time consuming, and it seems to be more of a common pattern to test a whole “workflow of someone’s session” in a single test.

This became an issue for me recently because i’m getting intermittent failures on the Action Cable websockets branch from the field slips system test, and it seems to be coming from a rapid succession of “login” requests one right after the other.

…"login!" issues

Use identifiers like the ones in object_link_helper to facilitate finding elements in the field slip test (avoiding xpaths)
@nimmolo nimmolo closed this May 16, 2024
@nimmolo nimmolo reopened this May 16, 2024
@coveralls
Copy link
Collaborator

Coverage Status

coverage: 94.45%. remained the same
when pulling d140e92 on nimmo-system-test-class-selector-adjustments
into 4f69b78 on main.

@nimmolo
Copy link
Contributor Author

nimmolo commented May 16, 2024

Update: #2107 passes now, so i don't consider this necessary.
It does however have some things we may want to keep:

  • Adds identifying selector classes to the important links on Field Slips, so the system test never has to use xpath. xpath selectors tend to be brittle if HTML is reorganized.
  • The test runs 30-50% faster (3-5s for me locally, and similar in CI) when all strung together, no matter how many times I re-run it. It's a small gain here, but i think does illustrate that there's a material difference from consolidating a system test in a workflow.
  • Parens for method args is MO's Rubocop style across the whole app. I feel like if we're going to have a style...

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

Successfully merging this pull request may close these issues.

None yet

2 participants