jenkins-bot has submitted this change and it was merged.
Change subject: Don't show language button after edit when no languages
......................................................................
Don't show language button after edit when no languages
Bug: 63675
Change-Id: Ibb2bb1abf4e659104e34e933048a9e3fe265f038
---
M templates/page.html
M tests/browser/features/editor_wikitext_saving.feature
M tests/browser/features/step_definitions/create_page_api_steps.rb
M tests/browser/features/step_definitions/language_steps.rb
4 files changed, 23 insertions(+), 0 deletions(-)
Approvals:
Kaldari: Looks good to me, approved
jenkins-bot: Verified
diff --git a/templates/page.html b/templates/page.html
index 1c7a4b0..af9024c 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -31,7 +31,9 @@
{{/hasLanguages}}
{{/inBetaOrAlpha}}
{{^inBetaOrAlpha}}
+ {{#hasLanguages}}
<a href="{{languageUrl}}" class="mw-ui-button mw-ui-progressive button
languageSelector">{{languageLabel}}</a>
+ {{/hasLanguages}}
<a href="{{historyUrl}}" id="mw-mf-last-modified"
data-timestamp="{{lastModifiedTimestamp}}"
data-user-name="{{lastModifiedUserName}}"
data-user-gender="{{lastModifiedUserGender}}"
></a>
diff --git a/tests/browser/features/editor_wikitext_saving.feature
b/tests/browser/features/editor_wikitext_saving.feature
index 8e0c929..8e32a1b 100644
--- a/tests/browser/features/editor_wikitext_saving.feature
+++ b/tests/browser/features/editor_wikitext_saving.feature
@@ -4,6 +4,18 @@
Background:
Given I am logged into the mobile website
+ Scenario: Successful edit on page without languages shows no language button
[bug 63675]
+ And the page "Selenium no languages test page" exists
+ And I do not see the read in another language button
+ When I click the edit button
+ And I see the wikitext editor overlay
+ And I type "ABC GHI" into the editor
+ And I click continue
+ And I click submit
+ Then I see a toast notification
+ And The text of the first heading is "Selenium no languages test page"
+ And I do not see the read in another language button
+
Scenario: Successful edit reloads language button
And I am on the "San Francisco" page
And I see the read in another language button
diff --git a/tests/browser/features/step_definitions/create_page_api_steps.rb
b/tests/browser/features/step_definitions/create_page_api_steps.rb
index 7df6a3e..97b75ce 100644
--- a/tests/browser/features/step_definitions/create_page_api_steps.rb
+++ b/tests/browser/features/step_definitions/create_page_api_steps.rb
@@ -34,3 +34,8 @@
on(APIPage).create "Selenium page issues test page", wikitext
step 'I am on the "Selenium page issues test page" page'
end
+
+Given(/^the page "(.*?)" exists$/) do |title|
+ on(APIPage).create title, 'Test is used by Selenium web driver'
+ step 'I am on the "' + title + '" page'
+end
diff --git a/tests/browser/features/step_definitions/language_steps.rb
b/tests/browser/features/step_definitions/language_steps.rb
index 658ec0c..2c4cdcd 100644
--- a/tests/browser/features/step_definitions/language_steps.rb
+++ b/tests/browser/features/step_definitions/language_steps.rb
@@ -17,3 +17,7 @@
Then(/^I don't see the languages overlay$/) do
on(ArticlePage).overlay_languages_element.should_not be_visible
end
+
+Then(/^I do not see the read in another language button$/) do
+ on(ArticlePage).language_button_element.should_not be_visible
+end
--
To view, visit https://gerrit.wikimedia.org/r/125044
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb2bb1abf4e659104e34e933048a9e3fe265f038
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Awjrichards <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: JGonera <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: Kaldari <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits