Homepage of my site has many things: newest products, latest blog articles, teams, and few other things.
Would it be right to have homepageTest.php file with one test method test_homepage_contains_all_content(), that includes:
assertStatus(200);
assertSee(products)
assertSee(articles)
assertSee(etc...)
...
or it better to have separate test methods for each section of the page?
PK
Povilas Korop
✓ Link copied!
As in many situations you asked for earlier, it's your personal preference :)
CO
Cristhian Ortega
✓ Link copied!
Copy that: AAA stands for Arrange, Act, and Assert.
Homepage of my site has many things: newest products, latest blog articles, teams, and few other things. Would it be right to have homepageTest.php file with one test method test_homepage_contains_all_content(), that includes:
or it better to have separate test methods for each section of the page?
As in many situations you asked for earlier, it's your personal preference :)