Sbisson has uploaded a new change for review. https://gerrit.wikimedia.org/r/205765
Change subject: Fix browser tests ...................................................................... Fix browser tests * Edit post link is now inside the menu * Add flow-suppress permission to sysop * Hover of the Post Actions Link instead of click * Add MEDIAWIKI_API_URL to the make command to run the browser tests Change-Id: I39e01f9debb1ceb6c7450e928f24b2615ed33aaa --- M Flow.php M Makefile M tests/browser/features/action_menu_permalink.feature M tests/browser/features/flow_logged_in.feature M tests/browser/features/reply_moderation.feature M tests/browser/features/step_definitions/action_menu_permalink_steps.rb M tests/browser/features/step_definitions/edit_existing_steps.rb M tests/browser/features/step_definitions/flow_steps.rb M tests/browser/features/support/pages/flow_page.rb 9 files changed, 14 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow refs/changes/65/205765/1 diff --git a/Flow.php b/Flow.php index e5640d6..761ad7c 100644 --- a/Flow.php +++ b/Flow.php @@ -169,6 +169,7 @@ $wgFlowGroupPermissions['sysop']['flow-lock'] = true; $wgFlowGroupPermissions['sysop']['flow-delete'] = true; $wgFlowGroupPermissions['sysop']['flow-edit-post'] = true; +$wgFlowGroupPermissions['sysop']['flow-suppress'] = true; $wgFlowGroupPermissions['oversight']['flow-suppress'] = true; $wgFlowGroupPermissions['flow-bot']['flow-create-board'] = true; $wgGroupPermissions = array_merge_recursive( $wgGroupPermissions, $wgFlowGroupPermissions ); diff --git a/Makefile b/Makefile index 136abdc..00d8782 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ @scripts/qunit.sh vagrant-browsertests: - @vagrant ssh -- -X cd /vagrant/mediawiki/extensions/Flow/tests/browser '&&' MEDIAWIKI_URL=http://127.0.0.1:8080/wiki/ MEDIAWIKI_USER=Admin MEDIAWIKI_PASSWORD=vagrant bundle exec cucumber /vagrant/mediawiki/extensions/Flow/tests/browser/features/ -f pretty + @vagrant ssh -- -X cd /vagrant/mediawiki/extensions/Flow/tests/browser '&&' MEDIAWIKI_URL=http://127.0.0.1:8080/wiki/ MEDIAWIKI_USER=Admin MEDIAWIKI_PASSWORD=vagrant MEDIAWIKI_API_URL=http://127.0.0.1:8080/w/api.php bundle exec cucumber /vagrant/mediawiki/extensions/Flow/tests/browser/features/ -f pretty ### # Static analysis diff --git a/tests/browser/features/action_menu_permalink.feature b/tests/browser/features/action_menu_permalink.feature index d619711..00a4085 100644 --- a/tests/browser/features/action_menu_permalink.feature +++ b/tests/browser/features/action_menu_permalink.feature @@ -16,8 +16,8 @@ Scenario: Actions menu Permalink Given I have created a Flow topic with title "PermalinkReplyTest" And I add 3 comments to the Topic - When I click the Post Actions link on the 3rd comment on the topic - And I click the Post Actions link on the 3rd comment on the topic + When I hover on the Post Actions link on the 3rd comment on the topic + And I hover on the Post Actions link on the 3rd comment on the topic And I click Permalink from the 3rd comment Post Actions menu And I am viewing Topic page Then I see only one topic on the page diff --git a/tests/browser/features/flow_logged_in.feature b/tests/browser/features/flow_logged_in.feature index 596db0a..38580fc 100644 --- a/tests/browser/features/flow_logged_in.feature +++ b/tests/browser/features/flow_logged_in.feature @@ -21,7 +21,7 @@ And the block author link should be visible Scenario: Post Actions - When I click the Post Actions link + When I hover on the Post Actions link Then I should see a Hide button And I should see a Delete button And I should see a Suppress button diff --git a/tests/browser/features/reply_moderation.feature b/tests/browser/features/reply_moderation.feature index c52a595..32face1 100644 --- a/tests/browser/features/reply_moderation.feature +++ b/tests/browser/features/reply_moderation.feature @@ -8,7 +8,7 @@ Scenario: Hiding a comment Given I have created a Flow topic with title "Hide comment test" And I add 3 comments to the Topic - When I click the Post Actions link on the 3rd comment on the topic + When I hover on the Post Actions link on the 3rd comment on the topic And I click Hide comment button And I see a dialog box And I give reason for hiding as being "Shhhh!" diff --git a/tests/browser/features/step_definitions/action_menu_permalink_steps.rb b/tests/browser/features/step_definitions/action_menu_permalink_steps.rb index 614e47d..2de782a 100644 --- a/tests/browser/features/step_definitions/action_menu_permalink_steps.rb +++ b/tests/browser/features/step_definitions/action_menu_permalink_steps.rb @@ -13,7 +13,7 @@ on(FlowPage).actions_link_permalink_3rd_comment_element.when_present.click end -When(/^I click the Post Actions link on the 3rd comment on the topic$/) do +When(/^I hover on the Post Actions link on the 3rd comment on the topic$/) do on(FlowPage) do |page| page.third_post_actions_link_element.when_present.focus page.third_post_actions_link_element.click diff --git a/tests/browser/features/step_definitions/edit_existing_steps.rb b/tests/browser/features/step_definitions/edit_existing_steps.rb index e743ea9..f61a77c 100644 --- a/tests/browser/features/step_definitions/edit_existing_steps.rb +++ b/tests/browser/features/step_definitions/edit_existing_steps.rb @@ -1,6 +1,7 @@ When(/^I click Edit post$/) do on(FlowPage) do |page| - page.edit_post_element.when_present.click + page.post_actions_link_element.when_present.hover + page.edit_post_button_element.when_present.click end end diff --git a/tests/browser/features/step_definitions/flow_steps.rb b/tests/browser/features/step_definitions/flow_steps.rb index 55509d2..76d7470 100644 --- a/tests/browser/features/step_definitions/flow_steps.rb +++ b/tests/browser/features/step_definitions/flow_steps.rb @@ -61,8 +61,8 @@ on(FlowPage).topic_hide_button_element.when_present.click end -When(/^I click the Post Actions link$/) do - on(FlowPage).post_actions_link_element.when_present.click +When(/^I hover on the Post Actions link$/) do + on(FlowPage).post_actions_link_element.when_present.hover end When(/^I click the Suppress topic button$/) do diff --git a/tests/browser/features/support/pages/flow_page.rb b/tests/browser/features/support/pages/flow_page.rb index 95d859d..060166a 100644 --- a/tests/browser/features/support/pages/flow_page.rb +++ b/tests/browser/features/support/pages/flow_page.rb @@ -126,9 +126,6 @@ ### Post meta actions span(:post_meta_actions, css: ".flow-post .flow-post-meta-actions", index: 0) - a(:edit_post) do |page| - page.post_meta_actions_element.link_element(title: "Edit") - end a(:thank_button) do |page| page.post_meta_actions_element.link_element(css: ".mw-thanks-flow-thank-link", index: 0) end @@ -148,6 +145,9 @@ a(:suppress_button) do |page| page.post_actions_menu_element.link_element(title: "Suppress") end + a(:edit_post_button) do |page| + page.post_actions_menu_element.link_element(title: "Edit") + end ### Replies to top post #### 1st reply -- To view, visit https://gerrit.wikimedia.org/r/205765 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39e01f9debb1ceb6c7450e928f24b2615ed33aaa Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Sbisson <sbis...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits