This commit is contained in:
@@ -29,8 +29,27 @@ describe("SEARCH", () => {
|
|||||||
cy.get('[data-cy="app:nav:abt"]').click();
|
cy.get('[data-cy="app:nav:abt"]').click();
|
||||||
cy.url().should("include", "/about");
|
cy.url().should("include", "/about");
|
||||||
cy.go("back");
|
cy.go("back");
|
||||||
|
|
||||||
cy.get("[data-cy=btnopenitem1] > .v-list-item__subtitle").should("exist");
|
cy.get("[data-cy=btnopenitem1] > .v-list-item__subtitle").should("exist");
|
||||||
|
//get the text in the subtitle
|
||||||
|
|
||||||
|
//save the start url for later
|
||||||
|
let sub = null;
|
||||||
|
//funcs are async so need to get result via then
|
||||||
|
|
||||||
|
// cy.url().then(url => {
|
||||||
|
// startUrl = url;
|
||||||
|
// });
|
||||||
|
|
||||||
|
cy.get("[data-cy=btnopenitem1] > .v-list-item__title")
|
||||||
|
.invoke("text")
|
||||||
|
.then((t) => {
|
||||||
|
sub = t;
|
||||||
|
//nave to first result form
|
||||||
|
cy.get("[data-cy=btnopenitem1]").click();
|
||||||
|
cy.url().should("include", "/widget");
|
||||||
|
//name field should contain whatever was shown in search results list
|
||||||
|
cy.contains(sub).should("exist");
|
||||||
|
});
|
||||||
|
|
||||||
//-----
|
//-----
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user