Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions app/client/cypress/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#ARG CHROME_VERSION="126.0.6478.114-1"
ARG YARN_VERSION='1.22.22'
ARG NODE_VERSION='20.11.1'
ARG CYPRESS_VERSION='13.5.1'
FROM cypress/factory:4.0.2

# Install chromium in this way since there is no browsers in the docker container for the arm64 architecture
# https://github.com/cypress-io/cypress-docker-images/issues/695
RUN apt update && apt install -y chromium

ENTRYPOINT ["yarn", "cypress:snapshot"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { ANVIL_EDITOR_TEST } from "../../../../../support/Constants";
import {
agHelper,
anvilSnapshot,
} from "../../../../../support/Objects/ObjectsCore";

describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Checkbox Group Widget`,
{ tags: ["@tag.Anvil"] },
() => {
before(() => {
agHelper.AddDsl("anvilCheckboxGroupWidget");
});

it("1. Canvas Mode", () => {
anvilSnapshot.triggerCheckboxGroupInvalidState();
anvilSnapshot.verifyCanvasMode("CheckboxGroupWidget");
});

it("2. Preview Mode", () => {
anvilSnapshot.verifyPreviewMode("CheckboxGroupWidget");
});

it("3. Deploy Mode", () => {
anvilSnapshot.verifyDeployMode("CheckboxGroupWidget");
});
},
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ANVIL_EDITOR_TEST } from "../../../../../support/Constants";
import {
agHelper,
anvilSnapshot,
} from "../../../../../support/Objects/ObjectsCore";

describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Checkbox Widget`,
{ tags: ["@tag.Anvil"] },
() => {
before(() => {
agHelper.AddDsl("anvilCheckboxWidget");
});

it("1. Canvas Mode", () => {
anvilSnapshot.verifyCanvasMode("CheckboxWidget");
});

it("2. Preview Mode", () => {
anvilSnapshot.verifyPreviewMode("CheckboxWidget");
});

it("3. Deploy Mode", () => {
anvilSnapshot.verifyDeployMode("CheckboxWidget");
});
},
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ANVIL_EDITOR_TEST } from "../../../../../support/Constants";
import {
agHelper,
anvilSnapshot,
} from "../../../../../support/Objects/ObjectsCore";

describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Heading Widget`,
{ tags: ["@tag.Anvil"] },
() => {
before(() => {
agHelper.AddDsl("anvilHeadingWidget");
});

it("1. Canvas Mode", () => {
anvilSnapshot.verifyCanvasMode("HeadingWidget");
});

it("2. Preview Mode", () => {
anvilSnapshot.verifyPreviewMode("HeadingWidget");
});

it("3. Deploy Mode", () => {
anvilSnapshot.verifyDeployMode("HeadingWidget");
});
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "../../../../../support/Objects/ObjectsCore";

describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Button Widget`,
`${ANVIL_EDITOR_TEST}: Anvil tests for Input Widget`,
{ tags: ["@tag.Anvil"] },
() => {
before(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ANVIL_EDITOR_TEST } from "../../../../../support/Constants";
import {
agHelper,
anvilSnapshot,
} from "../../../../../support/Objects/ObjectsCore";

describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Paragraph Widget`,
{ tags: ["@tag.Anvil"] },
() => {
before(() => {
agHelper.AddDsl("anvilParagraphWidget");
});

it("1. Canvas Mode", () => {
anvilSnapshot.verifyCanvasMode("ParagraphWidget");
});

it("2. Preview Mode", () => {
anvilSnapshot.verifyPreviewMode("ParagraphWidget");
});

it("3. Deploy Mode", () => {
anvilSnapshot.verifyDeployMode("ParagraphWidget");
});
},
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ANVIL_EDITOR_TEST } from "../../../../../support/Constants";
import {
agHelper,
anvilSnapshot,
} from "../../../../../support/Objects/ObjectsCore";

describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Radio Group Widget`,
{ tags: ["@tag.Anvil"] },
() => {
before(() => {
agHelper.AddDsl("anvilRadioGroupWidget");
});

it("1. Canvas Mode", () => {
anvilSnapshot.verifyCanvasMode("RadioGroupWidget");
});

it("2. Preview Mode", () => {
anvilSnapshot.verifyPreviewMode("RadioGroupWidget");
});

it("3. Deploy Mode", () => {
anvilSnapshot.verifyDeployMode("RadioGroupWidget");
});
},
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ANVIL_EDITOR_TEST } from "../../../../../support/Constants";
import {
agHelper,
anvilSnapshot,
} from "../../../../../support/Objects/ObjectsCore";

describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Stats Widget`,
{ tags: ["@tag.Anvil"] },
() => {
before(() => {
agHelper.AddDsl("anvilStatsWidget");
});

it("1. Canvas Mode", () => {
anvilSnapshot.verifyCanvasMode("StatsWidget");
});

it("2. Preview Mode", () => {
anvilSnapshot.verifyPreviewMode("StatsWidget");
});

it("3. Deploy Mode", () => {
anvilSnapshot.verifyDeployMode("StatsWidget");
});
},
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ANVIL_EDITOR_TEST } from "../../../../../support/Constants";
import {
agHelper,
anvilSnapshot,
} from "../../../../../support/Objects/ObjectsCore";

describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Switch Group Widget`,
{ tags: ["@tag.Anvil"] },
() => {
before(() => {
agHelper.AddDsl("anvilSwitchGroupWidget");
});

it("1. Canvas Mode", () => {
anvilSnapshot.verifyCanvasMode("SwitchGroupWidget");
});

it("2. Preview Mode", () => {
anvilSnapshot.verifyPreviewMode("SwitchoGroupWidget");
});

it("3. Deploy Mode", () => {
anvilSnapshot.verifyDeployMode("SwitchGroupWidget");
});
Comment on lines 15 to 25
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix typo in the Preview mode test.

There is a typo in the widget name for the Preview mode test. It should be "SwitchGroupWidget".

-      anvilSnapshot.verifyPreviewMode("SwitchoGroupWidget");
+      anvilSnapshot.verifyPreviewMode("SwitchGroupWidget");
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
it("1. Canvas Mode", () => {
anvilSnapshot.verifyCanvasMode("SwitchGroupWidget");
});
it("2. Preview Mode", () => {
anvilSnapshot.verifyPreviewMode("SwitchoGroupWidget");
});
it("3. Deploy Mode", () => {
anvilSnapshot.verifyDeployMode("SwitchGroupWidget");
});
it("1. Canvas Mode", () => {
anvilSnapshot.verifyCanvasMode("SwitchGroupWidget");
});
it("2. Preview Mode", () => {
anvilSnapshot.verifyPreviewMode("SwitchGroupWidget");
});
it("3. Deploy Mode", () => {
anvilSnapshot.verifyDeployMode("SwitchGroupWidget");
});

},
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ANVIL_EDITOR_TEST } from "../../../../../support/Constants";
import {
agHelper,
anvilSnapshot,
} from "../../../../../support/Objects/ObjectsCore";

describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Switch Widget`,
{ tags: ["@tag.Anvil"] },
() => {
before(() => {
agHelper.AddDsl("anvilSwitchWidget");
});

it("1. Canvas Mode", () => {
anvilSnapshot.verifyCanvasMode("SwitchWidget");
});

it("2. Preview Mode", () => {
anvilSnapshot.verifyPreviewMode("SwitchWidget");
});

it("3. Deploy Mode", () => {
anvilSnapshot.verifyDeployMode("SwitchWidget");
});
},
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ANVIL_EDITOR_TEST } from "../../../../../support/Constants";
import {
agHelper,
anvilSnapshot,
} from "../../../../../support/Objects/ObjectsCore";

describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Table Widget`,
{ tags: ["@tag.Anvil"] },
() => {
before(() => {
agHelper.AddDsl("anvilTableWidget");
});

it("1. Canvas Mode", () => {
anvilSnapshot.verifyCanvasMode("TableWidget");
});

it("2. Preview Mode", () => {
anvilSnapshot.verifyPreviewMode("TableWidget");
});

it("3. Deploy Mode", () => {
anvilSnapshot.verifyDeployMode("TableWidget");
});
},
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { ANVIL_EDITOR_TEST } from "../../../../../support/Constants";
import {
agHelper,
anvilSnapshot,
} from "../../../../../support/Objects/ObjectsCore";

describe(
`${ANVIL_EDITOR_TEST}: Anvil tests for Zone and Section Widget`,
{ tags: ["@tag.Anvil"] },
() => {
before(() => {
agHelper.AddDsl("anvilZoneSectionWidget");
});

it("1. Canvas Mode", () => {
anvilSnapshot.verifyCanvasMode("ZoneSectionWidget");
});

it("2. Preview Mode", () => {
anvilSnapshot.verifyPreviewMode("ZoneSectionWidget");
});

it("3. Deploy Mode", () => {
anvilSnapshot.verifyDeployMode("ZoneSectionWidget");
});
},
);
Loading