Tree Grid + Row Interaction
Panel 21 of the Lightning-Pattern POC page (mockapps/salesforce): a role=treegrid table of hierarchical records in columns -- an expandable parent row whose child rows exist only while it is expanded, each with a per-row Click Me button; the whole table body is redrawn on every expand/collapse. POC: expand the parent row, verify child business values across columns, use Click Me on a child, collapse and verify child rows disappear. Uses TasWebTable (this is the page's second table, so it also proves every table path resolves from the bound table only) plus plain objects for the toggle, the parent's aria-expanded and the absence of the child rows.
| # | Action | Window / Method | Object | Value | Aux 1 | Aux 2 |
|---|---|---|---|---|---|---|
| 1 | Call User Method | fLaunchWebApplication | autSalesforce | <NONE> | ||
| 2 | Enter comment for Logs | Comment Name=Hierarchical tree grid | Brief Description=Expand the parent row, verify child business values across columns, use Click Me on a child, collapse and verify child rows disappear | Expected Result=Child rows exist only while the parent is expanded; their values read correctly across the columns; a child's Click Me affects only that row; collapsing removes the children and expanding recreates them fresh | ||
| 3 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | Name,Type,Status,Action | Prop:ColNames | PreScrollToView:true |
| 4 | Verify the tree grid's column headers -- read from THIS table, not the page's other table | |||||
| 5 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | 1 | Prop:RowCount | PreScrollToView:true |
| 6 | Verify only the parent row exists while collapsed | |||||
| 7 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | rowTreeGridParent | false | Prop:aria-expanded | PreScrollToView:true |
| 8 | Verify the parent row reports aria-expanded=false | |||||
| 9 | Set Value | sfTreeGrid | btnTreeGridToggle | {click} | PreScrollToView:true | |
| 10 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | rowTreeGridParent | true | Prop:aria-expanded | PreScrollToView:true |
| 11 | Verify the parent row is expanded | |||||
| 12 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | 3 | Prop:RowCount | PreScrollToView:true |
| 13 | Verify expanding created the two child rows (three rows in all) | |||||
| 14 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | Group,Customer,Customer | Prop:ColContents | Col:Type#PreScrollToView:true |
| 15 | Verify the Type column across parent and children | |||||
| 16 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | Active,Active,Active | Prop:ColContents | Col:Status#PreScrollToView:true |
| 17 | Verify the Status column across parent and children | |||||
| 18 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | 2 | Prop:UniqueRow | ColsToCheck:Name*=Test Assured#PreScrollToView:true |
| 19 | Verify the child Test Assured is row 2 | |||||
| 20 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | 3 | Prop:UniqueRow | ColsToCheck:Name*=Global Media#PreScrollToView:true |
| 21 | Verify the child Global Media is row 3 | |||||
| 22 | CHECK Value - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | Click Me | Row:2 | Col:Action#cellObj:.//button[contains(@class,'tgClick')]#cellType:Object#cellProp:text#PreScrollToView:true |
| 23 | Verify the child Click Me buttons start unclicked | |||||
| 24 | Set Value | sfTreeGrid | tblTreeGrid | LeftClick | Row:2 | Col:Action#cellObj:.//button[contains(@class,'tgClick')]#cellType:Object#PreScrollToView:true |
| 25 | CHECK Value - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | Clicked | Row:2 | Col:Action#cellObj:.//button[contains(@class,'tgClick')]#cellType:Object#cellProp:text#PreScrollToView:true |
| 26 | Verify Click Me on the Test Assured child now reads Clicked | |||||
| 27 | CHECK Value - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | true | Row:2 | Col:Action#cellObj:.//button[contains(@class,'tgClick')]#cellType:Object#cellProp:data-clicked#PreScrollToView:true |
| 28 | Verify the Test Assured child's data-clicked flag is true | |||||
| 29 | CHECK Value - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | Click Me | Row:3 | Col:Action#cellObj:.//button[contains(@class,'tgClick')]#cellType:Object#cellProp:text#PreScrollToView:true |
| 30 | Verify only that row changed -- the Global Media child still reads Click Me | |||||
| 31 | Set Value | sfTreeGrid | btnTreeGridToggle | {click} | PreScrollToView:true | |
| 32 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | rowTreeGridParent | false | Prop:aria-expanded | PreScrollToView:true |
| 33 | Verify the parent row collapsed | |||||
| 34 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | 1 | Prop:RowCount | PreScrollToView:true |
| 35 | Verify collapsing left only the parent row | |||||
| 36 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | rowTreeGridChild | false | Prop:Exist | DynamicLocator:Test Assured |
| 37 | Verify the child row Test Assured is gone from the DOM | |||||
| 38 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | rowTreeGridChild | false | Prop:Exist | DynamicLocator:Global Media |
| 39 | Verify the child row Global Media is gone from the DOM | |||||
| 40 | Set Value | sfTreeGrid | btnTreeGridToggle | {click} | PreScrollToView:true | |
| 41 | CHECK Property - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | 3 | Prop:RowCount | PreScrollToView:true |
| 42 | Verify expanding again recreates the two child rows | |||||
| 43 | CHECK Value - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | Click Me | Row:2 | Col:Action#cellObj:.//button[contains(@class,'tgClick')]#cellType:Object#cellProp:text#PreScrollToView:true |
| 44 | Verify the recreated child row starts fresh -- its Click Me reads Click Me again, the earlier Clicked state did not survive | |||||
| 45 | CHECK Value - Equals(CaseFalse) | sfTreeGrid | tblTreeGrid | false | Row:2 | Col:Action#cellObj:.//button[contains(@class,'tgClick')]#cellType:Object#cellProp:data-clicked#PreScrollToView:true |
| 46 | Verify the recreated row's data-clicked flag is false |
READY TO SEE THE EVIDENCE?
Request a DemoSee whether TA STUDIO fits your enterprise applications.
A focused walkthrough grounded in the applications your team tests.
Get in Touch