Commit f68f7262cb06f304cf8701c6c86e39a6d5a2f5a7

Authored by Diego Camarinha
Committed by Paulo Meireles
1 parent c5336b2e

[Mezuro] Continuing the repository feature.

features/step_definitions/mezuro_steps.rb
... ... @@ -26,8 +26,9 @@ Then /^the field "([^"]*)" is empty$/ do |field_name|
26 26 end
27 27  
28 28 Then /^I should see "([^\"]*)" inside an alert$/ do |message|
29   - selenium.get_alert.should eql(message)
30   - selenium.chooseOkOnNextConfirmation();
  29 + alert = page.driver.browser.switch_to.alert
  30 + assert_equal message, alert.text
  31 + alert.accept
31 32 end
32 33  
33 34 Then /^I should see "([^"]*)" in the "([^"]*)" input$/ do |content, labeltext|
... ... @@ -63,3 +64,9 @@ end
63 64 When /^I erase the "([^"]*)" field$/ do |field_name|
64 65 find_field(field_name).set ""
65 66 end
  67 +
  68 +When /^I fill the fields with the following data$/ do |fields|
  69 + fields.rows_hash.each do |name, value|
  70 + find_field(name.to_s).set value
  71 + end
  72 +end
... ...
plugins/mezuro/features/repository.feature
... ... @@ -30,17 +30,19 @@ Feature: Repository
30 30 And I should see "Configuration"
31 31 And I should see "Add" button
32 32  
  33 + @selenium
33 34 Scenario: I want to add a repository with no name
34 35 Given I follow "Add Repository"
35   - When I fill in the following
36   - | Name | |
37   - | Description | My Description |
38   - | License | ISC License (ISC) |
39   - | Process Period | Not Periodically |
40   - | Type | SUBVERSION |
41   - | Address | https://qt-calculator.svn.sourceforge.net/svnroot/qt-calculator |
42   - | Configuration | Kalibro for Java |
  36 + When I fill the fields with the following data
  37 + | repository_name | |
  38 + | repository_description | My Description |
  39 + | repository_license | ISC License (ISC) |
  40 + | repository_process_period | Not Periodically |
  41 + | repository_type | SUBVERSION |
  42 + | repository_address | https://qt-calculator.svn.sourceforge.net/svnroot/qt-calculator |
  43 + | repository_configuration_id | 1 |
43 44 And I press "Add"
  45 + Then I should see "Please fill all fields marked with (*)." inside an alert
44 46  
45   - Scenario: I want to add a repository with valid attributes
  47 + #Scenario: I want to add a repository with valid attributes
46 48  
... ...