From f68f7262cb06f304cf8701c6c86e39a6d5a2f5a7 Mon Sep 17 00:00:00 2001 From: Daniel Alves + Diego Araújo Date: Wed, 20 Feb 2013 17:41:19 -0300 Subject: [PATCH] [Mezuro] Continuing the repository feature. --- features/step_definitions/mezuro_steps.rb | 11 +++++++++-- plugins/mezuro/features/repository.feature | 20 +++++++++++--------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/features/step_definitions/mezuro_steps.rb b/features/step_definitions/mezuro_steps.rb index 227847c..4cb5018 100644 --- a/features/step_definitions/mezuro_steps.rb +++ b/features/step_definitions/mezuro_steps.rb @@ -26,8 +26,9 @@ Then /^the field "([^"]*)" is empty$/ do |field_name| end Then /^I should see "([^\"]*)" inside an alert$/ do |message| - selenium.get_alert.should eql(message) - selenium.chooseOkOnNextConfirmation(); + alert = page.driver.browser.switch_to.alert + assert_equal message, alert.text + alert.accept end Then /^I should see "([^"]*)" in the "([^"]*)" input$/ do |content, labeltext| @@ -63,3 +64,9 @@ end When /^I erase the "([^"]*)" field$/ do |field_name| find_field(field_name).set "" end + +When /^I fill the fields with the following data$/ do |fields| + fields.rows_hash.each do |name, value| + find_field(name.to_s).set value + end +end diff --git a/plugins/mezuro/features/repository.feature b/plugins/mezuro/features/repository.feature index 7be7b1e..16458d7 100644 --- a/plugins/mezuro/features/repository.feature +++ b/plugins/mezuro/features/repository.feature @@ -30,17 +30,19 @@ Feature: Repository And I should see "Configuration" And I should see "Add" button + @selenium Scenario: I want to add a repository with no name Given I follow "Add Repository" - When I fill in the following - | Name | | - | Description | My Description | - | License | ISC License (ISC) | - | Process Period | Not Periodically | - | Type | SUBVERSION | - | Address | https://qt-calculator.svn.sourceforge.net/svnroot/qt-calculator | - | Configuration | Kalibro for Java | + When I fill the fields with the following data + | repository_name | | + | repository_description | My Description | + | repository_license | ISC License (ISC) | + | repository_process_period | Not Periodically | + | repository_type | SUBVERSION | + | repository_address | https://qt-calculator.svn.sourceforge.net/svnroot/qt-calculator | + | repository_configuration_id | 1 | And I press "Add" + Then I should see "Please fill all fields marked with (*)." inside an alert - Scenario: I want to add a repository with valid attributes + #Scenario: I want to add a repository with valid attributes -- libgit2 0.21.2