@@ -18,4 +18,49 @@ describe("TabContainer general interaction", () => {
18
18
assert . strictEqual ( field2 . getProperty ( "value" ) , SELECTED_TAB_KEY , "Item data-key is retrieved correctly" ) ;
19
19
assert . strictEqual ( field3 . getProperty ( "value" ) , SELECTED_TAB_TEXT , "Item text is retrieved correctly." ) ;
20
20
} ) ;
21
- } ) ;
21
+
22
+ it ( "scroll works on iconsOnly TabContainer" , ( ) => {
23
+ browser . setWindowSize ( 250 , 1080 ) ;
24
+
25
+ const arrowLeft = browser . findElementDeep ( "#tabContainerIconOnly >>> .sapMITBArrowScrollLeft" ) ;
26
+ const arrowRight = browser . findElementDeep ( "#tabContainerIconOnly >>> .sapMITBArrowScrollRight" ) ;
27
+
28
+ assert . ok ( ! arrowLeft . isDisplayed ( ) , "'Left Arrow' should be initially hidden" ) ;
29
+ assert . ok ( arrowRight . isDisplayed ( ) , "'Right Arrow' should be initially shown" ) ;
30
+
31
+ arrowRight . click ( ) ;
32
+ browser . pause ( 300 ) ; // TODO: wait for animation finish. Remove when solved on framework level
33
+
34
+ assert . ok ( arrowLeft . isDisplayed ( ) , "'Left Arrow' should be shown after 'Right Arrow' click" ) ;
35
+ assert . ok ( ! arrowRight . isDisplayed ( ) , "'Right Arrow' should be hidden after 'Right Arrow' click" ) ;
36
+
37
+ arrowLeft . click ( ) ;
38
+ browser . pause ( 300 ) ; // TODO: wait for animation finish. Remove when solved on framework level
39
+
40
+ assert . ok ( ! arrowLeft . isDisplayed ( ) , "'Left Arrow' should be hidden after 'Left Arrow' click" ) ;
41
+ assert . ok ( arrowRight . isDisplayed ( ) , "'Right Arrow' should be shown after 'Left Arrow' click" ) ;
42
+ } ) ;
43
+
44
+ it ( "scroll works on textOnly TabContainer" , ( ) => {
45
+ browser . setWindowSize ( 250 , 1080 ) ;
46
+ browser . findElementDeep ( "#tabContainerTextOnly" ) . scrollIntoView ( ) ;
47
+
48
+ const arrowLeft = browser . findElementDeep ( "#tabContainerTextOnly >>> .sapMITBArrowScrollLeftTextOnly" ) ;
49
+ const arrowRight = browser . findElementDeep ( "#tabContainerTextOnly >>> .sapMITBArrowScrollRightTextOnly" ) ;
50
+
51
+ assert . ok ( ! arrowLeft . isDisplayed ( ) , "'Left Arrow' should be initially hidden" ) ;
52
+ assert . ok ( arrowRight . isDisplayed ( ) , "'Right Arrow' should be initially shown" ) ;
53
+
54
+ arrowRight . click ( ) ;
55
+ browser . pause ( 300 ) ; // TODO: wait for animation finish. Remove when solved on framework level
56
+
57
+ assert . ok ( arrowLeft . isDisplayed ( ) , "'Left Arrow' should be shown after 'Right Arrow' click" ) ;
58
+ assert . ok ( ! arrowRight . isDisplayed ( ) , "'Right Arrow' should be hidden after 'Right Arrow' click" ) ;
59
+
60
+ arrowLeft . click ( ) ;
61
+ browser . pause ( 300 ) ; // TODO: wait for animation finish. Remove when solved on framework level
62
+
63
+ assert . ok ( ! arrowLeft . isDisplayed ( ) , "'Left Arrow' should be hidden after 'Left Arrow' click" ) ;
64
+ assert . ok ( arrowRight . isDisplayed ( ) , "'Right Arrow' should be shown after 'Left Arrow' click" ) ;
65
+ } ) ;
66
+ } ) ;
0 commit comments