Cmcmahon has submitted this change and it was merged.
Change subject: Fix browser tests for new topic UI
......................................................................
Fix browser tests for new topic UI
Edit post is no longer in a flyout.
Bug: 60673
With these changes all Flow tests pass in both
Firefox and Chrome
Change-Id: I35d1435aa956b545c20f51d2ff44ed44e5ba834d
---
M tests/browser/features/edit_existing.feature
M tests/browser/features/flow_anon.feature
M tests/browser/features/step_definitions/edit_existing_steps.rb
M tests/browser/features/support/pages/flow_page.rb
4 files changed, 12 insertions(+), 12 deletions(-)
Approvals:
Cmcmahon: Looks good to me, approved
diff --git a/tests/browser/features/edit_existing.feature
b/tests/browser/features/edit_existing.feature
index e43819e..9486e1f 100644
--- a/tests/browser/features/edit_existing.feature
+++ b/tests/browser/features/edit_existing.feature
@@ -9,14 +9,14 @@
Scenario: Edit an existing title
Given I am on Flow page
- When I click the Edit title pencil icon
+ When I click the Edit title action
Then I should be able to edit the title field with Title edited
And I should be able to save the new title
And the saved topic title should contain Title edited
Scenario: Edit existing post
Given I am on Flow page
- When I click the Edit post pencil icon
+ When I click Edit post
Then I should be able to edit the post field with Post edited
And I should be able to save the new post
And the saved post should contain Post edited
diff --git a/tests/browser/features/flow_anon.feature
b/tests/browser/features/flow_anon.feature
index 19d6963..9cc3c3d 100644
--- a/tests/browser/features/flow_anon.feature
+++ b/tests/browser/features/flow_anon.feature
@@ -13,5 +13,4 @@
Scenario: Anon does not see block or actions
Given I am on Flow page
When I see a flow creator element
- Then I do not see an actions link
- And I do not see a block user link
+ Then I do not see a block user link
diff --git a/tests/browser/features/step_definitions/edit_existing_steps.rb
b/tests/browser/features/step_definitions/edit_existing_steps.rb
index 21f5de7..c4f6a18 100644
--- a/tests/browser/features/step_definitions/edit_existing_steps.rb
+++ b/tests/browser/features/step_definitions/edit_existing_steps.rb
@@ -1,13 +1,12 @@
-When(/^I click the Edit post pencil icon$/) do
+When(/^I click Edit post$/) do
on(FlowPage) do |page|
- page.topic_post_element.when_present.hover
- page.edit_post_icon_element.when_present.click
+ page.edit_post_element.when_present.click
end
end
-When(/^I click the Edit title pencil icon$/) do
+When(/^I click the Edit title action$/) do
on(FlowPage) do |page|
- page.topic_title_element.when_present.hover
+ page.topic_actions_link_element.when_present.click
page.edit_title_icon_element.when_present.click
end
end
diff --git a/tests/browser/features/support/pages/flow_page.rb
b/tests/browser/features/support/pages/flow_page.rb
index b3c95e4..337f8a8 100644
--- a/tests/browser/features/support/pages/flow_page.rb
+++ b/tests/browser/features/support/pages/flow_page.rb
@@ -9,8 +9,10 @@
# conflicts from simultaneous test runs (bug 59011).
if ENV['BROWSER_LABEL'] == "chrome"
topic_index = 1
+ actions_index = 2
else
topic_index = 0
+ actions_index = 0
end
a(:actions_link, text: "Actions", index: 1)
@@ -20,8 +22,8 @@
button(:change_post_save, class: "flow-edit-post-submit")
button(:change_title_save, class: "flow-edit-title-submit")
a(:contrib_link, text: "contribs")
- a(:edit_post_icon, title: "Edit post", index: topic_index)
- a(:edit_title_icon, title: "Edit title", index: topic_index)
+ a(:edit_post, class: "flow-edit-post-link", index: topic_index)
+ a(:edit_title_icon, css: "div.tipsy-inner > div.flow-tipsy-flyout > ul >
li.flow-action-edit-title > a.mw-ui-button.flow-edit-topic-link")
div(:flow_body, class: "flow-container")
list_item(:full_view, title: "Full view")
@@ -41,7 +43,7 @@
list_item(:small_view, title: "Small view")
a(:talk_link, text: "Talk")
text_field(:title_edit, class: "mw-ui-input flow-edit-title-textbox")
- a(:topic_actions_link, text: "Actions", index: 0)
+ a(:topic_actions_link, text: "Actions", index: actions_index)
div(:topic_post, class: "flow-post-content", index: topic_index)
div(:topic_title, class: "flow-topic-title", index: topic_index)
end
--
To view, visit https://gerrit.wikimedia.org/r/110597
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I35d1435aa956b545c20f51d2ff44ed44e5ba834d
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Spage <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: Spage <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits