-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: tests for wds button widget (#34242)
/ok-to-test tags="@tag.Anvil" <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced test cases for Anvil Button Widgets, including Canvas, Preview, and Deploy modes. - **Bug Fixes** - Updated CSS and HTML selectors for better element targeting and testing reliability. - **Style** - Improved styling logic for buttons in the InlineButtons component. - **Chores** - Added `data-testid` attributes for better test targeting. - Refactored code for string concatenations and URL constructions in DeployModeHelper. <!-- end of auto-generated comment: release notes by coderabbit.ai --><!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/9597157402> > Commit: c551705 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9597157402&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.Anvil` <!-- end of auto-generated comment: Cypress test results --> --------- Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro-2.local>
- Loading branch information
Showing
38 changed files
with
10,887 additions
and
8 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
app/client/cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilButtonWidgetSnapshot_spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Button Widget`, | ||
{ tags: ["@tag.Anvil"] }, | ||
() => { | ||
before(() => { | ||
agHelper.AddDsl("anvilButtonWidget"); | ||
}); | ||
|
||
it("1. Canvas Mode", () => { | ||
anvilSnapshot.verifyCanvasMode("ButtonWidget"); | ||
}); | ||
|
||
it("2. Preview Mode", () => { | ||
anvilSnapshot.verifyPreviewMode("ButtonWidget"); | ||
}); | ||
|
||
it("3. Deploy Mode", () => { | ||
anvilSnapshot.verifyDeployMode("ButtonWidget"); | ||
}); | ||
}, | ||
); |
27 changes: 27 additions & 0 deletions
27
...ent/cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilIconButtonWidgetSnapshot_spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Icon Button Widget`, | ||
{ tags: ["@tag.Anvil"] }, | ||
() => { | ||
before(() => { | ||
agHelper.AddDsl("anvilIconButtonWidget"); | ||
}); | ||
|
||
it("1. Canvas Mode", () => { | ||
anvilSnapshot.verifyCanvasMode("IconButtonWidget"); | ||
}); | ||
|
||
it("2. Preview Mode", () => { | ||
anvilSnapshot.verifyPreviewMode("IconButtonWidget"); | ||
}); | ||
|
||
it("3. Deploy Mode", () => { | ||
anvilSnapshot.verifyDeployMode("IconButtonWidget"); | ||
}); | ||
}, | ||
); |
27 changes: 27 additions & 0 deletions
27
...t/cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilInlineButtonWidgetSnapshot_spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Inline Button Widget`, | ||
{ tags: ["@tag.Anvil"] }, | ||
() => { | ||
before(() => { | ||
agHelper.AddDsl("anvilInlineButtonWidget"); | ||
}); | ||
|
||
it("1. Canvas Mode", () => { | ||
anvilSnapshot.verifyCanvasMode("InlineButtonWidget"); | ||
}); | ||
|
||
it("2. Preview Mode", () => { | ||
anvilSnapshot.verifyPreviewMode("InlineButtonWidget"); | ||
}); | ||
|
||
it("3. Deploy Mode", () => { | ||
anvilSnapshot.verifyDeployMode("InlineButtonWidget"); | ||
}); | ||
}, | ||
); |
27 changes: 27 additions & 0 deletions
27
.../cypress/e2e/Regression/ClientSide/Anvil/Widgets/AnvilToolbarButtonWidgetSnapshot_spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 Toolbar Button Widget`, | ||
{ tags: ["@tag.Anvil"] }, | ||
() => { | ||
before(() => { | ||
agHelper.AddDsl("anvilToolbarButtonWidget"); | ||
}); | ||
|
||
it("1. Canvas Mode", () => { | ||
anvilSnapshot.verifyCanvasMode("ToolbarButtonWidget"); | ||
}); | ||
|
||
it("2. Preview Mode", () => { | ||
anvilSnapshot.verifyPreviewMode("ToolbarButtonWidget"); | ||
}); | ||
|
||
it("3. Deploy Mode", () => { | ||
anvilSnapshot.verifyDeployMode("ToolbarButtonWidget"); | ||
}); | ||
}, | ||
); |
Oops, something went wrong.