Skip to content

Commit 6709f44

Browse files
committed
chore(cypress-commands): fix eslint errors
1 parent ba7dc33 commit 6709f44

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

packages/cypress-commands/src/commands.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -194,18 +194,22 @@ Cypress.Commands.add('closeUi5PopupWithEsc', () => {
194194
cy.get('body').type('{esc}', { force: true });
195195
});
196196

197-
Cypress.Commands.add('clickUi5ListItemByText', { prevSubject: 'optional' }, (subject, text, options = { force: true }) => {
198-
cy.document().then((doc) => {
199-
const _subject = (subject as Cypress.JQueryWithSelector<UI5Element>)?.[0] || doc;
200-
const li = _subject.querySelector(`[text="${text}"]`);
197+
Cypress.Commands.add(
198+
'clickUi5ListItemByText',
199+
{ prevSubject: 'optional' },
200+
(subject, text, options = { force: true }) => {
201+
cy.document().then((doc) => {
202+
const _subject = (subject as Cypress.JQueryWithSelector<UI5Element>)?.[0] || doc;
203+
const li = _subject.querySelector(`[text="${text}"]`);
201204

202-
if (li) {
203-
cy.wrap(li).click(options);
204-
} else {
205-
cy.wrap(_subject).contains(text).click(options);
206-
}
207-
});
208-
});
205+
if (li) {
206+
cy.wrap(li).click(options);
207+
} else {
208+
cy.wrap(_subject).contains(text).click(options);
209+
}
210+
});
211+
}
212+
);
209213

210214
Cypress.Commands.add('clickUi5SelectOptionByText', { prevSubject: 'element' }, (subject, text, options = {}) => {
211215
cy.wrap(subject)

0 commit comments

Comments
 (0)