Skip to content

Commit a3f21e3

Browse files
committed
updated headTags.spec's element selectors | added seeding task
1 parent 820e446 commit a3f21e3

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

cypress/e2e/content/headTags.spec.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
// assumes no Head Tags as starting state
22
describe("Head Tags", () => {
3+
before(() => {
4+
cy.task("seed:content", "fixtures/item.json").then(
5+
({ model, fields, items }) => {
6+
Cypress.env("modelZUID", model?.ZUID);
7+
Cypress.env("itemZUID", items[0]?.meta?.ZUID);
8+
}
9+
);
10+
});
311
it("creates and deletes new head tag", () => {
412
cy.waitOn("/v1/content/models*", () => {
5-
cy.visit("/content/6-556370-8sh47g/7-b939a4-457q19/head");
13+
cy.visit(
14+
`/content/${Cypress.env("modelZUID")}/${Cypress.env("itemZUID")}/head`
15+
);
616
});
717

8-
cy.contains("Create Head Tag", { timeout: 10000 }).click();
18+
cy.contains("Create Head Tag").click();
919

1020
cy.get("[data-cy=newTagCard]")
1121
.last()

0 commit comments

Comments
 (0)