File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php 
2+ 
3+ /** 
4+  * @copyright Copyright (C) Ibexa AS. All rights reserved. 
5+  * @license For full copyright and license information view LICENSE file distributed with this source code. 
6+  */ 
7+ 
8+ declare (strict_types=1 );
9+ 
10+ namespace  Ibexa \AdminUi \Behat \Component ;
11+ 
12+ use  Behat \Mink \Session ;
13+ use  Ibexa \Behat \Browser \Component \Component ;
14+ use  Ibexa \Behat \Browser \Element \BaseElementInterface ;
15+ use  Ibexa \Behat \Browser \Element \ElementInterface ;
16+ use  Ibexa \Behat \Browser \Locator \VisibleCSSLocator ;
17+ 
18+ 
19+ class  ContentTree extends  Component
20+ {
21+     public  function  verifyIsLoaded (): void 
22+     {
23+         $ this getHTMLPage ()->find ($ this getLocator ('header ' ))->assert ()->textEquals ('Content tree ' );
24+         $ this clearSearch ();
25+         $ this getHTMLPage ()->setTimeout (10 )->find ($ this getLocator ('header ' ))->assert ()->isVisible ('Content tree ' );
26+     }
27+     public  function  verifyItemExists (string  $ itemPathvoid 
28+     {
29+         Assert::assertTrue ($ this itemExists ($ itemPath
30+     }
31+ 
32+     public  function  itemExists (string  $ itemPathbool 
33+     {
34+         $ this clearSearch ();
35+ 
36+ 
37+     }
38+ 
39+     private  function  findNestedTreeElement (BaseElementInterface $ baseElementstring  $ searchedElementNameint  $ indentElementInterface 
40+     {
41+         return 
42+     }
43+ 
44+     protected  function  specifyLocators (): array 
45+     {
46+         return  [
47+             new  VisibleCSSLocator ('header ' ,'.ibexa-content-tree-container .c-tb-header__name-content ' ),
48+             new  VisibleCSSLocator ('toggler ' ,'.c-tb-contextual-menu__toggler ' ),
49+             new  VisibleCSSLocator ('item ' , '.c-tb-list-item-single__element .c-tb-list-item-single__element--main ' )
50+             ];
51+     }
52+ }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments