Jdlrobson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/125044

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/language_steps.rb
3 files changed, 19 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/44/125044/1

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..1caf592 100644
--- a/tests/browser/features/editor_wikitext_saving.feature
+++ b/tests/browser/features/editor_wikitext_saving.feature
@@ -4,6 +4,19 @@
   Background:
     Given I am logged into the mobile website
 
+  @wip
+  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/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: newchange
Gerrit-Change-Id: Ibb2bb1abf4e659104e34e933048a9e3fe265f038
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to