Skip to content

Commit

Permalink
Merge branch 'release' into chore/snowflake-junit-test-cases
Browse files Browse the repository at this point in the history
  • Loading branch information
“sneha122” committed Jul 9, 2024
2 parents 0e1ce4f + 0941014 commit 87074a7
Show file tree
Hide file tree
Showing 152 changed files with 31,134 additions and 72 deletions.
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");
});
},
);
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");
});
},
);
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,39 @@ describe(
cy.discardTableRow(4, 0);
});

it("6. should check that currentRow is accessible in the select options", () => {
it("6. should check that on option select uses label as value in select cell (#34743)", () => {
cy.updateCodeInput(
".t--property-control-options",
`
[
{
"label": "#1label",
"value": "#1value"
},
{
"label": "#2label",
"value": "#2value"
},
{
"label": "#3label",
"value": "#3value"
}
]
`,
);
cy.editTableSelectCell(0, 0);
cy.get(".menu-item-link").contains("#3label").click();

_.agHelper.ValidateToastMessage("#3label");

cy.get(".menu-virtual-list").should("not.exist");
cy.readTableV2data(0, 0).then((val) => {
expect(val).to.equal("#3label");
});
cy.discardTableRow(4, 0);
});

it("7. should check that currentRow is accessible in the select options", () => {
cy.updateCodeInput(
".t--property-control-options",
`
Expand All @@ -199,7 +231,7 @@ describe(
cy.get(".menu-item-text").contains("#1").should("not.exist");
});

it("7. should check that 'same select option in new row' property is working", () => {
it("8. should check that 'same select option in new row' property is working", () => {
_.propPane.NavigateBackToPropertyPane();

const checkSameOptionsInNewRowWhileEditing = () => {
Expand Down Expand Up @@ -265,7 +297,7 @@ describe(
checkSameOptionsWhileAddingNewRow();
});

it("8. should check that 'new row select options' is working", () => {
it("9. should check that 'new row select options' is working", () => {
const checkNewRowOptions = () => {
// New row select options should be visible when "Same options in new row" is turned off
_.propPane.TogglePropertyState("Same options in new row", "Off");
Expand Down Expand Up @@ -330,7 +362,7 @@ describe(
checkNoOptionState();
});

it("9. should check that server side filering is working", () => {
it("10. should check that server side filering is working", () => {
_.dataSources.CreateDataSource("Postgres");
_.dataSources.CreateQueryAfterDSSaved(
"SELECT * FROM public.astronauts {{this.params.filterText ? `WHERE name LIKE '%${this.params.filterText}%'` : ''}} LIMIT 10;",
Expand Down
Loading

0 comments on commit 87074a7

Please sign in to comment.