silverstripe/silverstripe-cms

Rewrite the embed cucumber studio scenario

maxime-rainville opened this issue · 4 comments

The test for the embed scenario should not require ADMIN and is writtenn like a behat test.

Acceptance criteria

  • Embed media from a URL is targeted to a content author
  • "Embed media from a URL" is rewritten for a human tester.

Test steps were updated: https://studio.cucumber.io/projects/301855/test-plan/folders/2145957/scenarios/7080328
The following changes were made:

- Given I am logged in with ADMIN permissions
+ Given I am logged in with Content authors group permissions
When I press the Insert media via URL HTML field button
- And I wait for 2 seconds until I see the .insert-embed-modal--create element
+ And I wait for 2 seconds
+ Then I see Insert new media from the web modal window
When I fill in Embed URL with https://www.youtube.com/watch?v=9bZkp7q19f0
And I press the Add media button
- I wait for 2 seconds until I see the .insert-embed-modal--edit element
+ And I wait for 2 seconds
+ Then I see Media from the web modal window
- Then the UrlPreview field should contain https://www.youtube.com/watch?v=9bZkp7q19f0
+ And the first field should contain https://www.youtube.com/watch?v=9bZkp7q19f0
When I press the Insert media button
- Then the Content HTML field should contain hqdefault.jpg
+ Then the Content HTML field should contain image
And I press the Save button

I would suggest removing the "I wait 2 seconds" actions since the scenario is not targeted at a robot.

Otherwise, the changes are exactly what I had in mind.

Success has been achieved.