PromucFlow_constructor/app/client/cypress/locators/apiWidgetslocator.json
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

61 lines
3.3 KiB
JSON

{
"resourceUrl": ".t--dataSourceField",
"searchInputPlaceholder": "//div[contains(@class, 't--dataSourceField')]//div//input",
"searchApi": ".t--sidebar input[type=text]",
"createapi": ".t--createBlankApiCard",
"createAuthApiDatasource": ".t--createAuthApiDatasource",
"popover": "//button[contains(@class, 'entity-context-menu')]",
"moveTo": ".single-select >div:contains('Move to')",
"copyTo": ".single-select >div:contains('Copy to page')",
"home": ".single-select >div:contains('Page1')",
"delete": ".t--entity-context-menu > div.ads-v2-menu__menu-item.error-menuitem",
"deleteConfirm": ".single-select >div:contains('Are you sure?')",
"path": ".t--path >div textarea",
"autoSuggest": "//div[contains(@id,'react-select')]",
"headerKey": ".t--actionConfiguration\\.headers\\[0\\]\\.key\\.0",
"headerValue": ".t--actionConfiguration\\.headers\\[0\\]\\.value\\.0",
"autoGeneratedHeaderKey": ".t--autoGeneratedHeader-key-0",
"autoGeneratedHeaderValue": ".t--autoGeneratedHeader-value-0",
"queryKey": ".t--actionConfiguration\\.queryParameters\\[0\\]\\.key\\.0",
"queryValue": ".t--actionConfiguration\\.queryParameters\\[0\\]\\.value\\.0",
"formEncoded": ".t--actionConfiguration\\.bodyFormData\\[0\\]\\.key\\.0",
"responseText": ".CodeMirror-line > [role='presentation']",
"createApiOnSideBar": "button:contains('Create new API')",
"saveButton": "button:contains('Save')",
"addHeader": ".t--addApiHeader svg",
"apidocumentaionLink": ".t--apiDocumentationLink",
"postbody": "(//div[contains(@class,'CodeMirror-wrap')]//textarea)[2]",
"paginationTab": "//span[text()='Pagination']",
"apiInputTab": "li:contains('API Input')",
"paginationOption": ".t--apiFormPaginationType div>input",
"paginationWithTable": ".t--apiFormPaginationType label:contains('Paginate with Table Page No') input",
"paginationWithUrl": ".t--apiFormPaginationType label:contains('Paginate with response URL') input",
"panigationNextUrl": ".t--apiFormPaginationNext div>textarea",
"panigationPrevUrl": ".t--apiFormPaginationPrev div>textarea",
"TestNextUrl": ".t--apiFormPaginationNextTest",
"TestPreUrl": ".t--apiFormPaginationPrevTest",
"EditApiName": "img[alt='Edit pen']",
"Request": "//li//span[text()='Request']",
"RequestURL": "(//span[@class='bp3-tree-node-label']/span)[1]",
"RequestMethod": "(//span[@class='bp3-tree-node-label']/span)[2]",
"content-Type": "(//span[@class='bp3-tree-node-label']/span)[3]",
"requestBody": "(//div[contains(@class,'bp3-collapse-body')]//textarea)[1]",
"showrequest": "span:contains('Show Request')",
"Responsetab": "//li//span[text()='Response Body']",
"deleteAPI": ".t--apiFormDeleteBtn",
"editName": ".single-select >div:contains('Rename')",
"page": ".single-select >div",
"propertyList": ".binding",
"actionlist": ".action div div",
"settings": "span:contains('Settings')",
"headers": "span:contains('Headers')",
"onPageLoad": "[name=executeOnLoad]",
"renameEntity": "div[role='menuitem']:contains('Rename')",
"paramsTab": "//span[text()='Params']",
"paramKey": ".t--actionConfiguration\\.queryParameters\\[0\\]\\.key\\.0",
"paramValue": ".t--actionConfiguration\\.queryParameters\\[0\\]\\.value\\.0",
"multipartTypeDropdown": "button:contains('Type')",
"confirmBeforeExecute": "[name=confirmBeforeExecute]",
"runQueryButton": "[data-testid=\"t--run-action\"]"
}