Skip to content

WIP: feat: minimal implementation of possible bdd test suite#492

Open
kimadactyl wants to merge 1 commit intomainfrom
add-bdd-tests
Open

WIP: feat: minimal implementation of possible bdd test suite#492
kimadactyl wants to merge 1 commit intomainfrom
add-bdd-tests

Conversation

@kimadactyl
Copy link
Copy Markdown
Member

@kimadactyl kimadactyl commented Jan 10, 2025

A proof of concept for a possible cucumber / bdd test suite to compliment the elm unit tests.

What do people think to this direction? If you like it I can write out a proper issue ticket.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying the-trans-dimension with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2a5371a
Status: ✅  Deploy successful!
Preview URL: https://ff0bbfa1.the-trans-dimension.pages.dev
Branch Preview URL: https://add-bdd-tests.the-trans-dimension.pages.dev

View logs

@katjam
Copy link
Copy Markdown
Member

katjam commented Jan 15, 2025

I worry it might introduce another "thing to maintain" but am not opposed to trying it out and assessing the benefits after a period of time rather than hard no.

In terms of testing, I think the most important aspects are ensuring the displays of filtered data are working as expected.

Copy link
Copy Markdown
Collaborator

@mateusfpleite mateusfpleite left a comment

Choose a reason for hiding this comment

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

When trying to test the PR linked above, I found it difficult to test the features in a more meaningful way due to some limitations in the Elm-pages architecture. In addition to making it clearer when the acceptance criteria are being met, I think this type of test can make it easier to test more complex flows like the filtering mentioned by @katjam, so I think it's worth a try!

@kimadactyl
Copy link
Copy Markdown
Member Author

My main concern with this approach is I'm unsure how to do meaningful testing that shows the API input vs "in browser" output. In Ruby I'd prob use something like vcr to capture a one-off API response and then timecop to fix it. But that does lend itself to true = true tests a bit.

Does anyone know what they're doing if we do go this route? Also is this the right JS idioms?

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.

3 participants