You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.
I tried the following pending scenario by myself and found some issues.
context"as a guest"doscenario"reads a news release"dopending"You write this one!"visitroot_pathclick_link"News"expect(page).to_nothave_content"Today, BigCo's CFO announced record growth."expect(page).to_nothave_content'Add News Release'click_link"2013-08-01: Record profits for BigCo!"expect(page).tohave_content"Today, BigCo's CFO announced record growth."endend
First, the following expectations do not work well because they are treated as four sentences.
expect(page).to_nothave_content"Today, BigCo's CFO announced record growth."expect(page).tohave_content"Today, BigCo's CFO announced record growth."
The first one failed so I noticed the problem, but the second passed, so without false-positive test it is hard to notice that the test is imperfect.
Second, this scenario requires setting up for test data(news releases). I feel it should be indicated in the test code like this:
context"as a guest"dobackgrounddo# set up news releaseendscenario"reads a news release"dopending"You write this one!"# etcendend
Finally, I cannot understand the purpose of the following expectation for the guest context:
expect(page).to_nothave_content"Today, BigCo's CFO announced record growth."
This expectation does not rely on user or guest context.(Neither would display it.)
In conclusion, my ideal sample code would be like this:
context"as a guest"dobackgrounddo# set up news releaseendscenario"reads a news release"dopending"You write this one!"visitroot_pathclick_link"News"expect(page).to_nothave_content'Add News Release'click_link"2013-08-01: Record profits for BigCo!"expect(page).tohave_content"Today, BigCo's CFO announced record growth."endend
I would appreciate if you could take it into consideration.
The text was updated successfully, but these errors were encountered:
I tried the following pending scenario by myself and found some issues.
First, the following expectations do not work well because they are treated as four sentences.
The first one failed so I noticed the problem, but the second passed, so without false-positive test it is hard to notice that the test is imperfect.
Second, this scenario requires setting up for test data(news releases). I feel it should be indicated in the test code like this:
Finally, I cannot understand the purpose of the following expectation for the guest context:
This expectation does not rely on user or guest context.(Neither would display it.)
In conclusion, my ideal sample code would be like this:
I would appreciate if you could take it into consideration.
The text was updated successfully, but these errors were encountered: