This commit is contained in:
2020-04-09 20:46:26 +00:00
parent 64c70b66cf
commit df7784610f

View File

@@ -29,8 +29,27 @@ describe("SEARCH", () => {
cy.get('[data-cy="app:nav:abt"]').click();
cy.url().should("include", "/about");
cy.go("back");
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");
});
//-----
});