Reputation: 4980
Try to do a simple test on the new UI page. It has 2 tabs: tab-pay
and tab-vaca
.
I could use cy.get(li:tab-vaca').focus()
to get to this tab. How can I verify (assert) it's been in in active state then? And if possible, can I switch by toggle
to one other tabs later? Thanks.
Upvotes: 0
Views: 3385
Reputation: 18634
To check that the tab is diabled:
cy.get('li#tab-race > button').should('have.class', 'tab tab-inactive')
To go to either tabs:
cy.get('ul li').first().click() //go to gender tab
cy.get('ul li').next().click() //go to race tab
Upvotes: 2