> Pull Request Template > > Use this template to quickly create a well written pull request. Delete all quotes before creating the pull request. > ## Description In this pr we are writing tests to validate a few preliminary cases of the Anvil Editor. the purpose of the task is to be able to run anvil tests along side the present suite of test cases. Things to note for Anvil based test cases - ANVIL_EDITOR_TEST tag is used for Anvil based tests to make sure relevant feature flags are set(using featureFlagIntercept) before creating pages so that Anvil pages are created. - each test case in a Anvil spec file also use featureFlagIntercept to set the relevant flags since pages are reloded before running tests. #### PR fixes following issue(s) Fixes # (issue number) > if no issue exists, please create an issue and ask the maintainers about this first > > #### Media > A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video > > #### Type of change > Please delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (fix or feature that would cause existing functionality to not work as expected) - Chore (housekeeping or task changes that don't impact user perception) - This change requires a documentation update > > > ## Testing > #### How Has This Been Tested? > Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration. > Delete anything that is not relevant - [ ] Manual - [ ] JUnit - [ ] Jest - [ ] Cypress > > #### Test Plan > Add Testsmith test cases links that relate to this PR > > #### Issues raised during DP testing > Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR) > > > ## Checklist: #### Dev activity - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] PR is being merged under a feature flag #### QA activity: - [ ] [Speedbreak features](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#speedbreakers-) have been covered - [ ] Test plan covers all impacted features and [areas of interest](https://github.com/appsmithorg/TestSmith/wiki/Guidelines-for-test-plans#areas-of-interest-) - [ ] Test plan has been peer reviewed by project stakeholders and other QA members - [ ] Manually tested functionality on DP - [ ] We had an implementation alignment call with stakeholders post QA Round 2 - [ ] Cypress test cases have been added and approved by SDET/manual QA - [ ] Added `Test Plan Approved` label after Cypress tests were reviewed - [ ] Added `Test Plan Approved` label after JUnit tests were reviewed <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced Anvil editor with the ability to test app navigation, drag and drop functionality, and suggested widgets feature. - Improved accessibility and interaction capabilities within the Anvil canvas. - **Tests** - Added comprehensive end-to-end tests for new Anvil editor features, including app navigation settings, widget drag and drop, and suggested widgets integration. - **Refactor** - Introduced new constants and locators for better test structure and readability. - **Style** - Updated components with new attributes for improved accessibility and testing. - **Chores** - Added new tags for organizing tests related to the Anvil editor. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
127 lines
3.1 KiB
JavaScript
127 lines
3.1 KiB
JavaScript
export const modifierKey = Cypress.platform === "darwin" ? "meta" : "ctrl";
|
|
export const TABLE_COLUMN_ORDER_KEY = "tableWidgetColumnOrder";
|
|
export const TABLE_DATA_DYNAMIC = `{{[
|
|
{
|
|
"id": 2381224,
|
|
"email": "michael.lawson@reqres.in",
|
|
"userName": "Michael Lawson",
|
|
"productName": "Chicken Sandwich",
|
|
"orderAmount": 4.99
|
|
},
|
|
{
|
|
"id": 2736212,
|
|
"email": "lindsay.ferguson@reqres.in",
|
|
"userName": "Lindsay Ferguson",
|
|
"productName": "Tuna Salad",
|
|
"orderAmount": 9.99
|
|
},
|
|
{
|
|
"id": 6788734,
|
|
"email": "tobias.funke@reqres.in",
|
|
"userName": "Tobias Funke",
|
|
"productName": "Beef steak",
|
|
"orderAmount": 19.99
|
|
},
|
|
{
|
|
"id": 7434532,
|
|
"email": "byron.fields@reqres.in",
|
|
"userName": "Byron Fields",
|
|
"productName": "Chicken Sandwich",
|
|
"orderAmount": 4.99
|
|
},
|
|
{
|
|
"id": 7434532,
|
|
"email": "ryan.holmes@reqres.in",
|
|
"userName": "Ryan Holmes",
|
|
"productName": "Avocado Panini",
|
|
"orderAmount": 7.99
|
|
},
|
|
{
|
|
"id": 7434532,
|
|
"email": "byron.fields@reqres.in",
|
|
"userName": "Byron Fields",
|
|
"productName": "Chicken Sandwich",
|
|
"orderAmount": 4.99
|
|
},
|
|
{
|
|
"id": 7434532,
|
|
"email": "ryan.holmes@reqres.in",
|
|
"userName": "Ryan Holmes",
|
|
"productName": "Avocado Panini",
|
|
"orderAmount": 7.99
|
|
},
|
|
{
|
|
"id": 7434532,
|
|
"email": "byron.fields@reqres.in",
|
|
"userName": "Byron Fields",
|
|
"productName": "Chicken Sandwich",
|
|
"orderAmount": 4.99
|
|
},
|
|
{
|
|
"id": 7434532,
|
|
"email": "ryan.holmes@reqres.in",
|
|
"userName": "Ryan Holmes",
|
|
"productName": "Avocado Panini",
|
|
"orderAmount": 7.99
|
|
},
|
|
{
|
|
"id": 7434532,
|
|
"email": "byron.fields@reqres.in",
|
|
"userName": "Byron Fields",
|
|
"productName": "Chicken Sandwich",
|
|
"orderAmount": 4.99
|
|
},
|
|
{
|
|
"id": 7434532,
|
|
"email": "ryan.holmes@reqres.in",
|
|
"userName": "Ryan Holmes",
|
|
"productName": "Avocado Panini",
|
|
"orderAmount": 7.99
|
|
},
|
|
{
|
|
"id": 7434532,
|
|
"email": "byron.fields@reqres.in",
|
|
"userName": "Byron Fields",
|
|
"productName": "Chicken Sandwich",
|
|
"orderAmount": 4.99
|
|
},
|
|
{
|
|
"id": 7434532,
|
|
"email": "ryan.holmes@reqres.in",
|
|
"userName": "Ryan Holmes",
|
|
"productName": "Avocado Panini",
|
|
"orderAmount": 7.99
|
|
}
|
|
]}}`;
|
|
|
|
export const TABLE_DATA_STATIC = `
|
|
[
|
|
{
|
|
"id": "#1",
|
|
"task": "Drop a table",
|
|
"status": "✅",
|
|
"action": ""
|
|
},
|
|
{
|
|
"id": "#2",
|
|
"task": "Create a query fetch_users with the Mock DB",
|
|
"status": "--",
|
|
"action": ""
|
|
},
|
|
{
|
|
"id": "#3",
|
|
"task": "Bind the query using => fetch_users.data",
|
|
"status": "--",
|
|
"action": ""
|
|
}
|
|
]
|
|
`;
|
|
|
|
export const WALKTHROUGH_TEST_PAGE = "WALKTHROUGH_TEST_PAGE";
|
|
export const ANVIL_EDITOR_TEST = "ANVIL_EDITOR_TEST";
|
|
export const DEFAULT_COLUMN_NAME = "Table Column";
|
|
export const FEATURE_WALKTHROUGH_INDEX_KEY = "FEATURE_WALKTHROUGH";
|
|
export const USER_SIGN_UP_INDEX_KEY = "USER_SIGN_UP";
|
|
|
|
export const LICENSE_FEATURE_FLAGS = ["license_audit_logs_enabled"];
|