私はこれらのどちらかがうまくいくことを知っていますが、私はルビー/キュウリコミュニティのより良いメンバーになろうとしています。ウェブサイトの複数のセクションにリンクがないかどうかをテストするストーリーがありますが、表示されないはずです。したがって、これら2つの方法のどちらが、シナリオを作成するための最良の方法です。繰り返しになりますが、どちらも機能することは理解していますが、ベストプラクティスソリューションを探しています。オプションBはすべて異なる「Then」ステップをテストしているため、通常はオプションBを使用します。しかし、私はいくつかの調査を行っており、同じステートメントですべてのシナリオをテストできるので、自分自身を推測しています。「与えられた」と「その後」の両方の手順を変更する場合にのみ、新しいシナリオを作成する必要があると読んでいました。 。
A。
Scenario: A user that cannot access A, B, C, or D
Given I am a, user without access to A, B, C, or D
When I navigate to reports
Then I see the A header
But I cannot click on A's header
And I see error message under A stating the user does not have access
And I do not see the B section
And I do not see the C section
And I do not see the D section
また
B。
Scenario: A user that cannot access A
Given I am a, user without access to A
When I navigate to reports
Then I see the A header
And I see error message under A stating the user does not have access
But I cannot click on A's header
Scenario: A user that cannot access B
Given I am a, user without access to B
When I navigate to reports
Then I do not see the B section
Scenario: A user that cannot access C
Given I am a, user without access to C
When I navigate to reports
Then I do not see the C section
Scenario: A user that cannot access D
Given I am a, user without access to D
When I navigate to reports
Then I do not see the D section