Jdlrobson has uploaded a new change for review.
https://gerrit.wikimedia.org/r/150073
Change subject: QA: Update browser tests
......................................................................
QA: Update browser tests
Note the tests tagged as @wip still fail. See bug 68773
Tagging them @wip will ensure they do not effect QA build results.
Change-Id: I2a323e81427885f0127f1ab326161a1ac912a3f9
---
M tests/browser/features/collapse.feature
M tests/browser/features/reply.feature
M tests/browser/features/step_definitions/collapse_steps.rb
M tests/browser/features/support/pages/flow_page.rb
4 files changed, 27 insertions(+), 12 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/73/150073/1
diff --git a/tests/browser/features/collapse.feature
b/tests/browser/features/collapse.feature
index e3ce361..e9a6b93 100644
--- a/tests/browser/features/collapse.feature
+++ b/tests/browser/features/collapse.feature
@@ -71,27 +71,33 @@
And I should see who started the first non-moderated topic
And I should see the comments of the first non-moderated topic
+ @wip
Scenario: For a moderated post, a mode cycle with no user override keeps it
hidden
Given I am on Flow page
- Then I should see the title of the first moderated topic
+ Then I should see a moderated message on the first moderated topic
+ And I should not see the title of the first moderated topic
And I should not see who started the first moderated topic
And I should not see the comments of the first moderated topic
When I switch from Topics and posts view to Topics only view
- Then I should see the title of the first moderated topic
+ Then I should see a moderated message on the first moderated topic
+ And I should not see the title of the first moderated topic
And I should not see who started the first moderated topic
And I should not see the comments of the first moderated topic
When I switch from Topics only view to Small topics view
- Then I should see the title of the first moderated topic
+ Then I should see a moderated message on the first moderated topic
+ And I should not see the title of the first moderated topic
And I should not see who started the first moderated topic
And I should not see the comments of the first moderated topic
When I switch from Small topics view to Topics and posts view
- Then I should see the title of the first moderated topic
+ Then I should see a moderated message on the first moderated topic
+ And I should not see the title of the first moderated topic
And I should not see who started the first moderated topic
And I should not see the comments of the first moderated topic
+ @wip
Scenario: For a moderated post, switching modes does not forget a user-set
close override
Given I am on Flow page
# First, erase the server-set close override
diff --git a/tests/browser/features/reply.feature
b/tests/browser/features/reply.feature
index 0ca71e3..dbb0681 100644
--- a/tests/browser/features/reply.feature
+++ b/tests/browser/features/reply.feature
@@ -10,6 +10,7 @@
And I reply with comment "Boom boom shake shake the room"
Then the top post's first reply contains the text "Boom boom shake shake
the room"
+ @wip
Scenario: Replying updates watched state
Given I have created a Flow topic with title "Reply watch test"
And I am not watching my new Flow topic
diff --git a/tests/browser/features/step_definitions/collapse_steps.rb
b/tests/browser/features/step_definitions/collapse_steps.rb
index 0ec7ad9..f519b6c 100644
--- a/tests/browser/features/step_definitions/collapse_steps.rb
+++ b/tests/browser/features/step_definitions/collapse_steps.rb
@@ -47,8 +47,16 @@
visibility_to_should(on(FlowPage).first_non_moderated_topic_post_content_element,
visibility_str)
end
+When(/^I click the first moderated topic$/) do
+ on(FlowPage).first_moderated_topic_titlebar_element.click
+end
+
When(/^I click the first non-moderated topic$/) do
on(FlowPage).first_non_moderated_topic_title_element.click
+end
+
+Then(/^I should (.*) a moderated message on the first moderated topic$/) do
|visibility_str|
+ visibility_to_should(on(FlowPage).first_moderated_message_element,
visibility_str)
end
Then(/^I should (.*) the title of the first moderated topic$/) do
|visibility_str|
@@ -61,8 +69,4 @@
Then(/^I should (.*) the comments of the first moderated topic$/) do
|visibility_str|
visibility_to_should(on(FlowPage).first_moderated_topic_post_content_element,
visibility_str)
-end
-
-When(/^I click the first moderated topic$/) do
- on(FlowPage).first_moderated_topic_title_element.click
end
diff --git a/tests/browser/features/support/pages/flow_page.rb
b/tests/browser/features/support/pages/flow_page.rb
index 3450f1c..fda59ee 100644
--- a/tests/browser/features/support/pages/flow_page.rb
+++ b/tests/browser/features/support/pages/flow_page.rb
@@ -22,9 +22,9 @@
div(:flow_topics, class: "flow-topics")
# Collapse button
- a(:topics_and_posts_view, href: "#collapser/full")
- a(:small_topics_view, href: "#collapser/compact")
- a(:topics_only_view, href: "#collapser/topics")
+ a(:topics_and_posts_view, href: "#topics/full")
+ a(:small_topics_view, href: "#topics/compact")
+ a(:topics_only_view, href: "#topics/topics")
# Dialogs
div(:dialog, css: ".ui-dialog")
@@ -68,7 +68,11 @@
div(:first_moderated_topic, css: '.flow-topic.flow-topic-moderated', index:
0)
div(:first_moderated_topic_titlebar) do |page|
- page.first_moderated_topic_element.div_element(class:
'flow-topic-titlebar')
+ page.first_moderated_topic_element.div_element(css: '.flow-topic-titlebar')
+ end
+
+ div(:first_moderated_message) do |page|
+ page.first_moderated_topic_titlebar_element.div_element(css:
'.flow-moderated-topic-title')
end
h2(:first_moderated_topic_title) do |page|
--
To view, visit https://gerrit.wikimedia.org/r/150073
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a323e81427885f0127f1ab326161a1ac912a3f9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits