cirandas.net

ref: master

features/unblock_button.feature


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Feature: unblock button
  As an environment administrator
  I want to unblock an enterprise
  In order to try to activate it again

  Background:
    Given the following enterprise
      | identifier        | name              |
      | sample-enterprise | Sample Enterprise |
    And the following blocks
      | owner             | type                           |
      | sample-enterprise | DisabledEnterpriseMessageBlock |
    And enterprise "Sample Enterprise" is disabled

  Scenario: the environment administrator unblocks a blocked enterprise
    Given I am logged in as admin
    And enterprise "Sample Enterprise" is blocked
    And I am on sample-enterprise's homepage
    When I follow "Unblock"
    Then I should not see "Unblock"

  Scenario: a not administrator user can't see "Unblock" button
    Given the following user
      | login     | name       |
      | joaosilva | Joao Silva |
    And I am logged in as "joaosilva"
    And enterprise "Sample Enterprise" is blocked
    When I am on sample-enterprise's homepage
    Then I should not see "Unblock"

  Scenario: a not blocked enterprise should not show "Unblock" button
    Given I am logged in as admin
    When I am on sample-enterprise's homepage
    Then I should not see "Unblock"