Skip to content

Commit

Permalink
feat: update e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
luzhuang committed Jul 20, 2023
1 parent 67fbefc commit 5a558d7
Showing 1 changed file with 2 additions and 50 deletions.
52 changes: 2 additions & 50 deletions cypress/e2e/animator.cy.ts
Original file line number Diff line number Diff line change
@@ -1,52 +1,4 @@
import { recurse } from "cypress-recurse";

describe("Animator", () => {
// it("Animation CustomAnimationClip", () => {
// cy.intercept("GET", "https://gw.alipayobjects.com/os/OasisHub/315000159/9722/Sponza.bin").as("initialRequest");
// cy.visit(`/mpa/animation-customAnimationClip.html`);
// cy.window().then((win) => {
// win.Math.random = () => 0.5;
// //@ts-ignore
// const { cypressEnv } = win;
// cypressEnv.engine._vSyncCount = Infinity;
// cy.wait("@initialRequest", { timeout: 60000 }).then(() => {
// cy.get("#canvas").then(() => {
// return new Promise((resolve) => {
// for (let i = 0; i < 10; ++i) {
// cypressEnv.engine._time._deltaTime = 100;
// cypressEnv.engine.update();
// }
// cy.wait(12000);
// const imageName = `Animation_animation-customAnimationClip`;
// resolve(
// recurse(
// () => {
// cypressEnv.engine._time._deltaTime = 0;
// cypressEnv.engine.update();
// return cy
// .get("#canvas")
// .screenshot(imageName, { overwrite: true })
// .then(() => {
// return cy.task("compare", {
// fileName: imageName,
// options: {
// specFolder: Cypress.spec.name
// }
// });
// });
// },
// ({ match }) => match,
// {
// limit: 3
// }
// )
// );
// });
// });
// });
// });
// });

it("Animator Play", () => {
cy.screenshotWithThreshold("Animator", "animator-play", 0.3);
});
Expand All @@ -71,11 +23,11 @@ describe("Animator", () => {
cy.screenshotWithThreshold("Animator", "animator-customBlendShape", 0.3);
});

it.only("Animator stateMachineScript", () => {
it("Animator stateMachineScript", () => {
cy.screenshotWithThreshold("Animator", "animator-stateMachineScript", 0.38);
});

it.only("Animator event", () => {
it("Animator event", () => {
cy.screenshotWithThreshold("Animator", "animator-event", 0.38);
});

Expand Down

0 comments on commit 5a558d7

Please sign in to comment.