-
Notifications
You must be signed in to change notification settings - Fork 4.5k
test: verifying replication of JS Object settings during copy action #38430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
...ient/cypress/e2e/Regression/ClientSide/JSObject/Copied_JSObject_Settings_Bug31475_spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| import HomePage from "../../../../locators/HomePage"; | ||
| import { jsEditor, agHelper } from "../../../../support/Objects/ObjectsCore"; | ||
| import EditorNavigation, { | ||
| PageLeftPane, | ||
| PagePaneSegment, | ||
| } from "../../../../support/Pages/EditorNavigation"; | ||
| import PageList from "../../../../support/Pages/PageList"; | ||
|
|
||
| describe( | ||
| " To test [Bug]: Function settings of a JS Object are not obeyed when copied/moved to another page #31475", | ||
| { tags: ["@tag.JS"] }, | ||
| () => { | ||
| // Bug: https://github.com/appsmithorg/appsmith/issues/31475 | ||
| it.skip("Verify if settings are replicated in a copied JS Object", () => { | ||
| jsEditor.CreateJSObject("", { prettify: false, toRun: false }); | ||
|
|
||
| // Step 2: Add a new blank page | ||
| PageList.AddNewPage("New blank page"); | ||
|
|
||
| // Step 3: Navigate back to the source page | ||
| EditorNavigation.NavigateToPage("Page1", true); | ||
|
|
||
| // Step 4: Switch to the JS Objects segment in the left pane | ||
| PageLeftPane.switchSegment(PagePaneSegment.JS); | ||
|
|
||
| // Step 5: Enable "Run on page load" for a specific function | ||
| jsEditor.EnableDisableAsyncFuncSettings("myFun1"); | ||
|
|
||
| // Step 6: Copy the JS Object to the target page | ||
| agHelper.GetNClick(jsEditor._moreActions, 0, true); | ||
| agHelper.HoverElement( | ||
| `${HomePage.portalMenuItem}:contains("Copy to page")`, | ||
| ); | ||
| agHelper.GetNClick(`${HomePage.portalMenuItem}:contains("Page2")`); | ||
|
|
||
| // Step 7: Refresh the page to ensure the JS Object is updated | ||
| agHelper.RefreshPage(); | ||
|
|
||
| // Step 8: Verify that the "Run on page load" setting is still enabled for the function | ||
| jsEditor.VerifyAsyncFuncSettings("myFun1", true); | ||
| }); | ||
| }, | ||
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Path in limited-tests.txt needs correction
The test file exists but at a different path:
app/client/cypress/e2e/Regression/ClientSide/JSObject/Copied_JSObject_Settings_Bug31475_spec.tsPlease update the path in
limited-tests.txtto include the full path from the repository root.🔗 Analysis chain
LGTM! Verify the test file implementation.
The test path aligns with the PR objectives for testing JS Object settings during copy action.
Let's verify the test file exists and follows Cypress best practices:
Test file referenced in limited-tests.txt is missing
The test file
cypress/e2e/Regression/ClientSide/JSObject/Copied_JSObject_Settings_Bug31475_spec.tsspecified inlimited-tests.txtdoes not exist in the codebase. Let's verify if it's located in a different directory:🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 1668
Script:
Length of output: 1007