Add behat test + add id in career form in order to test with behat.

pull/2487/head
jmontoyaa 9 years ago
parent 3f48324277
commit 9b71ba59d4
  1. 6
      main/inc/lib/promotion.lib.php
  2. 13
      tests/behat/features/career.feature
  3. 13
      tests/behat/features/class.feature
  4. 14
      tests/behat/features/extraFieldUser.feature
  5. 14
      tests/behat/features/promotion.feature

@ -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);

@ -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"

@ -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"

@ -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"

@ -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"
Loading…
Cancel
Save