Skip to content

Commit

Permalink
Merge pull request #127 from aliaghdam/develop
Browse files Browse the repository at this point in the history
fix: try to click on first button that contains text while opening setting sidbar
  • Loading branch information
jeffpaul authored Jun 27, 2024
2 parents 0139156 + 66e2c87 commit cb08c74
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/commands/open-document-settings-sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const openDocumentSettingsSidebar = (tab = 'Post'): void => {

$settingButtonIds.forEach($settingButtonId => {
if ($body.find($settingButtonId).length) {
cy.get($settingButtonId).click();
cy.wrap($body.find($settingButtonId)).as('sidebarButton');
cy.get($settingButtonId).first().click();
cy.wrap($body.find($settingButtonId).first()).as('sidebarButton');
}
});

Expand All @@ -35,8 +35,8 @@ export const openDocumentSettingsSidebar = (tab = 'Post'): void => {

$tabSelectors.forEach($tabSelector => {
if ($body.find($tabSelector).length) {
cy.get($tabSelector).click();
cy.wrap($body.find($tabSelector)).as('selectedTab');
cy.get($tabSelector).first().click();
cy.wrap($body.find($tabSelector).first()).as('selectedTab');
}
});
});
Expand Down

0 comments on commit cb08c74

Please sign in to comment.