diff --git a/app/cypress/e2e/tutorsReader.cy.ts b/app/cypress/e2e/tutorsReader.cy.ts index eb6b9bbbe..a4b496761 100644 --- a/app/cypress/e2e/tutorsReader.cy.ts +++ b/app/cypress/e2e/tutorsReader.cy.ts @@ -44,9 +44,9 @@ describe("Tutors Reader: Loading the JSON fixture", function () { cy.processCompanionsAndWallsLinks(course); }); - // it("Testing search feature", function () { - // cy.partialSearchVerification(course.los); - // }); + it("Testing search feature", function () { + cy.partialSearchVerification(course.los); + }); it("Topics", function () { course.los.forEach((topic: any) => { diff --git a/app/cypress/support/commands.ts b/app/cypress/support/commands.ts index d915f5dd2..de85ebc4f 100644 --- a/app/cypress/support/commands.ts +++ b/app/cypress/support/commands.ts @@ -88,7 +88,7 @@ Cypress.Commands.add("triggerCardAction", (lo: any) => { 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.wrap($element).click({ force: true }) }); cy.wait(500); } @@ -141,7 +141,7 @@ Cypress.Commands.add("partialSearchVerification", (searchWord: string) => { cy.get('div.h-full.overflow-hidden.contents', { timeout: 10000 }).invoke('css', 'overflow', 'visible'); cy.get('a.btn.btn-sm', { timeout: 10000 }).eq(0).click({ force: true }); cy.get('input#search', { timeout: 10000 }).eq(0).type("lab"); - cy.get('.s-1juWPqSteKNM', { timeout: 10000 }).find('a') + cy.get('div.pt-4.text-right.text-sm a', { timeout: 10000 }) .each((link) => { //const links = els.toArray(); let href = link.attr('href'); @@ -165,9 +165,7 @@ Cypress.Commands.add("partialSearchVerification", (searchWord: string) => { if (countOfMatches === 0) { throw error } - }) - }); Cypress.Commands.add("verifyContentsExists", (lo: any) => { diff --git a/package-lock.json b/package-lock.json index cbf371ef8..9dad53fd4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ ], "devDependencies": { "cy-verify-downloads": "0.1.16", - "cypress": "13.1.0", + "cypress": "^13.1.0", "cypress-fail-fast": "7.0.3", "eslint": "^8.30.0", "eslint-config-custom": "*", @@ -61,7 +61,7 @@ "buffer": "^6.0.3", "crypto-es": "^1.2.7", "cy-verify-downloads": "^0.1.15", - "cypress": "13.1.0", + "cypress": "^13.1.0", "cypress-axe": "1.5.0", "cypress-fail-fast": "7.0.3", "cypress-real-events": "1.9.1", diff --git a/package.json b/package.json index d92f3757f..e3f465225 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "cy-verify-downloads": "0.1.16", - "cypress": "13.1.0", + "cypress": "^13.1.0", "cypress-fail-fast": "7.0.3", "eslint": "^8.30.0", "eslint-config-custom": "*",