Merge "Revert "Remove user page CTA edit link browser test (move to MobileFrontend)""

This commit is contained in:
jenkins-bot 2018-09-25 16:17:24 +00:00 committed by Gerrit Code Review
commit 1976ef87be
3 changed files with 21 additions and 0 deletions

View file

@ -22,3 +22,14 @@ end
Then(/^there should be a link to my uploads$/) do
expect(on(UserPage).uploads_link_element).to be_visible
end
Then(/^there should be a link to create my user page$/) do
expect(on(UserPage).edit_link_element).to be_visible
end
When(/^I click the create my user page link$/) do
on(UserPage) do |page|
page.wait_until_rl_module_ready('skins.minerva.editor')
page.edit_link_element.click
end
end

View file

@ -5,6 +5,7 @@ class UserPage < ArticlePage
h1(:heading, css: '#section_0')
ul(:user_links, css: '.user-links')
div(:cta_holder, css: '.cta-holder')
a(:talk_link) do |page|
page.user_links_element.element.a(href: /User_talk:/)
end
@ -14,4 +15,7 @@ class UserPage < ArticlePage
a(:uploads_link) do |page|
page.user_links_element.element.a(href: /Special:Uploads\//)
end
a(:edit_link) do |page|
page.cta_holder_element.element.a(href: %r{#/editor/0})
end
end

View file

@ -11,3 +11,9 @@ Feature: User:<username>
And there should be a link to my talk page
And there should be a link to my contributions
And there should be a link to my uploads
Scenario: Check user page is editable
And I should be on my user page
And there should be a link to create my user page
When I click the create my user page link
Then I see the wikitext editor overlay