Results 1 to 2 of 2

Thread: How to expand a Tree

  1. #1
    Sencha User
    Join Date
    Mar 2020
    Posts
    11
    Answers
    1

    Default Answered: How to expand a Tree

    I have written a test that doesn't fail when I run it but it also doesn't expand the tree like I was expecting it to.

    The screen print below shows what I am trying to expand (as shown by the arrow) so that I can get on the second level and then select the next row in the tree.

    Annotation 2020-06-01 153012.jpg

    Here is my test, that does selects the correct row but I was hoping it would click on the 'x=tree-elbow-plus' icon and expand the tree. When the test runs it doesn't click on the icon so the row doesn't expand, but the test does run without any errors.

    Code:
    it('should expand Export control under Security', function() {
            ST.grid('graphnavigator[reference="graphnavisecurity"]:last')
                .rowWith('rid', 'root-ExportControl')
                .reveal()
                .cellAt(0)
                .click();
        });
    Can anyone see what I am doing wrong?

    Thanks.

  2. I have figured this out myself. I just needed to add a line of code so that the image is clicked and it works exactly as I expected:

    Code:
    it('should expand Export control under Security', function() {
            ST.grid('graphnavigator[reference="graphnavisecurity"]:last')
                .rowWith('rid', 'root-ExportControl')
                .reveal()
                .cellAt(0)
                .down('.x-tree-elbow-img')
                .click();
        });

  3. #2
    Sencha User
    Join Date
    Mar 2020
    Posts
    11
    Answers
    1

    Default

    I have figured this out myself. I just needed to add a line of code so that the image is clicked and it works exactly as I expected:

    Code:
    it('should expand Export control under Security', function() {
            ST.grid('graphnavigator[reference="graphnavisecurity"]:last')
                .rowWith('rid', 'root-ExportControl')
                .reveal()
                .cellAt(0)
                .down('.x-tree-elbow-img')
                .click();
        });

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •