On Wed, Aug 28, 2013 at 7:05 AM, Amir E. Aharoni <
[email protected]> wrote:

> It basically repeats the same tests for logged in and for anon users.
> Is there a more robust way to do it?
>

One thing that comes to my mind is cucumber scenario outlines[1].

So for example this two scenarios:

  Scenario: Page without interlanguage links has cog icon and language
selector
    Given I am on a page without interlanguage links
    When I click the cog icon by Languages in the sidebar
    Then I see the anonymous Language Settings panel

  Scenario: Page without interlanguage links has cog icon and language
selector
    Given I am logged in
      And I am on a page without interlanguage links
    When I click the cog icon by Languages in the sidebar
    Then I see the Language Settings panel

could be refactored like this:

  Scenario Outline: Page without interlanguage links has cog icon and
language selector
    Given I am <user>
      And I am on a page without interlanguage links
    When I click the cog icon by Languages in the sidebar
    Then I see the <user> Language Settings panel

  Examples:
  | user |
  | anonymous |
  | logged in |

Željko
--
1: https://github.com/cucumber/cucumber/wiki/Scenario-Outlines
_______________________________________________
QA mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/qa

Reply via email to