Addshore has uploaded a new change for review.

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

Change subject: Browser tests for history feature
......................................................................

Browser tests for history feature

Bug: T133278
Change-Id: I5ba8d7766e91d733504f488d1f277850e8fab945
---
A tests/browser/features/history.feature
M tests/browser/features/support/step_definitions/common_steps.rb
2 files changed, 35 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionSlider 
refs/changes/02/297402/1

diff --git a/tests/browser/features/history.feature 
b/tests/browser/features/history.feature
new file mode 100644
index 0000000..bf5cf34
--- /dev/null
+++ b/tests/browser/features/history.feature
@@ -0,0 +1,31 @@
+@chrome @en.wikipedia.beta.wmflabs.org @firefox @integration
+Feature: RevisionSlider history
+  Background:
+    Given I am logged in
+    And I have reset my preferences
+    And RevisionSlider is enabled as a beta feature
+    And a page with 4 revision(s) exists
+    And I am on the diff page
+    And The RevisionSlider has loaded
+    And I have closed the help dialog at the start
+    And The help dialog is hidden
+
+  Scenario: RevisionSlider history can be accessed using browser back and 
forward buttons
+    Given I click on revision 1
+    And the darkness has faded
+    And I click on revision 2
+    And the darkness has faded
+    Then the lower pointer should be on revision 1
+    And the lower pointer should be on revision 2
+    And revision 1 should be loaded on the left of the diff
+    And revision 2 should be loaded on the right of the diff
+    Given I click the browser back button
+    Then the lower pointer should be on revision 1
+    And the lower pointer should be on revision 4
+    And revision 1 should be loaded on the left of the diff
+    And revision 4 should be loaded on the right of the diff
+    Given I click the browser back button
+    Then the lower pointer should be on revision 3
+    And the lower pointer should be on revision 4
+    And revision 3 should be loaded on the left of the diff
+    And revision 4 should be loaded on the right of the diff
\ No newline at end of file
diff --git a/tests/browser/features/support/step_definitions/common_steps.rb 
b/tests/browser/features/support/step_definitions/common_steps.rb
index b6fc26f..7d59651 100644
--- a/tests/browser/features/support/step_definitions/common_steps.rb
+++ b/tests/browser/features/support/step_definitions/common_steps.rb
@@ -18,6 +18,10 @@
   end
 end
 
+When(/^I click the browser back button$/) do
+  on(ArticlePage).back
+end
+
 Given(/^The RevisionSlider has loaded$/) do
   on(DiffPage).wait_for_slider_to_load
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ba8d7766e91d733504f488d1f277850e8fab945
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionSlider
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>

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

Reply via email to