Skip to content

Commit

Permalink
MDL-56486 workshop: Do not rely on the button implementation in behat
Browse files Browse the repository at this point in the history
It turned out that behat's "I should see ..." does not work for buttons
rendered as `<input>` elements so this assertion worked only in Boost
where the button is rendered as `<button>` but not in Clean.

But we do not really need this check here. All we need is to make sure
that the form has been saved successfully. For which, checking for the
text on the page is enough.

p.s. Another mistake of mine to not double-check behat on both standard
themes. Sigh ...
  • Loading branch information
mudrd8mz committed Jul 12, 2017
1 parent 581710e commit 6218889
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mod/workshop/tests/behat/file_type_restriction.feature
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ Feature: File types of the submission and feedback attachments can be limitted
And I press "Update"
When I press "Save and close"
Then I should see "Some files (renamed.png) cannot be uploaded. Only file types .php are allowed."
And I should not see "Assigned submissions to assess"
# Finally make sure that allowed file gets uploaded.
And I delete "renamed.png" from "Attachment" filemanager
And I upload "mod/workshop/tests/fixtures/testable.php" file to "Attachment" filemanager
And I press "Save and close"
And I should see "Assigned submissions to assess"
And I should see "Re-assess"

0 comments on commit 6218889

Please sign in to comment.