Línea 4... |
Línea 4... |
4 |
As an admin
|
4 |
As an admin
|
5 |
I can manage media plugins
|
5 |
I can manage media plugins
|
Línea 6... |
Línea 6... |
6 |
|
6 |
|
7 |
@javascript
|
7 |
@javascript
|
- |
|
8 |
Scenario: An administrator can control the enabled state of media plugins using JavaScript
|
8 |
Scenario: An administrator can control the enabled state of media plugins using JavaScript
|
9 |
The state change should be reflected in the UI and persist across page reloads
|
9 |
Given I am logged in as "admin"
|
10 |
Given I am logged in as "admin"
|
10 |
And I navigate to "Plugins > Media players > Manage media players" in site administration
|
11 |
And I navigate to "Plugins > Media players > Manage media players" in site administration
|
11 |
When I click on "Disable YouTube" "link"
|
12 |
When I toggle the "Disable YouTube" admin switch "off"
|
12 |
Then I should see "YouTube disabled."
|
- |
|
13 |
And "Disable YouTube" "link" should not exist
|
- |
|
14 |
But "Enable YouTube" "link" should exist
|
13 |
And I should see "YouTube disabled."
|
15 |
When I click on "Enable YouTube" "link"
|
14 |
And I reload the page
|
16 |
Then I should see "YouTube enabled."
|
15 |
Then I should see "Enable YouTube"
|
17 |
And "Enable YouTube" "link" should not exist
|
- |
|
18 |
But "Disable YouTube" "link" should exist
|
- |
|
19 |
|
- |
|
20 |
Scenario: An administrator can control the enabled state of media plugins without JavaScript
|
- |
|
21 |
Given I am logged in as "admin"
|
- |
|
22 |
And I navigate to "Plugins > Media players > Manage media players" in site administration
|
- |
|
23 |
When I click on "Disable YouTube" "link"
|
16 |
And I toggle the "Enable YouTube" admin switch "on"
|
24 |
Then I should see "YouTube disabled."
|
- |
|
25 |
And "Disable YouTube" "link" should not exist
|
- |
|
26 |
But "Enable YouTube" "link" should exist
|
17 |
And I should see "YouTube enabled."
|
27 |
When I click on "Enable YouTube" "link"
|
18 |
And I reload the page
|
28 |
Then I should see "YouTube enabled."
|
- |
|
29 |
And "Enable YouTube" "link" should not exist
|
- |
|