-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Conversation
WalkthroughThe primary change across the codebase involves replacing the Changes
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
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.
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
: ReplaceforEach
withfor...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 withthis
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 replacingforEach
withfor...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 thethis
context.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
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
: Replacecy.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 replacingcy.assertPageSave()
withagHelper.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 replacingcy.assertPageSave()
withagHelper.AssertAutoSave()
.app/client/cypress/support/ApiCommands.js (1)
33-33
: Standardize auto-save assertions by replacingcy.assertPageSave()
withagHelper.AssertAutoSave()
.app/client/cypress/e2e/Regression/ClientSide/Widgets/ListV2/Listv2_BasicChildWidgetInteraction_spec.js (1)
67-67
: Standardize auto-save assertions by replacingcy.assertPageSave()
with_.agHelper.AssertAutoSave()
.app/client/cypress/e2e/Regression/ClientSide/Widgets/Button/Button_spec.js (1)
92-92
: Standardize auto-save assertions by replacingcy.assertPageSave()
with_.agHelper.AssertAutoSave()
.app/client/cypress/e2e/Regression/ClientSide/ExplorerTests/Drag_Drop_Building_Blocks_spec.ts (1)
241-241
: The replacement ofcy.assertPageSave()
withagHelper.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 ofcy.assertPageSave()
withagHelper.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 ofcy.assertPageSave()
withagHelper.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
: Replacecy.assertPageSave()
withagHelper.AssertAutoSave()
to standardize auto-save assertions.
38-38
: Ensure consistent use ofagHelper.AssertAutoSave()
across all relevant test cases.
84-84
: Good use ofagHelper.AssertAutoSave()
after UI interactions that may trigger auto-save.
659-659
: Proper placement ofagHelper.AssertAutoSave()
to verify changes are saved before deployment.app/client/cypress/support/commands.js (1)
488-488
: The replacement ofcy.assertPageSave()
withagHelper.AssertAutoSave()
is correctly implemented here.app/client/cypress/support/widgetCommands.js (8)
144-144
: Ensure consistent use ofagHelper.AssertAutoSave()
across all tests.
165-165
: Ensure consistent use ofagHelper.AssertAutoSave()
across all tests.
189-189
: Ensure consistent use ofagHelper.AssertAutoSave()
across all tests.
196-196
: Ensure consistent use ofagHelper.AssertAutoSave()
across all tests.
205-205
: Ensure consistent use ofagHelper.AssertAutoSave()
across all tests.
231-231
: Ensure consistent use ofagHelper.AssertAutoSave()
across all tests.
843-843
: Ensure consistent use ofagHelper.AssertAutoSave()
across all tests.
919-919
: Ensure consistent use ofagHelper.AssertAutoSave()
across all tests.
@@ -238,7 +238,7 @@ describe( | |||
}); | |||
}); | |||
cy.wait("@blockImport").then(() => { | |||
cy.assertPageSave(); | |||
agHelper.AssertAutoSave(); |
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.
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(); |
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.
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(); |
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.
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(); |
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.
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(); |
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.
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(); |
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.
Replace function expression with an arrow function for consistency and potential performance benefits.
- function () {
+ () => {
Committable suggestion was skipped due to low confidence.
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
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
: Replacecy.assertPageSave()
withagHelper.AssertAutoSave()
to standardize auto-save assertions.
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
agHelper.AssertAutoSave()
instead ofcy.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!