Skip to content
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

test:replace assertPageSave with AssertAutoSave #33972

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

NandanAnantharamu
Copy link
Collaborator

@NandanAnantharamu NandanAnantharamu commented Jun 4, 2024

This replaces assertPageSave with AssertAutoSave from Ts helper
EE PR: https://github.com/appsmithorg/appsmith-ee/pull/4345

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

Summary by CodeRabbit

  • Tests
    • Updated Cypress tests to use agHelper.AssertAutoSave() instead of cy.assertPageSave() for validating auto-save functionality. This change enhances the reliability of auto-save assertions across multiple test scripts.

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9370053807
Commit: ca15415
Cypress dashboard url: Click here!

Copy link
Contributor

coderabbitai bot commented Jun 4, 2024

Walkthrough

The primary change across the codebase involves replacing the cy.assertPageSave() function with agHelper.AssertAutoSave() in various Cypress test files and support commands. This update standardizes the assertion mechanism for automatic saving functionality, ensuring consistency and reliability in the test scripts.

Changes

File Path Change Summary
app/client/cypress/e2e/Regression/ClientSide/Binding/Input_NavigateTo_validation_spec.js Replaced cy.assertPageSave() with agHelper.AssertAutoSave()
app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widgets_NavigateTo_Validation_spec.js Replaced cy.assertPageSave() with agHelper.AssertAutoSave()
app/client/cypress/e2e/Regression/ClientSide/Binding/TableWidgets_NavigateTo_Validation_spec.js Replaced cy.assertPageSave() with agHelper.AssertAutoSave()
app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Drag_Drop_Building_Blocks_spec.ts Replaced cy.assertPageSave() with agHelper.AssertAutoSave()
app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Basic_spec.js Replaced cy.assertPageSave() with agHelper.AssertAutoSave(); added agHelper and deployMode
app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_spec.js Replaced cy.assertPageSave() with _.agHelper.AssertAutoSave()
app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_spec.js Added agHelper import; replaced cy.assertPageSave() with agHelper.AssertAutoSave()
app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicChildWidgetInteraction_spec.js Replaced cy.assertPageSave() with _.agHelper.AssertAutoSave()
app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_spec.js Replaced cy.assertPageSave() with agHelper.AssertAutoSave()
app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_spec.js Replaced cy.assertPageSave() with agHelper.AssertAutoSave()
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Color_spec.js Replaced cy.assertPageSave() with _.agHelper.AssertAutoSave()
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Color_spec.js Replaced cy.assertPageSave() with _.agHelper.AssertAutoSave()
app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_ContextMenu_spec.js Added agHelper import; replaced cy.assertPageSave() with agHelper.AssertAutoSave()
app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad_cyclic_dependency_errors_spec.js Replaced cy.assertPageSave() with agHelper.AssertAutoSave()
app/client/cypress/support/ApiCommands.js Replaced cy.assertPageSave() with agHelper.AssertAutoSave() in enterDatasource command
app/client/cypress/support/commands.js Replaced cy.assertPageSave() with agHelper.AssertAutoSave() in dragAndDropToCanvas command
app/client/cypress/support/gitSync.js Replaced cy.assertPageSave() with agHelper.AssertAutoSave()
app/client/cypress/support/widgetCommands.js Replaced cy.assertPageSave() with agHelper.AssertAutoSave() across multiple functions

Poem

In the land of code, where tests do thrive,
A change was made to keep them alive.
agHelper now takes the stage,
Ensuring auto-saves on every page.
With each script, a smoother flow,
Our tests now shine, with a brighter glow.
🌟🐰✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added skip-changelog Adding this label to a PR prevents it from being listed in the changelog Test labels Jun 4, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Outside diff range and nitpick comments (13)
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Color_spec.js (1)

Line range hint 7-100: Convert function expressions to arrow functions to improve readability and reduce unnecessary complexity.

- function () {
+ () => {
app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad_cyclic_dependency_errors_spec.js (1)

Line range hint 34-175: Convert function expressions to arrow functions to improve readability and reduce unnecessary complexity.

- function () {
+ () => {
app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_spec.js (1)

Line range hint 11-179: Convert function expressions to arrow functions to improve readability and reduce unnecessary complexity.

- function () {
+ () => {
app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_spec.js (1)

Line range hint 16-233: Convert function expressions to arrow functions to improve readability and reduce unnecessary complexity.

- function () {
+ () => {
app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_spec.js (2)

Line range hint 40-65: Replace forEach with for...of to improve performance and readability.

- array.forEach((item) => {
-   // logic here
- });
+ for (const item of array) {
+   // logic here
+ }

Also applies to: 72-105, 111-148, 154-191, 197-226, 231-260, 268-297, 302-331, 338-347


Line range hint 420-444: Convert function expressions to arrow functions for consistency and to avoid issues with this binding.

- function enterAndTest(text, expected) {
+ const enterAndTest = (text, expected) => {
    // function body remains the same
- }
+ };
app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Basic_spec.js (3)

Line range hint 31-60: Convert function expressions to arrow functions for cleaner and more modern JavaScript syntax.

- let themesSection = function(sectionName, themeName) {
+ let themesSection = (sectionName, themeName) => {

Line range hint 62-168: Consider using arrow functions for consistency and to reduce function complexity.

- it("2. Checks if theme can be edited", function () {
+ it("2. Checks if theme can be edited", () => {

Line range hint 18-780: Refactor all applicable function expressions to arrow functions to align with modern JavaScript practices.

- describe("App Theming funtionality", { tags: ["@tag.Theme"] }, function () {
+ describe("App Theming funtionality", { tags: ["@tag.Theme"] }, () => {
app/client/cypress/support/commands.js (4)

Line range hint 113-113: Consider simplifying the computed expressions by using literal keys as suggested by the static analysis tool.

Also applies to: 116-116, 770-770, 788-788, 794-794


Line range hint 145-149: Refactor to use optional chaining to simplify the code and improve readability.


Line range hint 146-149: Consider replacing forEach with for...of for better performance and readability, especially if dealing with large arrays.

Also applies to: 1384-1393


Line range hint 1101-1129: Refactor this function expression to an arrow function for better readability and to avoid issues related to the this context.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 05690f8 and 1890789.

Files selected for processing (18)
  • app/client/cypress/e2e/Regression/ClientSide/Binding/Input_NavigateTo_validation_spec.js (1 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widgets_NavigateTo_Validation_spec.js (1 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/Binding/TableWidgets_NavigateTo_Validation_spec.js (1 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Drag_Drop_Building_Blocks_spec.ts (1 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Basic_spec.js (3 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_spec.js (1 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_spec.js (2 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicChildWidgetInteraction_spec.js (1 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_spec.js (2 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_spec.js (1 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Color_spec.js (2 hunks)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Color_spec.js (1 hunks)
  • app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_ContextMenu_spec.js (2 hunks)
  • app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad_cyclic_dependency_errors_spec.js (2 hunks)
  • app/client/cypress/support/ApiCommands.js (1 hunks)
  • app/client/cypress/support/commands.js (1 hunks)
  • app/client/cypress/support/gitSync.js (1 hunks)
  • app/client/cypress/support/widgetCommands.js (7 hunks)
Additional context used
Biome
app/client/cypress/e2e/Regression/ServerSide/ApiTests/API_ContextMenu_spec.js

[error] 20-45: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 19-46: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

app/client/cypress/e2e/Regression/ClientSide/Binding/TableWidgets_NavigateTo_Validation_spec.js

[error] 33-61: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 20-62: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widgets_NavigateTo_Validation_spec.js

[error] 34-59: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 61-67: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 21-68: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV1/Table_Color_spec.js

[error] 12-70: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 7-71: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_spec.js

[error] 67-73: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.


[error] 85-94: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.


[error] 16-97: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

app/client/cypress/e2e/Regression/ClientSide/Binding/Input_NavigateTo_validation_spec.js

[error] 36-43: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 45-55: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 57-79: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 23-80: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Color_spec.js

[error] 16-18: Disallow duplicate setup and teardown hooks. (lint/suspicious/noDuplicateTestHooks)

Disallow beforeEach duplicacy inside the describe function.


[error] 20-79: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 81-99: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 7-100: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad_cyclic_dependency_errors_spec.js

[error] 34-175: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_spec.js

[error] 15-53: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 64-70: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 72-78: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 80-90: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 92-102: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 128-145: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 147-162: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 164-178: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 11-179: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_spec.js

[error] 67-79: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 108-135: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 137-165: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 167-180: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 182-197: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 202-207: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 213-215: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 218-232: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 16-233: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Drag_Drop_Building_Blocks_spec.ts

[error] 215-215: Unexpected any. Specify a different type. (lint/suspicious/noExplicitAny)

any disables many type checking rules. Its use should be avoided.

app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_spec.js

[error] 40-65: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.


[error] 72-105: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.


[error] 111-148: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.


[error] 154-191: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.


[error] 197-226: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.


[error] 231-260: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.


[error] 268-297: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.


[error] 302-331: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.


[error] 338-347: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.


[error] 420-444: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Basic_spec.js

[error] 31-60: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 62-168: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 18-780: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.

app/client/cypress/support/commands.js

[error] 113-113: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)

Unsafe fix: Use a literal key instead.


[error] 116-116: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)

Unsafe fix: Use a literal key instead.


[error] 145-149: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 146-149: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.


[error] 770-770: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)

Unsafe fix: Use a literal key instead.


[error] 788-788: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)

Unsafe fix: Use a literal key instead.


[error] 794-794: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)

Unsafe fix: Use a literal key instead.


[error] 1101-1129: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 1384-1393: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.

Additional comments not posted (23)
app/client/cypress/e2e/Regression/ClientSide/Binding/TableV2Widgets_NavigateTo_Validation_spec.js (1)

58-58: Replace function expression with an arrow function for consistency and potential performance benefits.

- function () {
+ () => {

Likely invalid or redundant comment.

app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2_Color_spec.js (1)

46-46: Replace cy.assertPageSave() with _.agHelper.AssertAutoSave() to standardize auto-save assertions.

app/client/cypress/e2e/Regression/ServerSide/OnLoadTests/JSOnLoad_cyclic_dependency_errors_spec.js (1)

61-61: Standardize auto-save assertions by replacing cy.assertPageSave() with agHelper.AssertAutoSave().

Also applies to: 88-88

app/client/cypress/e2e/Regression/ClientSide/Widgets/Tab/Tab_spec.js (1)

51-51: Standardize auto-save assertions by replacing cy.assertPageSave() with agHelper.AssertAutoSave().

app/client/cypress/support/ApiCommands.js (1)

33-33: Standardize auto-save assertions by replacing cy.assertPageSave() with agHelper.AssertAutoSave().

app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicChildWidgetInteraction_spec.js (1)

67-67: Standardize auto-save assertions by replacing cy.assertPageSave() with _.agHelper.AssertAutoSave().

app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_spec.js (1)

92-92: Standardize auto-save assertions by replacing cy.assertPageSave() with _.agHelper.AssertAutoSave().

app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Drag_Drop_Building_Blocks_spec.ts (1)

241-241: The replacement of cy.assertPageSave() with agHelper.AssertAutoSave() aligns with the PR's objectives and improves the consistency of auto-save assertions across tests.

app/client/cypress/support/gitSync.js (1)

23-23: The replacement of cy.assertPageSave() with agHelper.AssertAutoSave() aligns with the PR's objectives and improves the consistency of auto-save assertions across tests.

app/client/cypress/e2e/Regression/ClientSide/Widgets/Input/Inputv2_spec.js (1)

369-369: The replacement of cy.assertPageSave() with agHelper.AssertAutoSave() aligns with the PR's objectives and improves the consistency of auto-save assertions across tests.

app/client/cypress/e2e/Regression/ClientSide/ThemingTests/Basic_spec.js (4)

35-35: Replace cy.assertPageSave() with agHelper.AssertAutoSave() to standardize auto-save assertions.


38-38: Ensure consistent use of agHelper.AssertAutoSave() across all relevant test cases.


84-84: Good use of agHelper.AssertAutoSave() after UI interactions that may trigger auto-save.


659-659: Proper placement of agHelper.AssertAutoSave() to verify changes are saved before deployment.

app/client/cypress/support/commands.js (1)

488-488: The replacement of cy.assertPageSave() with agHelper.AssertAutoSave() is correctly implemented here.

app/client/cypress/support/widgetCommands.js (8)

144-144: Ensure consistent use of agHelper.AssertAutoSave() across all tests.


165-165: Ensure consistent use of agHelper.AssertAutoSave() across all tests.


189-189: Ensure consistent use of agHelper.AssertAutoSave() across all tests.


196-196: Ensure consistent use of agHelper.AssertAutoSave() across all tests.


205-205: Ensure consistent use of agHelper.AssertAutoSave() across all tests.


231-231: Ensure consistent use of agHelper.AssertAutoSave() across all tests.


843-843: Ensure consistent use of agHelper.AssertAutoSave() across all tests.


919-919: Ensure consistent use of agHelper.AssertAutoSave() across all tests.

@@ -238,7 +238,7 @@ describe(
});
});
cy.wait("@blockImport").then(() => {
cy.assertPageSave();
agHelper.AssertAutoSave();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace any with a more specific type to enhance type safety.

- const option = {
-   eventConstructor: "MouseEvent",
-   scrollBehavior: false,
- } as any;
+ const option: MouseEventInit = {
+   eventConstructor: "MouseEvent",
+   scrollBehavior: false,
+ };

Committable suggestion was skipped due to low confidence.

@@ -20,7 +21,7 @@ describe(
cy.Createpage("SecondPage");
cy.CreateAPI("FirstAPI");
cy.enterDatasourceAndPath(testdata.baseUrl, "{{ '/random' }}");
cy.assertPageSave();
agHelper.AssertAutoSave();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace function expression with an arrow function for consistency and potential performance benefits.

- function () {
+ () => {

Committable suggestion was skipped due to low confidence.

@@ -51,7 +51,7 @@ describe(
cy.get(commonlocators.singleSelectMenuItem)
.contains(pageid)
.click({ force: true });
cy.assertPageSave();
agHelper.AssertAutoSave();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace function expression with an arrow function for consistency and potential performance benefits.

- function () {
+ () => {

Committable suggestion was skipped due to low confidence.

@@ -35,7 +35,7 @@ describe(
// select the green color

cy.wait("@updateLayout");
cy.assertPageSave();
_.agHelper.AssertAutoSave();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace function expression with an arrow function for consistency and potential performance benefits.

- function () {
+ () => {

Also applies to: 59-59

Committable suggestion was skipped due to low confidence.

@@ -68,7 +68,7 @@ describe(
entityExplorer.DragDropWidgetNVerify(widget);
//cy.dragAndDropToWidget(widget, "listwidgetv2", { x: 350, y: 50 });
agHelper.GetNClick(propPane._deleteWidget);
cy.assertPageSave();
agHelper.AssertAutoSave();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace function expression with an arrow function for consistency and potential performance benefits.

- function () {
+ () => {

Also applies to: 89-92

Committable suggestion was skipped due to low confidence.

@@ -51,7 +51,7 @@ describe(
cy.get(commonlocators.singleSelectMenuItem)
.contains(pageid)
.click({ force: true });
cy.assertPageSave();
agHelper.AssertAutoSave();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace function expression with an arrow function for consistency and potential performance benefits.

- function () {
+ () => {

Committable suggestion was skipped due to low confidence.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1890789 and ca15415.

Files selected for processing (1)
  • app/client/cypress/support/commands.js (2 hunks)
Additional context used
Biome
app/client/cypress/support/commands.js

[error] 113-113: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)

Unsafe fix: Use a literal key instead.


[error] 116-116: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)

Unsafe fix: Use a literal key instead.


[error] 145-149: Change to an optional chain. (lint/complexity/useOptionalChain)

Unsafe fix: Change to an optional chain.


[error] 146-149: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.


[error] 770-770: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)

Unsafe fix: Use a literal key instead.


[error] 788-788: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)

Unsafe fix: Use a literal key instead.


[error] 794-794: The computed expression can be simplified without the use of a string literal. (lint/complexity/useLiteralKeys)

Unsafe fix: Use a literal key instead.


[error] 1091-1119: This function expression can be turned into an arrow function. (lint/complexity/useArrowFunction)

Function expressions that don't use this can be turned into arrow functions.
Safe fix: Use an arrow function instead.


[error] 1374-1383: Prefer for...of instead of forEach. (lint/complexity/noForEach)

forEach may lead to performance issues when working with large arrays. When combined with functions like filter or map, this causes multiple iterations over the same type.

Additional comments not posted (1)
app/client/cypress/support/commands.js (1)

488-488: Replace cy.assertPageSave() with agHelper.AssertAutoSave() to standardize auto-save assertions.

@NandanAnantharamu NandanAnantharamu added the ok-to-test Required label for CI label Jun 4, 2024
@NandanAnantharamu NandanAnantharamu merged commit 04ce4b8 into release Jun 6, 2024
88 checks passed
@NandanAnantharamu NandanAnantharamu deleted the test/replaceassertPageSave branch June 6, 2024 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog Test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants