Commit e7dafeebbd88c9b5b345ab58009803d41c3a84c7

Authored by Alessandro Palmeira + Daniel Alves + Diego Araújo + Guilherme Rojas
Committed by Paulo Meireles
1 parent e55c5668

[Mezuro] More acceptance tests for repository feature.

Showing 1 changed file with 252 additions and 0 deletions   Show diff stats
plugins/mezuro/features/repository.feature 0 → 100644
... ... @@ -0,0 +1,252 @@
  1 +@kalibro_restart
  2 +Feature: Repository
  3 + As a Mezuro user
  4 + I want to create, edit, remove and process a repository
  5 +
  6 + Background:
  7 + Given the following users
  8 + | login | name |
  9 + | joaosilva | Joao Silva |
  10 + And I am logged in as "joaosilva"
  11 + And "Mezuro" plugin is enabled
  12 + And the following community
  13 + | identifier | name |
  14 + | mycommunity | My Community |
  15 + And "Joao Silva" is admin of "My Community"
  16 + And I have a Mezuro project with the following data
  17 + | name | Sample Project |
  18 + | description | Sample Description |
  19 + | community | mycommunity |
  20 + And I have a Mezuro configuration with the following data
  21 + | name | Sample Configuration|
  22 + | description | Sample Description |
  23 + | user | joaosilva |
  24 + And I have a Mezuro reading group with the following data
  25 + | name | Sample Reading group |
  26 + | description | Sample Description |
  27 + | user | joaosilva |
  28 + And I have a Mezuro metric configuration with previous created configuration and reading group
  29 + And I am on article "Sample Project"
  30 +
  31 + Scenario: I want to see the Mezuro repository input form
  32 + When I follow "Add Repository"
  33 + Then I should see "Name"
  34 + And I should see "Description"
  35 + And I should see "License"
  36 + And I should see "Process Period"
  37 + And I should see "Type"
  38 + And I should see "Address"
  39 + And I should see "Configuration"
  40 + And I should see "Add" button
  41 +
  42 + @selenium
  43 + Scenario: I try to add a repository with no name
  44 + Given I follow "Add Repository"
  45 + When I fill the fields with the new following data
  46 + | repository_name | |
  47 + | repository_description | My Description |
  48 + | repository_license | ISC License (ISC) |
  49 + | repository_process_period | Not Periodically |
  50 + | repository_type | SUBVERSION |
  51 + | repository_address | https://project.svn.sourceforge.net/svnroot/project |
  52 + | repository_configuration_id | Sample Configuration |
  53 + And I press "Add"
  54 + Then I should see "Please fill all fields marked with (*)." inside an alert
  55 +
  56 + @selenium
  57 + Scenario: I try to add a repository with no address
  58 + Given I follow "Add Repository"
  59 + When I fill the fields with the new following data
  60 + | repository_name | My Name |
  61 + | repository_description | My Description |
  62 + | repository_license | ISC License (ISC) |
  63 + | repository_process_period | Not Periodically |
  64 + | repository_type | SUBVERSION |
  65 + | repository_address | |
  66 + | repository_configuration_id | Sample Configuration |
  67 + And I press "Add"
  68 + Then I should see "Please fill all fields marked with (*)." inside an alert
  69 +
  70 + @selenium
  71 + Scenario: I try to add a repository with a invalid address
  72 + Given I follow "Add Repository"
  73 + When I fill the fields with the new following data
  74 + | repository_name | My Name |
  75 + | repository_description | My Description |
  76 + | repository_license | ISC License (ISC) |
  77 + | repository_process_period | Not Periodically |
  78 + | repository_type | GIT |
  79 + | repository_address | https://invalid-address.any-extension |
  80 + | repository_configuration_id | Sample Configuration |
  81 + And I press "Add"
  82 + Then I should see "Address does not match type GIT chosen." inside an alert
  83 +
  84 + @selenium
  85 + Scenario: I want to add a repository with valid attributes
  86 + Given I follow "Add Repository"
  87 + When I fill the fields with the new following data
  88 + | repository_name | My Name |
  89 + | repository_description | My Description |
  90 + | repository_license | ISC License (ISC) |
  91 + | repository_process_period | Not Periodically |
  92 + | repository_type | GIT |
  93 + | repository_address | https://github.com/user/project.git |
  94 + | repository_configuration_id | Sample Configuration |
  95 + And I press "Add"
  96 + Then I should see "My Name"
  97 + And I should see "My Description"
  98 + And I should see "ISC License (ISC)"
  99 + And I should see "Not Periodically"
  100 + And I should see "GIT"
  101 + And I should see "https://github.com/user/project.git"
  102 + And I should see "Sample Configuration"
  103 + And I should see "Status"
  104 +
  105 + #FIXME: create the step given I have repository...
  106 + @selenium
  107 + Scenario: I want to see the repository edit form
  108 + Given I follow "Add Repository"
  109 + And I fill the fields with the new following data
  110 + | repository_name | My Name |
  111 + | repository_description | My Description |
  112 + | repository_license | ISC License (ISC) |
  113 + | repository_process_period | Not Periodically |
  114 + | repository_type | GIT |
  115 + | repository_address | https://github.com/user/project.git |
  116 + | repository_configuration_id | Sample Configuration |
  117 + And I press "Add"
  118 + And I am on article "Sample Project"
  119 + When I follow "Edit"
  120 + Then I should see "My Name" in the "repository_name" input
  121 + And I should see "My Description" in the "repository_description" input
  122 + And I should see "ISC License (ISC)" in the "repository_license" select
  123 + And I should see "Not Periodically" in the process period select field
  124 + And I should see "GIT" in the "repository_type" select
  125 + And I should see "https://github.com/user/project.git" in the "repository_address" input
  126 + And I should see "Sample Configuration" in the repository configuration select field
  127 +
  128 + #FIXME: create the step given I have repository...
  129 + @selenium
  130 + Scenario: I edit a Mezuro project with valid attributes
  131 + Given I follow "Add Repository"
  132 + And I fill the fields with the new following data
  133 + | repository_name | My Name |
  134 + | repository_description | My Description |
  135 + | repository_license | ISC License (ISC) |
  136 + | repository_process_period | Not Periodically |
  137 + | repository_type | GIT |
  138 + | repository_address | https://github.com/user/project.git |
  139 + | repository_configuration_id | Sample Configuration |
  140 + And I press "Add"
  141 + And I am on article "Sample Project"
  142 + When I follow "Edit"
  143 + And I fill the fields with the new following data
  144 + | repository_name | Another Name |
  145 + | repository_description | Another Description |
  146 + | repository_license | Apple Public Source License (APSL-2.0) |
  147 + | repository_process_period | Weekly |
  148 + | repository_type | SUBVERSION |
  149 + | repository_address | https://project.svn.sourceforge.net/svnroot/project |
  150 + | repository_configuration_id | Sample Configuration |
  151 + And I press "Add"
  152 + Then I should see "Another Name"
  153 + And I should see "Another Description"
  154 + And I should see "Apple Public Source License (APSL-2.0)"
  155 + And I should see "Weekly"
  156 + And I should see "SUBVERSION"
  157 + And I should see "https://project.svn.sourceforge.net/svnroot/project"
  158 + And I should see "Sample Configuration"
  159 +
  160 + #FIXME: create the step given I have repository...
  161 + @selenium
  162 + Scenario: I try to edit a Mezuro project leaving empty its title
  163 + Given I follow "Add Repository"
  164 + And I fill the fields with the new following data
  165 + | repository_name | My Name |
  166 + | repository_description | My Description |
  167 + | repository_license | ISC License (ISC) |
  168 + | repository_process_period | Not Periodically |
  169 + | repository_type | GIT |
  170 + | repository_address | https://github.com/user/project.git |
  171 + | repository_configuration_id | Sample Configuration |
  172 + And I press "Add"
  173 + And I am on article "Sample Project"
  174 + And I follow "Edit"
  175 + When I erase the "repository_name" field
  176 + And I press "Add"
  177 + Then I should see "Please fill all fields marked with (*)." inside an alert
  178 +
  179 + #FIXME: create the step given I have repository...
  180 + @selenium
  181 + Scenario: I try to edit a Mezuro project leaving empty its address
  182 + Given I follow "Add Repository"
  183 + And I fill the fields with the new following data
  184 + | repository_name | My Name |
  185 + | repository_description | My Description |
  186 + | repository_license | ISC License (ISC) |
  187 + | repository_process_period | Not Periodically |
  188 + | repository_type | GIT |
  189 + | repository_address | https://github.com/user/project.git |
  190 + | repository_configuration_id | Sample Configuration |
  191 + And I press "Add"
  192 + And I am on article "Sample Project"
  193 + And I follow "Edit"
  194 + When I erase the "repository_address" field
  195 + And I press "Add"
  196 + Then I should see "Please fill all fields marked with (*)." inside an alert
  197 +
  198 + #FIXME: create the step given I have repository...
  199 + @selenium
  200 + Scenario: I try to edit a repository with an existing repository name
  201 + Given I follow "Add Repository"
  202 + And I fill the fields with the new following data
  203 + | repository_name | My Name |
  204 + | repository_description | My Description |
  205 + | repository_license | ISC License (ISC) |
  206 + | repository_process_period | Not Periodically |
  207 + | repository_type | GIT |
  208 + | repository_address | https://github.com/user/project.git |
  209 + | repository_configuration_id | Sample Configuration |
  210 + And I press "Add"
  211 + And I am on article "Sample Project"
  212 + And I follow "Add Repository"
  213 + And I fill the fields with the new following data
  214 + | repository_name | Another Name |
  215 + | repository_description | Another Description |
  216 + | repository_license | Apple Public Source License (APSL-2.0) |
  217 + | repository_process_period | Weekly |
  218 + | repository_type | SUBVERSION |
  219 + | repository_address | https://project.svn.sourceforge.net/svnroot/project |
  220 + | repository_configuration_id | Sample Configuration |
  221 + And I press "Add"
  222 + And I am on article "Sample Project"
  223 + When I follow the edit link for "My Name" repository
  224 + And I fill the fields with the new following data
  225 + | repository_name | Another Name |
  226 + | repository_description | Another Description |
  227 + | repository_license | Apple Public Source License (APSL-2.0) |
  228 + | repository_process_period | Weekly |
  229 + | repository_type | SUBVERSION |
  230 + | repository_address | https://project.svn.sourceforge.net/svnroot/project |
  231 + | repository_configuration_id | Sample Configuration |
  232 + And I press "Add"
  233 + #Then I should see "Slug The title (article name) is already being used by another article, please use another title."
  234 + #FIXME fix this validation
  235 +
  236 + #FIXME: Need to define permissions?
  237 + @selenium
  238 + Scenario: I delete a Mezuro repository
  239 + Given I follow "Add Repository"
  240 + And I fill the fields with the new following data
  241 + | repository_name | My Name |
  242 + | repository_description | My Description |
  243 + | repository_license | ISC License (ISC) |
  244 + | repository_process_period | Not Periodically |
  245 + | repository_type | GIT |
  246 + | repository_address | https://github.com/user/project.git |
  247 + | repository_configuration_id | Sample Configuration |
  248 + And I press "Add"
  249 + And I am on article "Sample Project"
  250 + When I follow the remove link for "My Name" repository
  251 + And I should not see "My Name"
  252 +
... ...