Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pages/article_page.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require_relative 'demo_app_page'
class ArticlePage < DemoAppPage
path '/articles{/id}'
validate :url, %r{\/articles\/\d+\/?\z}
validate :url, %r{/articles/\d+/?\z}

element :comment_field, :fillable_field, 'comment_body'
element :add_comment_button, :button, 'Create comment'
Expand Down
2 changes: 1 addition & 1 deletion pages/change_password_page.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require_relative 'demo_app_page'
class ChangePasswordPage < DemoAppPage
path '/users/password/edit?reset_password_token={token}'
validate :url, %r{\/users\/password(?:\z|\/edit)}
validate :url, %r{/users/password(?:\z|/edit)}

element :password_input, :fillable_field, 'user_password'
element :confirm_password_input, :fillable_field, 'user_password_confirmation'
Expand Down
2 changes: 1 addition & 1 deletion pages/confirmation_email_page.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require_relative 'demo_app_page'
class ConfirmationEmailPage < DemoAppPage
path '/users/confirmation?confirmation_token={token}'
validate :url, %r{\/users\/confirmation}
validate :url, %r{/users/confirmation}
end
2 changes: 1 addition & 1 deletion pages/forgot_password_page.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require_relative 'demo_app_page'
class ForgotPasswordPage < DemoAppPage
path '/users/password/new'
validate :url, %r{\/users\/password}
validate :url, %r{/users/password}
validate :title, /Demo web application - Forgot your password\?/

element :email_input, :fillable_field, 'user_email'
Expand Down
2 changes: 1 addition & 1 deletion pages/home_page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class HomePage < DemoAppPage
path '/'
validate :title, /\ADemo web application - Home\z/
validate :url, %r{\A(?:.*?:\/\/)?[^\/]*\/?\z}
validate :url, %r{\A(?:.*?://)?[^/]*/?\z}

element :article_link, :xpath, ->(title) { ".//a[.='#{title}']" }
element :article_group, :xpath, ->(number) { "(//*[@class=\"article__group_title\"])[#{number}]" }
Expand Down
2 changes: 1 addition & 1 deletion pages/login_page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class LoginPage < DemoAppPage
path '/users/sign_in'
validate :title, /\ADemo web application - Login form\z/
# Demo web application - Login form
validate :url, %r{\/sign_in\/?\z}
validate :url, %r{/sign_in/?\z}

element :email_input, :fillable_field, 'user_email'
element :password_input, :fillable_field, 'user_password'
Expand Down
2 changes: 1 addition & 1 deletion pages/user_view_page.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require_relative 'demo_app_page'
class UserViewPage < DemoAppPage
path '/users/{/id}'
validate :url, %r{\/users\/\d+\z}
validate :url, %r{/users/\d+\z}
end