From eb7a2e307082eee9c4a24a355a3b75c892dde661 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 25 Oct 2022 14:36:13 +0200 Subject: [PATCH] MDL-75788 behat: Use profile field generators in existing tests --- .../uploaduser/tests/behat/upload_users.feature | 12 ++++-------- .../tests/behat/availability_profile.feature | 13 ++++--------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/admin/tool/uploaduser/tests/behat/upload_users.feature b/admin/tool/uploaduser/tests/behat/upload_users.feature index 04fb69b7898..bb4741c8264 100644 --- a/admin/tool/uploaduser/tests/behat/upload_users.feature +++ b/admin/tool/uploaduser/tests/behat/upload_users.feature @@ -67,14 +67,10 @@ Feature: Upload users @javascript Scenario: Upload users with custom profile fields # Create user profile field. - Given I log in as "admin" - And I navigate to "Users > Accounts > User profile fields" in site administration - And I click on "Create a new profile field" "link" - And I click on "Text area" "link" - And I set the following fields to these values: - | Short name | superfield | - | Name | Super field | - And I click on "Save changes" "button" + Given the following "custom profile fields" exist: + | datatype | shortname | name | + | text | superfield | Super field | + And I log in as "admin" # Upload users. When I navigate to "Users > Accounts > Upload users" in site administration And I upload "lib/tests/fixtures/upload_users_profile.csv" file to "File" filemanager diff --git a/availability/condition/profile/tests/behat/availability_profile.feature b/availability/condition/profile/tests/behat/availability_profile.feature index 82fed622c7e..f272a9fc1e0 100644 --- a/availability/condition/profile/tests/behat/availability_profile.feature +++ b/availability/condition/profile/tests/behat/availability_profile.feature @@ -62,15 +62,10 @@ Feature: availability_profile @javascript Scenario: Test with custom user profile field - # Add custom field. - Given I log in as "admin" - And I navigate to "Users > Accounts > User profile fields" in site administration - And I click on "Create a new profile field" "link" - And I click on "Text input" "link" - And I set the following fields to these values: - | Short name | superfield | - | Name | Super field | - And I click on "Save changes" "button" + Given the following "custom profile fields" exist: + | datatype | shortname | name | + | text | superfield | Super field | + And I log in as "admin" # Set field value for user. And I navigate to "Users > Accounts > Browse list of users" in site administration