software_registration.feature 19.7 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436
Feature: software registration
  As a user
  I want to create a new software
  So that I can have software communities on my network

  Background:
    Given "MpogSoftwarePlugin" plugin is enabled
    And SoftwareInfo has initial default values on database
    And I am logged in as admin
    And I go to /admin/plugins
    And I check "MpogSoftwarePlugin"
    And I press "Save changes"

  @selenium
  Scenario: Do not show error message if all required fields are correctly filled
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I fill in "community_name" with "test name"
    And I fill in "language__version" with "2.0.0"
    And I fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And I fill in "operating_system__version" with "3.0"
    And I fill in "software_info_operating_platform" with "test operating platform"
    And fill in "software_info_acronym" with "SFTW"
    And I press "Create"
    Then I should see "Manage my groups"

  Scenario: Show operating_platform errors if this field is blank
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And fill in "community_name" with "test"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And fill in "software_info_acronym" with "SFTW"
    And I press "Create"
    Then I should see "Operating platform can't be blank"

  Scenario: Do not show operating_platform errors if this field is not blank
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And fill in "software_info_operating_platform" with "test operating platform"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And I press "Create"
    Then I should not see "Operating platform can't be blank"

  @selenium
  Scenario: Show software_language errors if version is blank
  Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And fill in "community_name" with "test"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And I press "Create"
    Then I should see "Software languages is invalid"

  Scenario: Show acronym errors if this field is blank
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And fill in "community_name" with "test"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And I press "Create"
    Then I should see "Acronym can't be blank"

  @selenium
  Scenario: Show database_fields errors version is blank
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And fill in "community_name" with "test"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__operating_system" with "GNU"
    And I press "Create"
    Then I should see "Software databases is invalid"

  Scenario: Show acronym errors if this field has more than 8 characters
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And fill in "community_name" with "test"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__operating_system" with "GNU"
    And I fill in "database__version" with "3.0"
    And I press "Create"
    And fill in "software_info_acronym" with "123456789"
    And I press "Create"
    Then I should see "Acronym can't have more than 8 characteres"

  Scenario: Show operating system errors if this field is not filled
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I press "Create"
    Then I should see "Operating system : at least one must be filled"

  @selenium
  Scenario: Show operating system errors if this field is not filled
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I fill in "operating_system__version" with "3.0"
    And I press "Create"
    Then I should not see "Operating system : at least one must be filled"

  Scenario: Show library fields when click in New Library
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I follow "New Library"
    Then I should see "Name"
    Then I should see "Version"
    Then I should see "License"

  @selenium
  Scenario: Show SoftwareLangue fields when click in New Language
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I follow "New language"
    Then I should see "3" of this selector ".software-language-table"
    #3 because one is always hidden

  @selenium
  Scenario: Show databasefields when click in New database
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I follow "New Database"
    Then I should see "3" of this selector ".database-table"
    #3 because one is always hidden

  @selenium
  Scenario: Create software with libraries
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I follow "New Library"
    And I fill in "community_name" with "test123"
    And fill in "software_info_acronym" with "SFTW"
    And I fill in "software_info_operating_platform" with "test platform"
    And I fill in "library__name" with "test library name"
    And I fill in "library__version" with "test library version"
    And I fill in "library__license" with "test library license"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And I fill in "operating_system__version" with "3.0"
    And I press "Create"
    And I go to /myprofile/test123/profile_editor/edit
    And I should see "Libraries"
    And selector ".library-table" should have any "test library name"
    And selector ".library-table" should have any "test library version"
    Then selector ".library-table" should have any "test library license"

  @selenium
  Scenario: Delete software libraries
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I follow "New Library"
    And I fill in "community_name" with "test123"
    And fill in "software_info_acronym" with "SFTW"
    And I fill in "software_info_operating_platform" with "test platform"
    And I fill in "library__name" with "test name"
    And I fill in "library__version" with "test version"
    And I fill in "library__license" with "test license"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And I fill in "operating_system__version" with "3.0"
    And I press "Create"
    And I go to /myprofile/test123/profile_editor/edit
    And I should see "Libraries"
    And selector ".library-table" should have any "test name"
    And selector ".library-table" should have any "test version"
    And selector ".library-table" should have any "test license"
    And I follow "Delete"
    And I press "Save"
    And I go to /myprofile/test123/profile_editor/edit
    And I should not see "test name" within "#library__name"
    And I should not see "test version" within "#library__version"
    Then I should not see "test license" within "#library__license"

  @selenium
  Scenario: Crete software libraries on software edit
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I fill in "community_name" with "test123"
    And fill in "software_info_acronym" with "SFTW"
    And I fill in "software_info_operating_platform" with "test platform"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And I fill in "operating_system__version" with "3.0"
    And I press "Create"
    And I go to /myprofile/test123/profile_editor/edit
    And I follow "New Library"
    And I fill in "library__name" with "test name"
    And I fill in "library__version" with "test version"
    And I fill in "library__license" with "test license"
    And I press "Save"
    And I go to /myprofile/test123/profile_editor/edit
    And I should see "Libraries"
    And selector ".library-table" should have any "test name"
    And selector ".library-table" should have any "test version"
    Then selector ".library-table" should have any "test license"

  @selenium
  Scenario: Edit software libraries on software edit
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I follow "New Library"
    And I fill in "community_name" with "test123"
    And fill in "software_info_acronym" with "SFTW"
    And I fill in "software_info_operating_platform" with "test platform"
    And I fill in "library__name" with "test name"
    And I fill in "library__version" with "test version"
    And I fill in "library__license" with "test license"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And I fill in "operating_system__version" with "3.0"
    And I press "Create"
    And I go to /myprofile/test123/profile_editor/edit
    And I should see "Libraries"
    And selector ".library-table" should have any "test name"
    And selector ".library-table" should have any "test version"
    And selector ".library-table" should have any "test license"
    And I follow "New Library"
    And I fill in "library__name" with "new name"
    And I fill in "library__version" with "new version"
    And I fill in "library__license" with "new license"
    And I press "Save"
    And I go to /myprofile/test123/profile_editor/edit
    And selector ".library-table" should have any "new name"
    And selector ".library-table" should have any "new version"
    Then selector ".library-table" should have any "new license"

  @selenium
  Scenario: change license field
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I fill in "community_name" with "test123"
    And fill in "software_info_acronym" with "SFTW"
    And I fill in "software_info_operating_platform" with "test platform"
    And I select "GPL-2" from "license_info_version"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And I fill in "operating_system__version" with "3.0"
    And I press "Create"
    And I go to /myprofile/test123/profile_editor/edit
    And I select "GPL-3" from "version"
    And I press "Save"
    And I go to /myprofile/test123/profile_editor/edit
    Then I should see "GPL-3"

  @selenium
  Scenario: license link appears on the create software page
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I fill in "community_name" with "test123"
    And I fill in "software_info_operating_platform" with "test platform"
    And I select "GPL-2" from "license_info_version"
    Then I should see "www.gpl2.com" within "#version_link"

  @selenium
  Scenario: license link changes if the user choose a different license
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I fill in "community_name" with "test123"
    And I fill in "software_info_operating_platform" with "test platform"
    And I select "GPL-2" from "license_info_version"
    And I should see "www.gpl2.com" within "#version_link"
    And I select "GPL-3" from "license_info_version"
    Then I should see "www.gpl3.com" within "#version_link"

  @selenium
  Scenario: Crete software with Language
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I fill in "community_name" with "test123"
    And fill in "software_info_acronym" with "SFTW"
    And I fill in "software_info_operating_platform" with "test platform"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And I fill in "operating_system__version" with "3.0"
    And I press "Create"
    And I go to /myprofile/test123/profile_editor/edit
    And I should see "Programming Languages"
    And selector ".software-language-table" should have any "2.0.0"
    Then selector ".software-language-table" should have any "Linux"

  @selenium
  Scenario: Edit softwareLanguage on profile editor
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I fill in "community_name" with "test123"
    And fill in "software_info_acronym" with "SFTW"
    And I fill in "software_info_operating_platform" with "test platform"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And I fill in "operating_system__version" with "3.0"
    And I press "Create"
    And I go to /myprofile/test123/profile_editor/edit
    And I should see "Programming Languages"
    And selector ".software-language-table" should have any "2.0.0"
    And selector ".software-language-table" should have any "Linux"
    And I select "Python" from "language__programming_language_id"
    And fill in "language__version" with "3.2"
    And fill in "language__operating_system" with "GNU"
    And I press "Save"
    And I go to /myprofile/test123/profile_editor/edit
    And selector ".software-language-table" should have any "Python"
    And selector ".software-language-table" should have any "3.2"
    Then selector ".software-language-table" should have any "GNU"

  @selenium
  Scenario: Adding new softwareLanguage on profile editor
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I fill in "community_name" with "test123"
    And fill in "software_info_acronym" with "SFTW"
    And I fill in "software_info_operating_platform" with "test platform"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And I fill in "operating_system__version" with "3.0"
    And I press "Create"
    And I go to /myprofile/test123/profile_editor/edit
    And I should see "Programming Languages"
    And selector ".software-language-table" should have any "2.0.0"
    And selector ".software-language-table" should have any "Linux"
    And I follow "New language"
    And I click on the first button with class ".delete-dynamic-table"
    And I click on table number "2" selector ".software-language-table" and select the value "Python"
    And I fill with "4.3" in field with name "language[][version]" of table number "2" with class ".software-language-table"
    And I fill with "Windows" in field with name "language[][operating_system]" of table number "2" with class ".software-language-table"
    And I press "Save"
    And I go to /myprofile/test123/profile_editor/edit
    And selector ".software-language-table" should have any "Python"
    And selector ".software-language-table" should have any "4.3"
    Then selector ".software-language-table" should have any "Windows"

  @selenium
  Scenario: Edit softwareDatabase on profile editor
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I fill in "community_name" with "test123"
    And fill in "software_info_acronym" with "SFTW"
    And I fill in "software_info_operating_platform" with "test platform"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.0"
    And I fill in "database__operating_system" with "GNU"
    And I fill in "operating_system__version" with "3.0"
    And I press "Create"
    And I go to /myprofile/test123/profile_editor/edit
    And I should see "Databases"
    And selector ".database-table" should have any "3.0"
    And selector ".database-table" should have any "GNU"
    And I select "PostgreSQL" from "database__database_description_id"
    And fill in "database__version" with "3.2"
    And fill in "database__operating_system" with "Linux"
    And I press "Save"
    And I go to /myprofile/test123/profile_editor/edit
    And selector ".database-table" should have any "PostgreSQL"
    And selector ".database-table" should have any "3.2"
    Then selector ".database-table" should have any "Linux"

  @selenium
  Scenario: Delete softwareDatabase on profile editor
    Given I go to admin_user's control panel
    And I follow "Manage my groups"
    And I follow "Create a new software"
    And I fill in "community_name" with "test123"
    And fill in "software_info_acronym" with "SFTW"
    And I fill in "software_info_operating_platform" with "test platform"
    And fill in "language__version" with "2.0.0"
    And fill in "language__operating_system" with "Linux"
    And I fill in "database__version" with "3.5"
    And I fill in "database__operating_system" with "Solaris"
    And I fill in "operating_system__version" with "3.0"
    And I press "Create"
    And I go to /myprofile/test123/profile_editor/edit
    And I should see "Databases"
    And selector ".database-table" should have any "3.5"
    And selector ".database-table" should have any "Solaris"
    And I follow "New Database"
    And I click on table number "2" selector ".database-table" and select the value "MariaDB"
    And I fill with "4.3" in field with name "database[][version]" of table number "2" with class ".database-table"
    And I fill with "Windows" in field with name "database[][operating_system]" of table number "2" with class ".database-table"
    And I click on the first button with class ".database-table .delete-dynamic-table"
    And I press "Save"
    And I go to /myprofile/test123/profile_editor/edit
    And selector ".database-table" should have any "MariaDB"
    And selector ".database-table" should have any "4.3"
    And selector ".database-table" should have any "Windows"
    And I should not see "4th Dimension"
    And I should not see "3.5"
    And I should not see "Solaris"