jenkins-bot has submitted this change and it was merged.

Change subject: QA: Browser test for edit workflow
......................................................................


QA: Browser test for edit workflow

This will ensure edit doesnt break again.

Bug: T93949
Change-Id: If7a83c73c109c7508086229c65325a10f7f6ae30
---
M tests/browser/features/edit_collection.feature
M tests/browser/features/step_definitions/edit_collection_steps.rb
M tests/browser/features/support/pages/gather_page.rb
3 files changed, 35 insertions(+), 0 deletions(-)

Approvals:
  Jhernandez: Looks good to me, approved
  Florianschmidtwelzow: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/tests/browser/features/edit_collection.feature 
b/tests/browser/features/edit_collection.feature
index 702d27a..a7ef7ec 100644
--- a/tests/browser/features/edit_collection.feature
+++ b/tests/browser/features/edit_collection.feature
@@ -13,3 +13,19 @@
   Scenario: Clicking edit button
     When I click the edit collection button
     Then I see the collection editor overlay
+
+  Scenario: Changing description
+    When I click the edit collection button
+    Then I see the collection editor overlay
+        And I enter "All work and no play makes Jack a dull boy" as the 
description
+        And I click done
+        And the page has reloaded
+        Then the description of my collection is "All work and no play makes 
Jack a dull boy"
+
+  Scenario: Blank my description
+    When I click the edit collection button
+    Then I see the collection editor overlay
+        And I enter "" as the description
+        And I click done
+        And the page has reloaded
+        Then the description of my collection is ""
diff --git a/tests/browser/features/step_definitions/edit_collection_steps.rb 
b/tests/browser/features/step_definitions/edit_collection_steps.rb
index 7345829..bdcf5e8 100644
--- a/tests/browser/features/step_definitions/edit_collection_steps.rb
+++ b/tests/browser/features/step_definitions/edit_collection_steps.rb
@@ -9,3 +9,19 @@
 Then(/^I see the collection editor overlay$/) do
   expect(on(GatherPage).edit_overlay_element.when_present).to be_visible
 end
+
+Then(/^I enter "(.*?)" as the description$/) do |keys|
+  on(GatherPage).edit_overlay_description_element.when_present.send_keys(keys)
+end
+
+Then(/^I click done$/) do
+  on(GatherPage).edit_overlay_done_element.when_present.click
+end
+
+Then(/^the page has reloaded$/) do
+  sleep 2
+end
+
+Then(/^the description of my collection is "(.*?)"$/) do |text|
+  expect(on(GatherPage).collection_description_element.when_present.text).to 
match text
+end
diff --git a/tests/browser/features/support/pages/gather_page.rb 
b/tests/browser/features/support/pages/gather_page.rb
index 22eae11..c739103 100644
--- a/tests/browser/features/support/pages/gather_page.rb
+++ b/tests/browser/features/support/pages/gather_page.rb
@@ -6,5 +6,8 @@
   a(:my_first_public_collection, css: '.collection-card-title a', index:1)
   a(:edit, css: '.edit-collection')
   div(:edit_overlay, css: '.collection-editor-overlay')
+  text_field(:edit_overlay_description, css: '.collection-editor-overlay 
.description')
+  button(:edit_overlay_done, css: '.collection-editor-overlay .save')
   div(:collection_items, css: '.collection-items')
+  div(:collection_description, css: '.collection-description')
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If7a83c73c109c7508086229c65325a10f7f6ae30
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de>
Gerrit-Reviewer: Jhernandez <jhernan...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to