File tree 2 files changed +24
-1
lines changed
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 11
11
12
12
< script data-ui5-config type ="application/json ">
13
13
{
14
- "rtl" : false ,
15
14
"compactSize" : false
16
15
}
17
16
</ script >
Original file line number Diff line number Diff line change
1
+ const assert = require ( "chai" ) . assert ;
2
+
3
+ describe ( "RTL" , ( ) => {
4
+ it ( "language forces RTL, if RTL not specified" , ( ) => {
5
+ browser . url ( "http://localhost:8080/test-resources/pages/Button.html?sap-ui-language=he" ) ;
6
+
7
+ const buttonRoot = browser . $ ( "#button1" ) . shadow$ ( ".ui5-button-root" ) ;
8
+ assert . strictEqual ( buttonRoot . getProperty ( "dir" ) , "rtl" , "dir is correctly set" ) ;
9
+ } ) ;
10
+
11
+ it ( "config forces RTL" , ( ) => {
12
+ browser . url ( "http://localhost:8080/test-resources/pages/Button.html?sap-ui-rtl=true" ) ;
13
+
14
+ const buttonRoot = browser . $ ( "#button1" ) . shadow$ ( ".ui5-button-root" ) ;
15
+ assert . strictEqual ( buttonRoot . getProperty ( "dir" ) , "rtl" , "dir is correctly set" ) ;
16
+ } ) ;
17
+
18
+ it ( "config unsets RTL, although rtl language is used" , ( ) => {
19
+ browser . url ( "http://localhost:8080/test-resources/pages/Button.html?sap-ui-rtl=false&sap-ui-language=he" ) ;
20
+
21
+ const buttonRoot = browser . $ ( "#button1" ) . shadow$ ( ".ui5-button-root" ) ;
22
+ assert . notOk ( buttonRoot . getProperty ( "dir" ) , "dir is not present" ) ;
23
+ } ) ;
24
+ } ) ;
You can’t perform that action at this time.
0 commit comments