Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GroupTable component #16

Closed
feathergrass opened this issue Jan 17, 2018 · 3 comments
Closed

Support GroupTable component #16

feathergrass opened this issue Jan 17, 2018 · 3 comments
Assignees
Labels
state: fixed Fixed by the developer type: enhancement New feature or request
Milestone

Comments

@feathergrass
Copy link

feathergrass commented Jan 17, 2018

  • Expand / Collapse a node (selected by label).
  • Get a collection of inner rows for further assertions.

Updates

New component GroupTable is introduced.

It supports the following two conditions:

  • Conditions#EXPANDED - checks that all group rows are expanded
  • Conditions#COLLAPSED - checks that all group rows are collapsed

The GroupTable component has the following method:

  • expandAll() - expands all group rows
  • collapseAll() - collapses all group rows
  • expand(By groupRowSelector) - expands first met group row that matches passed selector
  • collapse(By groupRowSelector) - collapses first met group row that matches passed selector

Usage example

@Test
void testExpandAll() {
    $c(AppMenu)
            .openItem(Menus.PRODUCT_BROWSE)

    $c(GroupTable, 'productsTable')
            .shouldBe(Condition.visible)
            .expandAll()
            .shouldBe(Conditions.EXPANDED)
}

@Test
void testCollapseAll() {
    $c(AppMenu)
            .openItem(Menus.PRODUCT_BROWSE)

    $c(GroupTable, 'productsTable')
            .shouldBe(Condition.visible)
            .collapseAll()
            .shouldBe(Conditions.COLLAPSED)
}

@Test
void testExpandSpecified() {
    $c(AppMenu)
            .openItem(Menus.PRODUCT_BROWSE)

    // only two groups exist
    $c(GroupTable, 'productsTable')
            .expand(withText('123'))
            .expand(withText('321'))
            .shouldBe(Conditions.EXPANDED)
}
@jreznot jreznot self-assigned this Jan 17, 2018
@jreznot jreznot added the type: enhancement New feature or request label Jan 17, 2018
@natfirst natfirst assigned natfirst and unassigned jreznot Jul 26, 2018
@dtsaryov dtsaryov self-assigned this Aug 12, 2019
@dtsaryov dtsaryov modified the milestones: 1.0, 2.0 Aug 12, 2019
@dtsaryov dtsaryov changed the title Table: grouptable support Support GroupTable component Aug 30, 2019
dtsaryov pushed a commit that referenced this issue Nov 13, 2019
@natfirst
Copy link
Member

natfirst commented Dec 11, 2019

expandAll() method does not expand all groups, only the first one in the table
mruifJCBK1
collapseAll() method does nothing

@natfirst
Copy link
Member

The second part of the issue will be implemented in another issue #66

@natfirst
Copy link
Member

natfirst commented Dec 11, 2019

Also, add an ability to expand only one selected group

dtsaryov pushed a commit that referenced this issue Dec 18, 2019
@natfirst natfirst added the state: fixed Fixed by the developer label Jan 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: fixed Fixed by the developer type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants