diff --git a/cypress/integration/WardrobePage/Outfit saving.spec.js b/cypress/integration/WardrobePage/Outfit saving.spec.js index 07771994..d27030f2 100644 --- a/cypress/integration/WardrobePage/Outfit saving.spec.js +++ b/cypress/integration/WardrobePage/Outfit saving.spec.js @@ -1,12 +1,12 @@ import * as page from "./page"; describe("WardrobePage: Outfit saving", () => { - it("Saves a basic outfit", () => { + it("Saves a simple Blue Acara", () => { cy.logInAs("dti-test"); cy.visit("/outfits/new?species=1&color=8"); // Give the outfit a unique timestamped name - const outfitName = `Cypress Test Outfit: ${new Date().toISOString()}`; + const outfitName = `Cypress Test - Blue Acara - ${new Date().toISOString()}`; page.getOutfitName({ timeout: 12000 }).click(); cy.focused().type(outfitName + "{enter}"); @@ -15,10 +15,34 @@ describe("WardrobePage: Outfit saving", () => { // Wait for the outfit to stop saving, and check that it redirected and // still shows the correct outfit preview and name. - page - .getSaveOutfitButton({ timeout: 12000 }) - .should("not.have.attr", "data-loading"); - cy.location("pathname").should("match", /^\/outfits\/[0-9]+$/); + cy.location("pathname", { timeout: 12000 }).should( + "match", + /^\/outfits\/[0-9]+$/ + ); + page.getOutfitName().should("have.text", outfitName); + page.getOutfitPreview().toMatchImageSnapshot(); + }); + + it("Saves a Zafara Tourist with worn and closeted items", () => { + cy.logInAs("dti-test"); + cy.visit( + "/outfits/new?species=54&color=34&pose=HAPPY_FEM&objects%5B%5D=38916&objects%5B%5D=51054&objects%5B%5D=38914&closet%5B%5D=36125&closet%5B%5D=36467&closet%5B%5D=47075&closet%5B%5D=47056&closet%5B%5D=39662&closet%5B%5D=56706&closet%5B%5D=38915&closet%5B%5D=56398" + ); + + // Give the outfit a unique timestamped name + const outfitName = `Cypress Test - Zafara Tourist - ${new Date().toISOString()}`; + page.getOutfitName({ timeout: 12000 }).click(); + cy.focused().type(outfitName + "{enter}"); + + // Save the outfit + page.getSaveOutfitButton().click().should("have.attr", "data-loading"); + + // Wait for the outfit to stop saving, and check that it redirected and + // still shows the correct outfit preview and name. + cy.location("pathname", { timeout: 12000 }).should( + "match", + /^\/outfits\/[0-9]+$/ + ); page.getOutfitName().should("have.text", outfitName); page.getOutfitPreview().toMatchImageSnapshot(); }); diff --git a/cypress/integration/WardrobePage/__image_snapshots__/WardrobePage Outfit saving Saves a Zafara Tourist with worn and closeted items #0.png b/cypress/integration/WardrobePage/__image_snapshots__/WardrobePage Outfit saving Saves a Zafara Tourist with worn and closeted items #0.png new file mode 100644 index 00000000..0fd75aa2 Binary files /dev/null and b/cypress/integration/WardrobePage/__image_snapshots__/WardrobePage Outfit saving Saves a Zafara Tourist with worn and closeted items #0.png differ