Skip to content

Commit

Permalink
chore: update anvil screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinOm committed Jul 4, 2024
1 parent 823ddd2 commit f67eca5
Show file tree
Hide file tree
Showing 52 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ describe(
});

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ describe(
});

it("1. Canvas Mode", () => {
cy.wait(5000);
anvilSnapshot.verifyCanvasMode("IconButtonWidget");
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ describe(
});

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ describe(
});

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

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
11 changes: 1 addition & 10 deletions app/client/cypress/support/Pages/Anvil/AnvilSnapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class AnvilSnapshot {
exitPreviewMode: ObjectsRegistry.CommonLocators._exitPreviewMode,
canvas: "[data-testid=t--canvas-artboard]",
colorMode: "[data-testid=t--anvil-theme-settings-color-mode]",
appViewerPage: "[data-testid=t--app-viewer-page-body]",
appViewerPage: "[data-testid=t--app-viewer-page]",
propertyPaneSidebar: "[data-testid=t--property-pane-sidebar]",
};

Expand Down Expand Up @@ -66,7 +66,6 @@ export class AnvilSnapshot {
.GetElement(this.locators.appViewerPage)
.matchImageSnapshot(`anvil${widgetName}Deploy${device}`, {
comparisonMethod: "ssim",
capture: "fullPage",
});
});
};
Expand All @@ -89,12 +88,4 @@ export class AnvilSnapshot {

this.appSettings.ClosePane();
};

public triggerInputInvalidState = () => {
this.enterPreviewMode();
cy.get("input[aria-required=true]").first().type("123");
cy.get("input[aria-required=true]").first().clear();
this.exitPreviewMode();
this.agHelper.GetNClick(this.locators.propertyPaneSidebar);
};
}
1 change: 1 addition & 0 deletions app/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"g:jest": "cd $INIT_CWD && jest --colors --no-cache --silent --maxWorkers=50%",
"test:unit:ci": "yarn workspaces foreach -tv run test:unit",
"generate:widget": "plop --plopfile generators/index.js",
"generate:anvil-snapshots": "rm -rf cypress/snapshots/Anvil* && npx cypress run --spec cypress/e2e/Regression/ClientSide/Anvil/Widgets/** --browser chrome --reporter cypress-image-snapshot/reporter",
"postinstall": "node cypress/apply-patches.js && yarn init-husky",
"storybook": "yarn workspace @design-system/storybook storybook",
"lint": "eslint --cache ./src && cd ./cypress && eslint -c .eslintrc.json --cache ./",
Expand Down
1 change: 0 additions & 1 deletion app/client/src/pages/AppViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ function AppViewer(props: Props) {
<AppViewerBody
$contain={isAutoLayout ? "content" : "strict"}
className={CANVAS_SELECTOR}
data-testid="t--app-viewer-page-body"
hasPages={pages.length > 1}
headerHeight={headerHeight}
ref={focusRef}
Expand Down

0 comments on commit f67eca5

Please sign in to comment.