1 |
efrain |
1 |
@editor @editor_atto @atto @atto_equation @_bug_phantomjs
|
|
|
2 |
Feature: Atto equation editor
|
|
|
3 |
To teach maths to students, I need to write equations
|
|
|
4 |
|
|
|
5 |
@javascript
|
|
|
6 |
Scenario: Create an equation
|
|
|
7 |
Given I log in as "admin"
|
|
|
8 |
When I open my profile in edit mode
|
|
|
9 |
And I set the field "Description" to "<p>Equation test</p>"
|
|
|
10 |
# Set field on the bottom of page, so equation editor dialogue is visible.
|
|
|
11 |
And I expand all fieldsets
|
|
|
12 |
And I set the field "Picture description" to "Test"
|
|
|
13 |
And I select the text in the "Description" Atto editor
|
|
|
14 |
And I click on "Show more buttons" "button"
|
|
|
15 |
And I click on "Equation editor" "button"
|
|
|
16 |
And the "class" attribute of "Edit equation using" "field" should contain "text-ltr"
|
|
|
17 |
And I set the field "Edit equation using" to " = 1 \div 0"
|
|
|
18 |
And I click on "\infty" "button"
|
|
|
19 |
And I click on "Save equation" "button"
|
|
|
20 |
And I click on "Update profile" "button"
|
|
|
21 |
And I follow "Profile" in the user menu
|
|
|
22 |
Then "\infty" "text" should exist
|
|
|
23 |
|
|
|
24 |
@javascript
|
|
|
25 |
Scenario: Edit an equation
|
|
|
26 |
Given I log in as "admin"
|
|
|
27 |
When I open my profile in edit mode
|
|
|
28 |
And I set the field "Description" to "<p>\( \pi \)</p>"
|
|
|
29 |
# Set field on the bottom of page, so equation editor dialogue is visible.
|
|
|
30 |
And I expand all fieldsets
|
|
|
31 |
And I set the field "Picture description" to "Test"
|
|
|
32 |
And I select the text in the "Description" Atto editor
|
|
|
33 |
And I click on "Show more buttons" "button"
|
|
|
34 |
And I click on "Equation editor" "button"
|
|
|
35 |
And the "class" attribute of "Edit equation using" "field" should contain "text-ltr"
|
|
|
36 |
Then the field "Edit equation using" matches value " \pi "
|
|
|
37 |
And I click on "Save equation" "button"
|
|
|
38 |
And the field "Description" matches value "<p>\( \pi \)</p>"
|