From 6191a34c0fe742cc747df60c4c478488ad534f5c Mon Sep 17 00:00:00 2001 From: Bas Brands Date: Tue, 23 Mar 2021 11:51:46 +0100 Subject: [PATCH] MDL-28452 core_user: add behat test for duplicate shortname warning --- .../tests/behat/social_profile_field.feature | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 user/profile/field/social/tests/behat/social_profile_field.feature diff --git a/user/profile/field/social/tests/behat/social_profile_field.feature b/user/profile/field/social/tests/behat/social_profile_field.feature new file mode 100644 index 00000000000..8abf51d8cc5 --- /dev/null +++ b/user/profile/field/social/tests/behat/social_profile_field.feature @@ -0,0 +1,21 @@ +@core @core_user +Feature: Social profile fields can not have a duplicate shortname. + In order edit social profile fields properly + As an admin + I should not be able to create duplicate shortnames for social profile fields. + + @javascript + Scenario: Verify you can edit social profile fields. + Given I log in as "admin" + When I navigate to "Users > Accounts > User profile fields" in site administration + And I set the field "datatype" to "Social" + And I set the following fields to these values: + | Short name | yahoo | + | Networktype | Yahoo ID | + And I click on "Save changes" "button" + And I set the field "datatype" to "Social" + And I set the following fields to these values: + | Short name | yahoo | + | Networktype | Yahoo ID | + And I click on "Save changes" "button" + Then I should see "This short name is already in use"