Skip to content

Commit 48c30f4

Browse files
committed
fix behat tests
1 parent 6b756d5 commit 48c30f4

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

tests/behat/tool_opencast.feature

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@ Feature: Setup Opencast instances
1111
And I click on "Add instance" "button"
1212
And I click on "//div[@id='instancestable']//div[@class='tabulator-table']/div[2]/div[@tabulator-field='name']" "xpath"
1313
And I type "Second instance"
14-
And I wait "2" seconds
14+
And I wait "5" seconds
1515
And I click on "Save changes" "button"
16-
And I navigate to "Plugins > Admin tools > Opencast API" in site administration
17-
Then I should see "Configuration: Default"
18-
And I should see "apiurl"
19-
And I should see "Configuration: Second instance"
16+
And I wait "5" seconds
17+
And I navigate to "Plugins > Admin tools > Opencast API > Configuration: Second instance" in site administration
2018
And I should see "apiurl_2"
2119

2220
@javascript

tests/behat/tool_opencast_connectiontool.feature

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,17 @@ Feature: Check the connection to Opencast instances
3636
And I should see "Opencast API User Credentials test failed"
3737

3838
@javascript
39-
Scenario: When the admin is on the tool_opencast category settings page and two instances are given, the connection check should target both instances individually
39+
Scenario: When two instances are given and the admin is on the second instance's configuration page, the connection check for the second instance with invalid data should fail
4040
Given I log in as "admin"
41-
And the following config values are set as admin:
42-
| config | value | plugin |
43-
| ocinstances | [{"id":1,"name":"OC demo server","isvisible":true,"isdefault":true},{"id":2,"isvisible":1,"isdefault":false,"name":"Invalid server"}] | tool_opencast |
44-
| apiurl_2 | http://notexistent.not | tool_opencast |
45-
And I navigate to "Plugins > Admin tools > Opencast API" in site administration
46-
And I click on "button[data-instanceid='1']" "css_element"
47-
And I wait "3" seconds
48-
Then I should see "Opencast API URL test successful."
49-
And I should see "Opencast API User Credentials test successful."
50-
And I click on "Cancel" "button" in the "Connection Test Tool" "dialogue"
41+
And I navigate to "Plugins > Admin tools > Opencast API > Opencast Instances" in site administration
42+
And I click on "Add instance" "button"
43+
And I click on "//div[@id='instancestable']//div[@class='tabulator-table']/div[2]/div[@tabulator-field='name']" "xpath"
44+
And I type "Second instance"
45+
And I wait "5" seconds
46+
And I click on "Save changes" "button"
47+
And I wait "5" seconds
48+
And I navigate to "Plugins > Admin tools > Opencast API > Configuration: Second instance" in site administration
49+
And I set the field "id_s_tool_opencast_apiurl_2" to "http://notexistent.not"
5150
And I set the field "id_s_tool_opencast_apitimeout_2" to "2000"
5251
And I set the field "id_s_tool_opencast_apiconnecttimeout_2" to "1000"
5352
And I click on "button[data-instanceid='2']" "css_element"

0 commit comments

Comments
 (0)