diff --git a/main/inc/lib/promotion.lib.php b/main/inc/lib/promotion.lib.php index 4edbc068eb..5bde393054 100755 --- a/main/inc/lib/promotion.lib.php +++ b/main/inc/lib/promotion.lib.php @@ -239,11 +239,11 @@ class Promotion extends Model foreach ($careers as $item) { $career_list[$item['id']] = $item['name']; } - $form->addElement( - 'select', + $form->addSelect( 'career_id', get_lang('Career'), - $career_list + $career_list, + ['id' => 'career_id'] ); $status_list = $this->get_status_list(); $form->addElement('select', 'status', get_lang('Status'), $status_list); diff --git a/tests/behat/features/career.feature b/tests/behat/features/career.feature new file mode 100644 index 0000000000..4efea80380 --- /dev/null +++ b/tests/behat/features/career.feature @@ -0,0 +1,13 @@ +Feature: Career + In order to use the Career + As an administrator + I need to be able to create a career + + Scenario: Create a Career + Given I am a platform administrator + And I am on "/main/admin/careers.php?action=add" + When I fill in the following: + | name | Developer | + And I fill in ckeditor field "description" with "Description" + And I press "submit" + Then I should see "Item added" diff --git a/tests/behat/features/class.feature b/tests/behat/features/class.feature new file mode 100644 index 0000000000..02d9c85243 --- /dev/null +++ b/tests/behat/features/class.feature @@ -0,0 +1,13 @@ +Feature: Classes + In order to use the Classes + As an administrator + I need to be able to create a class + + Scenario: Create a class + Given I am a platform administrator + And I am on "/main/admin/usergroups.php?action=add" + When I fill in the following: + | name | Class 1 | + | description | class description | + And I press "submit" + Then I should see "Item added" diff --git a/tests/behat/features/extraFieldUser.feature b/tests/behat/features/extraFieldUser.feature new file mode 100644 index 0000000000..9ff76907fc --- /dev/null +++ b/tests/behat/features/extraFieldUser.feature @@ -0,0 +1,14 @@ +Feature: User extra fields + In order to use the user extra fields + As an administrator + I need to be able to create an extra field + + Scenario: Create a text extra field + Given I am a platform administrator + And I am on "/main/admin/extra_fields.php?type=user&action=add" + When I fill in the following: + | display_text | Behat extra field | + | variable | behat_extra_field | + And I fill in select bootstrap static input "#field_type" select "1" + And I press "submit" + Then I should see "Item added" diff --git a/tests/behat/features/promotion.feature b/tests/behat/features/promotion.feature new file mode 100644 index 0000000000..8fdfe28079 --- /dev/null +++ b/tests/behat/features/promotion.feature @@ -0,0 +1,14 @@ +Feature: Promotions + In order to use the promotion feature + As an administrator + I need to be able to create a promotion + + Scenario: Create a Promotion + Given I am a platform administrator + And I am on "/main/admin/promotions.php?action=add" + When I fill in the following: + | name | Promotion 2030 | + And I fill in ckeditor field "description" with "Promotion description" + And I fill in select bootstrap static input "#career_id" select "1" + And I press "submit" + Then I should see "Item added"