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

Tests #17

Open
lascellesabercrombie opened this issue May 12, 2022 · 1 comment
Open

Tests #17

lascellesabercrombie opened this issue May 12, 2022 · 1 comment
Labels

Comments

@lascellesabercrombie
Copy link

I think that the "can add post" test leaves the page in a different state from which it finds it. My understanding is that this isn't best practice for tests. The alternative - deleting the created post within the "can add post" test - doesn't seem ideal, since this would mean that it's no different from the delete test. I'm not sure what the best solution is: keeping the tests as you have them or only have one test that tests posting and deleting posts in one.

@oliverjam
Copy link

In a simple case like this I would probably just manually delete the post in the same test where you add it. In a more complex thing it's common to have a separate script of some kind to "reset" your data store before each test. We'll cover this when we look at databases next week :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants