Skip to content

Commit

Permalink
Cucumber experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Nov 14, 2017
1 parent eb238b3 commit 44d95d4
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem 'cucumber'
gem 'aruba'
19 changes: 19 additions & 0 deletions features/adding_new_repo.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

Feature: Test the repository manager

Scenario: Adding a new repository
Given the dialog heading should be "Configured Software Repositories"
And I click button "Add"
Then the dialog heading should be "Add On Product"

When I click button "Next"
Then the dialog heading should be "Repository URL"

When I enter "Tumbleweed OSS" into input field "Repository Name"
And I enter "http://download.opensuse.org/tumbleweed/repo/oss/" into input field "URL"
And I click button "Next"
Then the dialog heading should be "Tumbleweed OSS License Agreement"

When I click button "Next"
Then the dialog heading should be "Configured Software Repositories"

22 changes: 22 additions & 0 deletions features/step_definitions/process_steps.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

def set_port(port)
# 14155 is currently an unassigned port
@port = port || ENV["YUI_HTTP_PORT"] || 14155
ENV["YUI_HTTP_PORT"] = @port
end

Given("I start the \"{string}\" application(| on port (\d+))") do |string, _port_str, port|
set_port(port)

pending
end

Given("I use an running libyui application (| on port (\d+))") do | _port_str, port|
set_port(port)

pending
end

# When("I enter {string} into input field {string}") do |string, string2|
# pending # Write code here that turns the phrase above into concrete actions
# end
7 changes: 7 additions & 0 deletions features/step_definitions/ui_action_steps.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
When("I click button \"{string}\"") do |string|
pending # Write code here that turns the phrase above into concrete actions
end

When("I enter {string} into input field {string}") do |string, string2|
pending # Write code here that turns the phrase above into concrete actions
end
8 changes: 8 additions & 0 deletions features/step_definitions/ui_test_steps.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Given("the dialog heading should be {string}") do |string|
pending # Write code here that turns the phrase above into concrete actions
end

Then("the dialog heading should be {string}") do |string|
pending # Write code here that turns the phrase above into concrete actions
end

Empty file added features/support/env.rb
Empty file.

0 comments on commit 44d95d4

Please sign in to comment.