Skip to content

Test foundation#3

Open
davestaab wants to merge 6 commits intopstaylor-patrick:mainfrom
davestaab:test-and-ts-for-data
Open

Test foundation#3
davestaab wants to merge 6 commits intopstaylor-patrick:mainfrom
davestaab:test-and-ts-for-data

Conversation

@davestaab
Copy link

Setup a test foundation

Installed playwright and playwright-bdd to get a test foundation in place. If you're unfamiliar with BDD it focuses on defining a system's behavior through concrete examples. It's like writing user stories in a language that both developers and non-technical stakeholders can understand.

As features are added to the app, they can be captured and automated so behavior is maintained. Check out the .feature files in this PR to see some simple examples of current behavior that's captured. I even discovered the workouts page was missing a title through this process and was able to add one.

The point of this setup is to get a test foundation in place so current behavior can be captured before working on issue #2. This solution would involve some refactoring and the workouts ordering feature is somewhat hard to test as a user because it's time based.

Some helpful commands.

  1. run the tests: npm test
  2. run the tests with a nice UI: npm test -- --ui
  3. Debug the tests: npm test -- --debug

Feedback welcome

As always, feel free to pushback, ignore, question or otherwise teach me something. Hopefully this is interesting/useful and will support collaboration on the website.

-- Wanderer

@netlify
Copy link

netlify bot commented Jul 30, 2024

Deploy Preview for precious-lolly-0aa3a0 failed.

Name Link
🔨 Latest commit 242a68d
🔍 Latest deploy log https://app.netlify.com/sites/precious-lolly-0aa3a0/deploys/670ac639dd221300085c5f10

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.

1 participant