spreewald 2.2.4 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -1
- data/.travis.yml +14 -15
- data/CHANGELOG.md +34 -2
- data/Gemfile +1 -2
- data/Gemfile.lock +1 -16
- data/Gemfile.ruby266 +9 -0
- data/Gemfile.ruby266.lock +65 -0
- data/README.md +76 -34
- data/Rakefile +22 -7
- data/examples/paths.rb +36 -0
- data/examples/selectors.rb +28 -0
- data/lib/spreewald/all_steps.rb +4 -1
- data/lib/spreewald/browser_tab_steps.rb +91 -0
- data/lib/spreewald/development_steps.rb +2 -1
- data/lib/spreewald/email_steps.rb +11 -4
- data/lib/spreewald/file_attachment_steps.rb +3 -21
- data/lib/spreewald/time_steps.rb +102 -0
- data/lib/spreewald/timecop_steps.rb +6 -76
- data/lib/spreewald/web_steps.rb +8 -16
- data/lib/spreewald_support/driver_info.rb +8 -0
- data/lib/spreewald_support/tolerance_for_selenium_sync_issues.rb +9 -3
- data/lib/spreewald_support/version.rb +1 -1
- data/support/step_definition.rb +1 -1
- data/support/step_definition_file.rb +2 -0
- data/tests/rails-3_capybara-1/Gemfile +2 -1
- data/tests/rails-3_capybara-1/Gemfile.lock +3 -1
- data/tests/rails-3_capybara-1/app +1 -1
- data/tests/rails-3_capybara-1/config/cucumber.yml +1 -1
- data/tests/rails-3_capybara-1/config/database.yml +1 -1
- data/tests/rails-3_capybara-1/config/routes.rb +1 -0
- data/tests/rails-3_capybara-1/db +1 -1
- data/tests/rails-3_capybara-1/features/shared +1 -1
- data/tests/rails-3_capybara-1/features/support/paths.rb +1 -1
- data/tests/rails-3_capybara-1/features/support/selectors.rb +1 -1
- data/tests/rails-3_capybara-1/public +1 -1
- data/tests/rails-3_capybara-2/Gemfile +2 -1
- data/tests/rails-3_capybara-2/Gemfile.lock +3 -1
- data/tests/rails-3_capybara-2/Rakefile +1 -1
- data/tests/rails-3_capybara-2/app +1 -1
- data/tests/rails-3_capybara-2/config +1 -1
- data/tests/rails-3_capybara-2/config.ru +1 -1
- data/tests/rails-3_capybara-2/db +1 -1
- data/tests/rails-3_capybara-2/features +1 -1
- data/tests/rails-3_capybara-2/public +1 -1
- data/tests/rails-3_capybara-2/script +1 -1
- data/tests/rails-4_capybara-3/Gemfile +1 -1
- data/tests/rails-4_capybara-3/Gemfile.lock +3 -3
- data/tests/rails-4_capybara-3/app +1 -1
- data/tests/rails-4_capybara-3/config/routes.rb +1 -0
- data/tests/rails-4_capybara-3/db +1 -1
- data/tests/rails-4_capybara-3/features/development_steps.feature +1 -1
- data/tests/rails-4_capybara-3/features/email_steps.feature +1 -1
- data/tests/rails-4_capybara-3/features/overriding.feature +1 -1
- data/tests/rails-4_capybara-3/features/step_definitions/overriding_steps.rb +1 -1
- data/tests/rails-4_capybara-3/features/step_definitions/test_steps.rb +1 -1
- data/tests/rails-4_capybara-3/features/support/paths.rb +1 -1
- data/tests/rails-4_capybara-3/features/support/selectors.rb +1 -1
- data/tests/rails-4_capybara-3/features/table_steps.feature +1 -1
- data/tests/rails-4_capybara-3/features/time_steps.feature +1 -0
- data/tests/rails-4_capybara-3/features/web_steps.feature +1 -1
- data/tests/rails-4_capybara-3/public/fixture_files +1 -1
- data/tests/rails-6_capybara-3/.ruby-version +1 -0
- data/tests/rails-6_capybara-3/Gemfile +25 -0
- data/tests/rails-6_capybara-3/Gemfile.lock +264 -0
- data/tests/rails-6_capybara-3/README.md +24 -0
- data/tests/rails-6_capybara-3/Rakefile +6 -0
- data/tests/rails-6_capybara-3/app/controllers +1 -0
- data/tests/rails-6_capybara-3/app/mailers/application_mailer.rb +4 -0
- data/tests/rails-6_capybara-3/app/mailers/spreewald_mailer.rb +30 -0
- data/tests/rails-6_capybara-3/app/models/application_record.rb +3 -0
- data/tests/rails-6_capybara-3/app/views +1 -0
- data/tests/rails-6_capybara-3/bin/bundle +114 -0
- data/tests/rails-6_capybara-3/bin/rails +4 -0
- data/tests/rails-6_capybara-3/bin/rake +4 -0
- data/tests/rails-6_capybara-3/bin/setup +33 -0
- data/tests/rails-6_capybara-3/config.ru +5 -0
- data/tests/rails-6_capybara-3/config/application.rb +35 -0
- data/tests/rails-6_capybara-3/config/boot.rb +3 -0
- data/tests/rails-6_capybara-3/config/cucumber.yml +9 -0
- data/tests/rails-6_capybara-3/config/database.yml +25 -0
- data/tests/rails-6_capybara-3/config/environment.rb +5 -0
- data/tests/rails-6_capybara-3/config/environments/development.rb +48 -0
- data/tests/rails-6_capybara-3/config/environments/test.rb +45 -0
- data/tests/rails-6_capybara-3/config/initializers/application_controller_renderer.rb +8 -0
- data/tests/rails-6_capybara-3/config/initializers/backtrace_silencers.rb +7 -0
- data/tests/rails-6_capybara-3/config/initializers/content_security_policy.rb +28 -0
- data/tests/rails-6_capybara-3/config/initializers/cookies_serializer.rb +5 -0
- data/tests/rails-6_capybara-3/config/initializers/filter_parameter_logging.rb +4 -0
- data/tests/rails-6_capybara-3/config/initializers/inflections.rb +16 -0
- data/tests/rails-6_capybara-3/config/initializers/mime_types.rb +4 -0
- data/tests/rails-6_capybara-3/config/initializers/wrap_parameters.rb +14 -0
- data/tests/rails-6_capybara-3/config/locales/en.yml +33 -0
- data/tests/rails-6_capybara-3/config/routes.rb +1 -0
- data/tests/rails-6_capybara-3/db +1 -0
- data/tests/rails-6_capybara-3/features/development_steps.feature +1 -0
- data/tests/rails-6_capybara-3/features/email_steps.feature +1 -0
- data/tests/rails-6_capybara-3/features/overriding.feature +1 -0
- data/tests/{shared/app/views/emails/send_email.haml → rails-6_capybara-3/features/step_definitions/.gitkeep} +0 -0
- data/tests/rails-6_capybara-3/features/step_definitions/overriding_steps.rb +1 -0
- data/tests/rails-6_capybara-3/features/step_definitions/test_steps.rb +1 -0
- data/tests/rails-6_capybara-3/features/support/env.rb +66 -0
- data/tests/rails-6_capybara-3/features/support/paths.rb +1 -0
- data/tests/rails-6_capybara-3/features/support/selectors.rb +1 -0
- data/tests/rails-6_capybara-3/features/support/selenium.rb +3 -0
- data/tests/rails-6_capybara-3/features/table_steps.feature +1 -0
- data/tests/rails-6_capybara-3/features/time_steps.feature +1 -0
- data/tests/rails-6_capybara-3/features/web_steps.feature +1 -0
- data/tests/{shared/db/migrate/.gitignore → rails-6_capybara-3/lib/tasks/.keep} +0 -0
- data/tests/rails-6_capybara-3/lib/tasks/cucumber.rake +76 -0
- data/tests/rails-6_capybara-3/log/.keep +0 -0
- data/tests/rails-6_capybara-3/public/404.html +67 -0
- data/tests/rails-6_capybara-3/public/422.html +67 -0
- data/tests/rails-6_capybara-3/public/500.html +66 -0
- data/tests/rails-6_capybara-3/public/favicon.ico +0 -0
- data/tests/rails-6_capybara-3/public/fixture_files +1 -0
- data/tests/rails-6_capybara-3/script/cucumber +11 -0
- data/tests/shared/app/controllers/application_controller.rb +9 -0
- data/tests/shared/app/controllers/authenticated_controller.rb +10 -2
- data/tests/shared/app/controllers/emails_controller.rb +25 -7
- data/tests/shared/app/controllers/forms_controller.rb +3 -0
- data/tests/shared/app/controllers/static_pages_controller.rb +23 -0
- data/tests/shared/app/models/mailer.rb +16 -0
- data/tests/shared/app/views/layouts/mailer.html.erb +13 -0
- data/tests/shared/app/views/layouts/mailer.text.erb +1 -0
- data/tests/shared/app/views/mailer/{email.haml → email.text.erb} +0 -0
- data/tests/shared/app/views/mailer/html_email_with_links.haml +6 -0
- data/tests/shared/app/views/mailer/text_email_with_links.text.erb +6 -0
- data/tests/shared/app/views/spreewald_mailer +1 -0
- data/tests/shared/app/views/static_pages/tab_1.haml +3 -0
- data/tests/shared/app/views/static_pages/tab_2.haml +2 -0
- data/tests/shared/app/views/static_pages/tab_3.haml +1 -0
- data/tests/shared/app/views/static_pages/time.html.haml +2 -0
- data/tests/shared/app/views/static_pages/visibility.html.haml +8 -1
- data/tests/shared/app/views/static_pages/within.html.haml +3 -0
- data/tests/shared/config/routes.rb +37 -0
- data/tests/shared/db/migrate/.keep +0 -0
- data/tests/shared/features/shared/browser_tab_steps.feature +103 -0
- data/tests/shared/features/shared/email_steps.feature +18 -0
- data/tests/shared/features/shared/time_steps.feature +31 -0
- data/tests/shared/features/shared/web_steps.feature +17 -0
- metadata +149 -12
- data/tests/rails-3_capybara-1/config/routes.rb +0 -5
- data/tests/rails-4_capybara-3/.gitignore +0 -17
- data/tests/rails-4_capybara-3/config/routes.rb +0 -3
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
../../shared/public/fixture_files/
|
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
vendored_cucumber_bin = Dir["#{File.dirname(__FILE__)}/../vendor/{gems,plugins}/cucumber*/bin/cucumber"].first
|
5
|
+
if vendored_cucumber_bin
|
6
|
+
load File.expand_path(vendored_cucumber_bin)
|
7
|
+
else
|
8
|
+
require 'rubygems' unless ENV['NO_RUBYGEMS']
|
9
|
+
require 'cucumber'
|
10
|
+
load Cucumber::BINARY
|
11
|
+
end
|
@@ -1,9 +1,17 @@
|
|
1
1
|
class AuthenticatedController < ApplicationController
|
2
2
|
|
3
|
-
|
3
|
+
if Rails.version.to_i >= 5
|
4
|
+
before_action :authenticate
|
5
|
+
else
|
6
|
+
before_filter :authenticate
|
7
|
+
end
|
4
8
|
|
5
9
|
def page
|
6
|
-
|
10
|
+
if Rails.version.to_i >= 5
|
11
|
+
render :plain => 'Action reached'
|
12
|
+
else
|
13
|
+
render :text => 'Action reached'
|
14
|
+
end
|
7
15
|
end
|
8
16
|
|
9
17
|
private
|
@@ -1,17 +1,35 @@
|
|
1
1
|
class EmailsController < ApplicationController
|
2
2
|
|
3
3
|
def do_nothing
|
4
|
-
|
4
|
+
render_nothing
|
5
5
|
end
|
6
|
-
|
6
|
+
|
7
7
|
def send_email
|
8
|
-
|
9
|
-
|
8
|
+
deliver :email
|
9
|
+
render_nothing
|
10
|
+
end
|
11
|
+
|
12
|
+
def send_html_email_with_links
|
13
|
+
deliver :html_email_with_links
|
14
|
+
render_nothing
|
15
|
+
end
|
16
|
+
|
17
|
+
def send_text_email_with_links
|
18
|
+
deliver :text_email_with_links
|
19
|
+
render_nothing
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def deliver(method_name)
|
25
|
+
case
|
26
|
+
when Rails.version.to_i >= 5
|
27
|
+
SpreewaldMailer.send(method_name).deliver
|
28
|
+
when Rails.version.to_i >= 3
|
29
|
+
Mailer.public_send(method_name).deliver
|
10
30
|
else
|
11
|
-
Mailer.
|
31
|
+
Mailer.public_send("deliver_#{method_name}")
|
12
32
|
end
|
13
|
-
|
14
|
-
render :nothing => true
|
15
33
|
end
|
16
34
|
|
17
35
|
end
|
@@ -9,16 +9,39 @@ class StaticPagesController < ApplicationController
|
|
9
9
|
def link_to_home
|
10
10
|
end
|
11
11
|
|
12
|
+
def links
|
13
|
+
end
|
14
|
+
|
15
|
+
def numbers
|
16
|
+
end
|
17
|
+
|
12
18
|
def overriden
|
13
19
|
end
|
14
20
|
|
15
21
|
def see_element
|
16
22
|
end
|
17
23
|
|
24
|
+
def tab_1
|
25
|
+
end
|
26
|
+
|
27
|
+
def tab_2
|
28
|
+
end
|
29
|
+
|
30
|
+
def tab_3
|
31
|
+
end
|
32
|
+
|
18
33
|
def visibility
|
19
34
|
end
|
20
35
|
|
21
36
|
def within
|
22
37
|
end
|
23
38
|
|
39
|
+
def link_target
|
40
|
+
render_nothing
|
41
|
+
end
|
42
|
+
|
43
|
+
def second_link_target
|
44
|
+
render_nothing
|
45
|
+
end
|
46
|
+
|
24
47
|
end
|
@@ -21,6 +21,14 @@ class Mailer < ActionMailer::Base
|
|
21
21
|
)
|
22
22
|
end
|
23
23
|
|
24
|
+
def html_email_with_links
|
25
|
+
email
|
26
|
+
end
|
27
|
+
|
28
|
+
def text_email_with_links
|
29
|
+
email
|
30
|
+
end
|
31
|
+
|
24
32
|
else
|
25
33
|
|
26
34
|
def email
|
@@ -34,6 +42,14 @@ class Mailer < ActionMailer::Base
|
|
34
42
|
body BODY
|
35
43
|
end
|
36
44
|
|
45
|
+
def html_email_with_links
|
46
|
+
email
|
47
|
+
end
|
48
|
+
|
49
|
+
def text_email_with_links
|
50
|
+
email
|
51
|
+
end
|
52
|
+
|
37
53
|
end
|
38
54
|
|
39
55
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= yield %>
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
tests/shared/app/views/mailer
|
@@ -0,0 +1 @@
|
|
1
|
+
%h1 Third browser tab
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
get '/authenticated/page', to: 'authenticated#page'
|
3
|
+
|
4
|
+
get '/downloads/spreadsheet', to: 'downloads#spreadsheet'
|
5
|
+
get '/downloads/spreadsheet', to: 'downloads#spreadsheet'
|
6
|
+
|
7
|
+
get '/emails/do_nothing', to: 'emails#do_nothing'
|
8
|
+
get '/emails/send_email', to: 'emails#send_email'
|
9
|
+
get '/emails/send_html_email_with_links', to: 'emails#send_html_email_with_links'
|
10
|
+
get '/emails/send_text_email_with_links', to: 'emails#send_text_email_with_links'
|
11
|
+
|
12
|
+
get '/forms/checkbox_form', to: 'forms#checkbox_form'
|
13
|
+
get '/forms/disabled_elements', to: 'forms#disabled_elements'
|
14
|
+
get '/forms/form1', to: 'forms#form1'
|
15
|
+
get '/forms/form2', to: 'forms#form2'
|
16
|
+
get '/forms/select_fields', to: 'forms#select_fields'
|
17
|
+
get '/forms/invalid_form', to: 'forms#invalid_form'
|
18
|
+
|
19
|
+
get '/static_pages/click_on', to: 'static_pages#click_on'
|
20
|
+
get '/static_pages/home', to: 'static_pages#home'
|
21
|
+
get '/static_pages/link_target', to: 'static_pages#link_target'
|
22
|
+
get '/static_pages/link_to_home', to: 'static_pages#link_to_home'
|
23
|
+
get '/static_pages/links', to: 'static_pages#links'
|
24
|
+
get '/static_pages/numbers', to: 'static_pages#numbers'
|
25
|
+
get '/static_pages/overridden', to: 'static_pages#overridden'
|
26
|
+
get '/static_pages/second_link_target', to: 'static_pages#second_link_target'
|
27
|
+
get '/static_pages/see_element', to: 'static_pages#see_element'
|
28
|
+
get '/static_pages/tab_1', to: 'static_pages#tab_1'
|
29
|
+
get '/static_pages/tab_2', to: 'static_pages#tab_2'
|
30
|
+
get '/static_pages/tab_3', to: 'static_pages#tab_3'
|
31
|
+
get '/static_pages/time', to: 'static_pages#time'
|
32
|
+
get '/static_pages/visibility', to: 'static_pages#visibility'
|
33
|
+
get '/static_pages/within', to: 'static_pages#within'
|
34
|
+
|
35
|
+
get '/tables/table1', to: 'tables#table1'
|
36
|
+
get '/tables/table_with_weird_spaces', to: 'tables#table_with_weird_spaces'
|
37
|
+
end
|
File without changes
|
@@ -0,0 +1,103 @@
|
|
1
|
+
@javascript
|
2
|
+
Feature: Browser tab steps
|
3
|
+
|
4
|
+
Background: Access some content in a first tab
|
5
|
+
Given I go to "/static_pages/tab_1"
|
6
|
+
Then I should see "First browser tab"
|
7
|
+
And there should be 1 browser tab
|
8
|
+
|
9
|
+
|
10
|
+
Scenario: I open (.+?) in a new browser tab
|
11
|
+
When I open "/static_pages/tab_2" in a new browser tab
|
12
|
+
Then I should see "Second browser tab"
|
13
|
+
And there should be 2 browser tabs
|
14
|
+
|
15
|
+
When I open "/static_pages/tab_3" in a new browser tab
|
16
|
+
Then I should see "Third browser tab"
|
17
|
+
And there should be 3 browser tabs
|
18
|
+
|
19
|
+
|
20
|
+
Scenario: I close the browser tab
|
21
|
+
When I open "/static_pages/tab_2" in a new browser tab
|
22
|
+
And I open "/static_pages/tab_3" in a new browser tab
|
23
|
+
Then I should see "Third browser tab"
|
24
|
+
And there should be 3 browser tabs
|
25
|
+
|
26
|
+
When I close the browser tab
|
27
|
+
Then there should be 2 browser tabs
|
28
|
+
And I should see "First browser tab"
|
29
|
+
|
30
|
+
When I close the browser tab
|
31
|
+
Then there should be 1 browser tab
|
32
|
+
And I should see "Second browser tab"
|
33
|
+
|
34
|
+
|
35
|
+
Scenario: I switch to the new(?:ly opened)? browser tab
|
36
|
+
When I follow "Click to open tab 2"
|
37
|
+
Then I should see "First browser tab"
|
38
|
+
|
39
|
+
When I switch to the newly opened browser tab
|
40
|
+
Then I should see "Second browser tab"
|
41
|
+
|
42
|
+
When I follow "Click to open tab 3"
|
43
|
+
And I switch to the new browser tab
|
44
|
+
Then I should see "Third browser tab"
|
45
|
+
|
46
|
+
|
47
|
+
Scenario: I switch(?: back)? to the previous browser tab
|
48
|
+
When I open "/static_pages/tab_2" in a new browser tab
|
49
|
+
Then I should see "Second browser tab"
|
50
|
+
And there should be 2 browser tabs
|
51
|
+
|
52
|
+
When I switch back to the previous browser tab
|
53
|
+
Then I should see "First browser tab"
|
54
|
+
And there should be 2 browser tabs
|
55
|
+
|
56
|
+
And I open "/static_pages/tab_3" in a new browser tab
|
57
|
+
Then I should see "Third browser tab"
|
58
|
+
And there should be 3 browser tabs
|
59
|
+
|
60
|
+
When I switch to the previous browser tab
|
61
|
+
Then I should see "Second browser tab"
|
62
|
+
And there should be 3 browser tabs
|
63
|
+
|
64
|
+
|
65
|
+
Scenario: I should have opened a new browser tab
|
66
|
+
This step must be preceded by "I may open a new browser tab"
|
67
|
+
|
68
|
+
When I may open a new browser tab
|
69
|
+
And I follow "Click to open tab 2"
|
70
|
+
Then I should have opened a new browser tab
|
71
|
+
And there should be 2 browser tabs
|
72
|
+
|
73
|
+
|
74
|
+
Scenario: I should not have opened a new browser tab
|
75
|
+
This step must be preceded by "I may open a new browser tab"
|
76
|
+
|
77
|
+
When I may open a new browser tab
|
78
|
+
And I follow "Follow link WITHOUT opening a new tab"
|
79
|
+
Then I should not have opened a new browser tab
|
80
|
+
And there should be 1 browser tabs
|
81
|
+
|
82
|
+
|
83
|
+
Scenario: there should be (\d+) browser tabs?
|
84
|
+
Given there should be 1 browser tab
|
85
|
+
When I open "/static_pages/tab_2" in a new browser tab
|
86
|
+
Then there should be 2 browser tabs
|
87
|
+
|
88
|
+
When I open "/static_pages/tab_3" in a new browser tab
|
89
|
+
Then there should be 3 browser tabs
|
90
|
+
|
91
|
+
When I open "/static_pages/tab_3" in a new browser tab
|
92
|
+
Then there should be 4 browser tabs
|
93
|
+
|
94
|
+
|
95
|
+
Scenario: there should be at least (\d+) browser tabs?
|
96
|
+
Given there should be at least 1 browser tab
|
97
|
+
When I open "/static_pages/tab_2" in a new browser tab
|
98
|
+
Then there should be at least 2 browser tabs
|
99
|
+
|
100
|
+
When I open "/static_pages/tab_3" in a new browser tab
|
101
|
+
Then there should be at least 1 browser tabs
|
102
|
+
Then there should be at least 2 browser tabs
|
103
|
+
Then there should be at least 3 browser tabs
|
@@ -214,3 +214,21 @@ Feature: Test Spreewald's email steps
|
|
214
214
|
line
|
215
215
|
'''
|
216
216
|
"""
|
217
|
+
|
218
|
+
|
219
|
+
Scenario: /^I follow the (first|second|third)? ?link in the e?mail$/ (HTML e-mail body)
|
220
|
+
When I go to "/emails/send_html_email_with_links"
|
221
|
+
And I follow the first link in the email
|
222
|
+
Then I should be on "/static_pages/link_target"
|
223
|
+
|
224
|
+
When I follow the second link in the email
|
225
|
+
Then I should be on "/static_pages/second_link_target"
|
226
|
+
|
227
|
+
|
228
|
+
Scenario: /^I follow the (first|second|third)? ?link in the e?mail$/ (text e-mail body)
|
229
|
+
When I go to "/emails/send_text_email_with_links"
|
230
|
+
And I follow the first link in the email
|
231
|
+
Then I should be on "/static_pages/link_target"
|
232
|
+
|
233
|
+
When I follow the second link in the email
|
234
|
+
Then I should be on "/static_pages/second_link_target"
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# The time steps use the timecop gem or ActiveSupport 4.1, depending on what is
|
2
|
+
# available.
|
3
|
+
# In order to test both implementations, the rails 3 test projects (Capybara 1 & 2)
|
4
|
+
# use timecop to run this feature, while the rails 4 & 6 test projects (Capybara 6)
|
5
|
+
# use ActiveSupport for this feature.
|
6
|
+
|
7
|
+
Feature: Time steps
|
8
|
+
Scenario: /^the (?:date|time) is "?(\d{4}-\d{2}-\d{2}(?: \d{1,2}:\d{2})?)"?$/
|
9
|
+
Given the time is "2020-02-03 02:12"
|
10
|
+
When I go to "/static_pages/time"
|
11
|
+
Then I should see "The current date is 2020-02-03."
|
12
|
+
And I should see "The current time is 02:12."
|
13
|
+
|
14
|
+
Given the time is 23:24
|
15
|
+
When I go to "/static_pages/time"
|
16
|
+
Then I should see "The current time is 23:24."
|
17
|
+
|
18
|
+
Scenario: Set just the date
|
19
|
+
Given the date is "2020-02-03"
|
20
|
+
When I go to "/static_pages/time"
|
21
|
+
Then I should see "The current date is 2020-02-03."
|
22
|
+
|
23
|
+
Scenario: it is (\d+|an?|some|a few) (seconds?|minutes?|hours?|days?|weeks?|months?|years?) (later|earlier)
|
24
|
+
Given the time is "23:00"
|
25
|
+
When it is 24 minutes later
|
26
|
+
And I go to "/static_pages/time"
|
27
|
+
Then I should see "The current time is 23:24."
|
28
|
+
|
29
|
+
When it is an hour earlier
|
30
|
+
And I go to "/static_pages/time"
|
31
|
+
Then I should see "The current time is 22:24"
|