Skip to content

Commit

Permalink
Merge branch 'development' of github.com:tutors-sdk/tutors into devel…
Browse files Browse the repository at this point in the history
…opment
  • Loading branch information
edeleastar committed Sep 7, 2023
2 parents 7af2db9 + 1d17627 commit 986b787
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 279 deletions.
17 changes: 4 additions & 13 deletions app/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,10 @@ Cypress.Commands.add("triggerCardAction", (lo: any) => {
} else {
const text = lo.title.trim();
cy.log(text);
// Perform assertions that multiple elements exist
cy.findAllByText(text, { timeout: 10000 }).should('exist').each(elements => {

// Check if at least one element is found
if (elements.length > 0) {
elements.each((i: any, el: any) => {
cy.log("element: ", el)
// Element(s) found, perform actions on the first element
cy.get(elements[i]).should('exist').click( {force : true} )
});
} else {
cy.log(`Element with text "${text}" not found.`);
}
cy.findByText(text).then(($element) => {
// Perform actions on the found element if needed
cy.wrap($element).should('exist');
cy.wrap($element).click( {force : true} )
});
cy.wait(500);
}
Expand Down
6 changes: 3 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
"buffer": "^6.0.3",
"crypto-es": "^1.2.7",
"cy-verify-downloads": "^0.1.15",
"cypress": "12.17.2",
"cypress-axe": "1.4.0",
"cypress-fail-fast": "7.0.1",
"cypress": "13.1.0",
"cypress-axe": "1.5.0",
"cypress-fail-fast": "7.0.3",
"cypress-real-events": "1.9.1",
"eslint-plugin-storybook": "0.6.13",
"file-saver": "2.0.5",
Expand Down
Loading

0 comments on commit 986b787

Please sign in to comment.