PromucFlow_constructor/app/client/cypress/locators/ApiEditor.js
Alex e754e48e1f
feat: unified response view component (#37897)
## Description
Common component for response tab view.

Fixes #37759 


## 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/12242471397>
> Commit: 5263092079ad514d6c949b48d8510536ebeeadac
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12242471397&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Mon, 09 Dec 2024 21:00:53 UTC
<!-- 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

- **New Features**
- Introduced a new `Response` component to handle and display action
responses in the plugin action editor.
- Streamlined response handling by consolidating components and updating
props for better performance and user experience.

- **Bug Fixes**
- Enhanced error handling and response display logic to improve clarity
and user interaction.

- **Documentation**
- Updated import paths and component references to reflect the new
structure and naming conventions.

- **Tests**
- Modified Cypress tests to utilize the new
`runQueryAndVerifyResponseViews` method for improved readability and
maintainability.
- Updated tests to replace direct interactions with UI elements by using
methods from the `BottomTabs` module for selecting response types.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2024-12-10 10:06:57 +03:00

35 lines
1.4 KiB
JavaScript

export default {
curlImportBtn: ".t--importBtn",
createBlankApiCard: ".t--createBlankApiCard",
eachProviderCard: ".t--eachProviderCard",
nameOfApi: ".t--nameOfApi",
addToPageBtn: ".t--addToPageBtn",
ApiActionMenu: "[data-testid=\"t--more-action-trigger\"]",
ApiDeleteBtn: ".t--apiFormDeleteBtn",
ApiRunBtn: "[data-testid=\"t--run-action\"]",
addToPageBtnsId: ".t--addToPageButtons",
ApiHomePage: ".t--apiHomePage",
formActionButtons: ".t--formActionButtons",
dataSourceField: ".t--dataSourceField",
responseBody: ".CodeMirror-code span.cm-string.cm-property",
ApiVerb: ".t--apiFormHttpMethod div",
apiPaginationNextText: ".t--apiFormPaginationNext",
apiPaginationPrevText: ".t--apiFormPaginationPrev",
apiPaginationPrevTest: ".t--apiFormPaginationPrevTest",
apiPaginationNextTest: ".t--apiFormPaginationNextTest",
apiPaginationTab:
".t--apiFormPaginationType label:contains('Paginate with response URL') input",
apiTab: ".react-tabs__tab-list li",
bodyType: ".t--apiFormPostBodyType",
bodyTypeSelected: "[data-testid=\"t--api-body-tab-switch\"] .rc-select-selection-item",
bodyTab: "Body",
headersTab: "Header",
httpDropDownOptions: ".rc-select-item",
codeEditorWrapper: ".t--code-editor-wrapper",
apiSearchHint: ".datasource-hint",
slashCommandButton: ".commands-button",
apiResponseObject: ".object-key",
apiDebuggerLink: ".debugger-entity-link",
apiResponseTabsList : ".ads-v2-tabs__list"
};