Skip to content

Commit

Permalink
lets try with interceptors
Browse files Browse the repository at this point in the history
  • Loading branch information
sroertgen committed Aug 31, 2023
1 parent 876bd3c commit c8e1097
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cypress/e2e/searchAndFilter.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,18 @@ describe("search and filter", () => {
})

it("search works after switching language", () => {
cy.intercept("/w3id.org/search/en/prefLabel.cfg.json").as("cfg")
cy.intercept("/w3id.org/search/en/prefLabel.ctx.json").as("ctx")
cy.intercept("/w3id.org/search/en/prefLabel.map.json").as("map")
cy.intercept("/w3id.org/search/en/reg.json").as("reg")
cy.intercept("/w3id.org/search/en/prefLabel.tag.json").as("tag")
cy.intercept("/w3id.org/search/en/prefLabel.store.json").as("store")
// cy.intercept("/w3id.org/index.en.html/page-data.json").as("pageData")
cy.visit("/w3id.org/index.de.html")

cy.contains("en").click()

cy.wait(["@ctx", "@cfg", "@map", "@reg", "@tag", "@store"])
cy.get(".currentLanguage").contains("en").should("exist")
// cy.get("span").contains("Konzept 1").should("not.exist")
cy.get("span", { timeout: 10000 }).contains("Concept 1").should("exist")
Expand Down

0 comments on commit c8e1097

Please sign in to comment.