PromucFlow_constructor/app/client/cypress/locators/GeneratePage.json
Rahul Barwal c096bb5e5b
test: Failing cypress tests due to removal of empty canvas prompts (#34037)
## Description
This PR fixes impact of
https://github.com/appsmithorg/appsmith/pull/33993

Refactors visual regression tests to use PageList for page generation;
remove obsolete empty canvas spec and related selectors.
* Removed unncessary:
`cypress/e2e/Regression/ClientSide/OtherUIFeatures/EmptyCanvas_spec.js`
* Fixes
`cypress/e2e/Regression/ClientSide/VisualTests/AppPageLayout_spec.js`

**RCA:**
The [original PR](https://github.com/appsmithorg/appsmith/pull/33993)
catered to removal of empty canvas prompts and visual tests were not run
leading to subsequent failures in the CI for EmptyCanvas_spec &
AppPageLayout_spec.

This PR caters to failing visual tests, while running `@tag.Visual` we
noticed that other (unrelated) visual specs started failing. These new
failures fail in local as well.
Whereas they were not failing in TBP or `@tag.All` runs and `@tag.All`
succeeded for this PR as well.

Fixes https://github.com/appsmithorg/appsmith/issues/33874
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9413838227>
> Commit: b6d7f6012e0f2c3f3e030ad280354cc3d22f57ad
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9413838227&attempt=2"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->
















## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Refactor**
- Updated method call for adding a new page in visual regression tests
to improve code clarity and maintainability.

- **Chores**
  - Removed unused locators and declarations to clean up the codebase.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Apeksha Bhosale <7846888+ApekshaBhosale@users.noreply.github.com>
2024-06-07 15:24:07 +05:30

30 lines
1.8 KiB
JSON

{
"selectDatasourceDropdown": "[data-testid=t--datasource-dropdown]",
"datasourceDropdownOption": "[data-testid=t--datasource-dropdown-option]",
"selectTableDropdown": "[data-testid=t--table-dropdown]",
"dropdownOption": ".rc-select-item-option-content",
"selectSearchColumnDropdown": "[data-testid=t--searchColumn-dropdown]",
"generatePageFormSubmitBtn": "[data-testid=t--generate-page-form-submit]",
"selectRowinTable": "//div[text()='CRUD User2']/ancestor::div[contains(@class,'tr')]",
"currentStatusField": "//div[@type='FORM_WIDGET']//span[text()='Status']//ancestor::div[contains(@class,'t--widget-textwidget')]/following-sibling::div[contains(@class, 't--widget-inputwidgetv2')][1]//input",
"updateBtn": "span:contains('Update')",
"addRowIcon": "//span[@icon='add']/ancestor::div[1]",
"idField": ".t--jsonformfield-id",
"nameField": ".t--jsonformfield-name",
"statusField": ".t--jsonformfield-status",
"genderField": ".t--jsonformfield-gender",
"emailField": ".t--jsonformfield-email",
"submitBtn": "span:contains('Submit')",
"sortByDropdown": "span[name='dropdown']",
"ascending": "//div[text()='Ascending']",
"descending": "//div[text()='Descending']",
"currentNameField": "//div[@type='FORM_WIDGET']//span[text()='Name']//ancestor::div[contains(@class,'t--widget-textwidget')]/following-sibling::div[contains(@class, 't--widget-inputwidgetv2')][1]//input",
"deleteofSelectedRow": "//div[@class='tr selected-row']//span[text()='Delete']",
"confirmBtn": "span:contains('Confirm')",
"deleteMenuItem": "//div[text()='Delete']/parent::a[contains(@class, 'single-select')]",
"uploadFilesS3": "div.uppy-Dashboard-AddFiles input",
"uploadBtn": "button.uppy-StatusBar-actionBtn--upload",
"selectedRow": ".tr.selected-row",
"searchinTable": "//input[@placeholder='Search...']"
}