Cmcmahon has uploaded a new change for review.

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


Change subject: IN PROCESS: test for uls cog behavior for anonymous users, 
please review
......................................................................

IN PROCESS: test for uls cog behavior for anonymous users, please review

Change-Id: If3da0d8c2fb8b622473198b9f22a09ef60183a20
---
R features/step_definitions/uls_cog_sidebar_user_steps.rb
M features/support/modules/interlanguage_module.rb
A features/uls_cog_sidebar_anon_user.feature
3 files changed, 90 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/73/67873/1

diff --git a/features/step_definitions/uls_cog_sidebar_logged_user_steps.rb 
b/features/step_definitions/uls_cog_sidebar_user_steps.rb
similarity index 81%
rename from features/step_definitions/uls_cog_sidebar_logged_user_steps.rb
rename to features/step_definitions/uls_cog_sidebar_user_steps.rb
index 1afb3c0..7cd370c 100644
--- a/features/step_definitions/uls_cog_sidebar_logged_user_steps.rb
+++ b/features/step_definitions/uls_cog_sidebar_user_steps.rb
@@ -15,6 +15,12 @@
   visit(NoInterlanguagePage).talk_element.click
 end
 
+Given(/^I navigate to the anonymous Language Settings panel$/) do
+  step 'I am on a page with interlanguage links'
+  step 'I click the cog icon by Languages in the sidebar'
+  step 'I see the anonymous Language Settings panel'
+end
+
 Given(/^I navigate to the Language Settings panel$/) do
   step 'I am on a page with interlanguage links'
   step 'I click the cog icon by Languages in the sidebar'
@@ -65,6 +71,13 @@
   on(InterlanguagePage).enable_input_methods_element.when_visible.should 
be_visible
 end
 
+Then(/^I can navigate back to Input Settings$/) do
+  on(InterlanguagePage) do |page|
+    page.back_to_input
+    page.x_element.should be_visible
+  end
+end
+
 Then(/^I can navigate back to Language Settings$/) do
   on(InterlanguagePage) do |page|
     page.back_to_display
@@ -93,6 +106,13 @@
   on(InterlanguagePage).language_search_element.should be_visible
 end
 
+Then(/^I see the anonymous Language Settings panel$/) do
+  on(NoInterlanguagePage) do |page|
+    page.language_button_element.when_present.should be_visible
+    page.fonts_button_element.should be_visible
+  end
+end
+
 Then(/^I see the Language Settings panel$/) do
   on(NoInterlanguagePage) do |page|
     page.language_button_element.when_present.should be_visible
@@ -109,6 +129,11 @@
   end
 end
 
+Then(/^the cog icon brings up anonymous Language Settings again$/) do
+  step 'I click the cog icon by Languages in the sidebar'
+  step 'I see the anonymous Language Settings panel'
+end
+
 Then(/^the cog icon brings up Language Settings again$/) do
   step 'I click the cog icon by Languages in the sidebar'
   step 'I see the Language Settings panel'
diff --git a/features/support/modules/interlanguage_module.rb 
b/features/support/modules/interlanguage_module.rb
index 499b146..23213cb 100644
--- a/features/support/modules/interlanguage_module.rb
+++ b/features/support/modules/interlanguage_module.rb
@@ -4,6 +4,7 @@
   a(:add_links, id: 'wbc-linkToItem-link')
   span(:apply_settings, class: 'uls-settings-trigger')
   a(:back_to_display, text: 'Back to display settings')
+  a(:back_to_input, text: 'Back to input settings')
   button(:cancel, class: 'button uls-display-settings-cancel')
   span(:cog, class: 'uls-settings-trigger')
   select_list(:content_font_selectbox, id: 'content-font-selector')
diff --git a/features/uls_cog_sidebar_anon_user.feature 
b/features/uls_cog_sidebar_anon_user.feature
new file mode 100644
index 0000000..0c95af4
--- /dev/null
+++ b/features/uls_cog_sidebar_anon_user.feature
@@ -0,0 +1,64 @@
[email protected]
+Feature: ULS cog behaviour on the side-bar for logged in users
+
+  Scenario: Page without interlanguage links has cog icon and language selector
+    Given I am on a page without interlanguage links
+    When I click the cog icon by Languages in the sidebar
+    Then I see the anonymous Language Settings panel
+
+  Scenario: Page with interlanguage links has cog icon and language selector
+    Given I am on a page with interlanguage links
+    When I click the cog icon by Languages in the sidebar
+    Then I see the anonymous Language Settings panel
+
+  Scenario: Page without interlanguage links has cog icon and language 
selector on Talk page
+    Given I am on a talk page without interlanguage links
+    When I click the cog icon by Languages in the sidebar
+    Then I see the anonymous Language Settings panel
+
+  Scenario: Page with interlanguage links has cog icon and language selector 
on Talk page
+    Given I am on a talk page with interlanguage links
+    When I click the cog icon by Languages in the sidebar
+    Then I see the anonymous Language Settings panel
+
+  Scenario: Language Settings closes and opens with X button
+    Given I navigate to the anonymous Language Settings panel
+    When I click X
+    Then I do not see the Language Settings panel
+      And the cog icon brings up anonymous Language Settings again
+
+  Scenario: Language Settings closes and opens with Apply Settings buttons
+    Given I navigate to the anonymous Language Settings panel
+    When I click Apply Settings
+    Then I do not see the Language Settings panel
+      And the cog icon brings up anonymous Language Settings again
+
+  Scenario: Language Settings closes and opens with Cancel buttons
+    Given I navigate to the anonymous Language Settings panel
+    When I click Cancel
+    Then I do not see the Language Settings panel
+      And the cog icon brings up anonymous Language Settings again
+
+  Scenario: Input settings display
+    Given I navigate to the anonymous Language Settings panel
+    When I click Input
+    Then I can enable input methods
+      And I can disable input methods
+
+  Scenario: Fonts default settings and display
+    Given I navigate to the anonymous Language Settings panel
+    When I click Fonts
+    Then a font selectbox appears
+
+  Scenario: Fonts not default settings and display
+    Given I navigate to the anonymous Language Settings panel
+    When I click Fonts
+    Then a font selectbox appears for content
+
+  Scenario: More languages
+    Given I navigate to the anonymous Language Settings panel
+      And I click Input
+    When I click the button with the ellipsis
+    Then I see Worldwide
+      And I see Language Search
+      And I can navigate back to Input Settings

-- 
To view, visit https://gerrit.wikimedia.org/r/67873
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3da0d8c2fb8b622473198b9f22a09ef60183a20
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon <[email protected]>

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

Reply via email to