public_software_validation.feature
2.08 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Feature: edit adherent fields
  As a user
  I want to edit adherent fields
  to mantain my public software up to date.
  Background:
    Given "MpogSoftwarePlugin" plugin is enabled
    And the following users
      | login      | name        | email                  |
      | joaosilva  | Joao Silva  | joaosilva@example.com  |
      | mariasilva | Maria Silva | mariasilva@example.com |
    And SoftwareInfo has initial default values on database
    And I am logged in as mpog_admin
    And I go to /admin/plugins
    And I check "MpogSoftwarePlugin"
    And I press "Save changes"
    And I go to /myprofile/mpog-admin
    And I follow "Create a new software"
    And I fill in "community_name" with "basic software"
    And I fill in "software_info_finality" with "basic software finality"
    And I press "Create"
  Scenario: Disable public software checkbox to non admin users
    Given I am logged in as "joaosilva"
    And I go to /myprofile/basic-software/plugin/mpog_software/edit_software
    And I follow "Specifications"
    Then I should see "Public software" within ".public_software_disabled"
  Scenario: Enable public software checkbox to admin users
    Given I am logged in as mpog_admin
    And I go to /myprofile/basic-software/plugin/mpog_software/edit_software
    And I follow "Specifications"
    Then I should see "Public software" within ".public_software_enabled"
  @selenium
  Scenario: Show adherent fields when checkbox are checked
    Given I am logged in as mpog_admin
    And I go to /myprofile/basic-software/plugin/mpog_software/edit_software
    And I follow "Specifications"
    And I uncheck "software[public_software]"
    And I check "software[public_software]"
    Then I should see "Adherent to e-ping ?"
  @selenium
  Scenario: Don't show adherent fields when checkbox are not checked
    Given I am logged in as mpog_admin
    And I go to /myprofile/basic-software/plugin/mpog_software/edit_software
    And I follow "Specifications"
    And I check "software[public_software]"
    And I uncheck "software[public_software]"
    Then I should not see "Adherent to e-ping ?"