1 |
efrain |
1 |
@editor @editor_atto @atto
|
|
|
2 |
Feature: Add text direction and alignment
|
|
|
3 |
In order to generate a content that can be displayed in the proper direction to everyone
|
|
|
4 |
As a user
|
|
|
5 |
I should see the Atto editor with explicit direction and alignment being set
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "user preferences" exist:
|
|
|
9 |
| user | preference | value |
|
|
|
10 |
| admin | htmleditor | atto |
|
|
|
11 |
And I log in as "admin"
|
|
|
12 |
And I navigate to "Plugins > Text editors > Atto HTML editor > Atto toolbar settings" in site administration
|
|
|
13 |
And I set the field "Toolbar config" to multiline:
|
|
|
14 |
"""
|
|
|
15 |
collapse = collapse
|
|
|
16 |
style1 = title, bold, italic
|
|
|
17 |
list = unorderedlist, orderedlist
|
|
|
18 |
links = link
|
|
|
19 |
files = image, media, recordrtc, managefiles, h5p
|
|
|
20 |
style2 = underline, strike, subscript, superscript
|
|
|
21 |
align = align,rtl
|
|
|
22 |
indent = indent
|
|
|
23 |
insert = equation, charmap, table, clear
|
|
|
24 |
undo = undo
|
|
|
25 |
accessibility = accessibilitychecker, accessibilityhelper
|
|
|
26 |
other = html
|
|
|
27 |
"""
|
|
|
28 |
And I press "Save changes"
|
|
|
29 |
And I log out
|
|
|
30 |
|
|
|
31 |
@javascript
|
|
|
32 |
Scenario Outline: Atto should apply user's direction and alignment by default
|
|
|
33 |
Given the following "courses" exist:
|
|
|
34 |
| fullname | shortname | summary | summaryformat |
|
|
|
35 |
| Course 1 | C1 | | 1 |
|
|
|
36 |
And the following "language customisations" exist:
|
|
|
37 |
| component | stringid | value |
|
|
|
38 |
| <component> | <stringid> | <localstring> |
|
|
|
39 |
And I log in as "admin"
|
|
|
40 |
And I am on "Course 1" course homepage
|
|
|
41 |
When I navigate to "Settings" in current page administration
|
|
|
42 |
And I press "Show more buttons"
|
|
|
43 |
And I press "HTML"
|
|
|
44 |
Then I should see "<partialtext>"
|
|
|
45 |
|
|
|
46 |
Examples:
|
|
|
47 |
| component | stringid | localstring | partialtext |
|
|
|
48 |
| core_langconfig | thisdirection | ltr | dir=\"ltr\" style=\"text-align: left;\" |
|
|
|
49 |
| core_langconfig | thisdirection | rtl | dir=\"rtl\" style=\"text-align: right;\" |
|