test: Update common methods and locators (#32226)

## Description
This PR updates common method and locator which is being used in EE PR
here: https://github.com/appsmithorg/appsmith-ee/pull/3247

Fixes #`Issue Number`  
_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=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

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

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


- **Refactor**
- Improved visibility of certain methods and properties in the
`DataSources` and `JSEditor` classes for testing purposes.
- Updated a selector in the `JSEditor` to accurately target "New JS
Object."

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Parthvi 2024-03-29 12:04:40 +05:30 committed by GitHub
parent 7dac89098c
commit 714d8e3539
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View File

@ -929,7 +929,7 @@ export class DataSources {
}
}
private AssertRunButtonVisibility() {
public AssertRunButtonVisibility() {
this.agHelper.AssertElementVisibility(
this.locator._buttonByText("Run"),
true,

View File

@ -75,8 +75,8 @@ export class JSEditor {
`//div[contains(@class, '${functionName}-confirm-before-execute')]//label/input`;
private _outputConsole = ".CodeEditorTarget";
private _jsObjName = ".t--js-action-name-edit-field span";
private _jsObjTxt = ".t--js-action-name-edit-field input";
private _newJSobj = "span:contains('New JS object')";
public _jsObjTxt = ".t--js-action-name-edit-field input";
public _newJSobj = "span:contains('New JS Object')";
private _bindingsClose = ".t--entity-property-close";
public _propertyList = ".binding";
private _responseTabAction = (funName: string) =>

View File

@ -64,5 +64,6 @@ module.exports = {
"@tag.MainContainer",
"@tag.Visual",
"@tag.Module",
"@tag.Workflows",
],
};