-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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: removing unused commands from Commands file #33617
Conversation
WalkthroughWalkthroughThe recent update involves moving a test spec file from Changes
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Additional comments not posted (1)
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 (
|
/ci-test-limit |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/9177629151. |
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: 2
Outside diff range and nitpick comments (1)
app/client/cypress/limited-tests.txt (1)
Line range hint
7-7
: Consider adding the article "the" before "entire suite" for grammatical correctness.-#ci-test-limit uses this file to run minimum of specs. Do not run entire suite with this command. +#ci-test-limit uses this file to run minimum of specs. Do not run the entire suite with this command.
app/client/cypress/limited-tests.txt
Outdated
@@ -1,5 +1,5 @@ | |||
# To run only limited tests - give the spec names in below format: |
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.
Consider adding the article "the" before "below format" for grammatical correctness.
-# To run only limited tests - give the spec names in below format:
+# To run only limited tests - give the spec names in the below format:
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
# To run only limited tests - give the spec names in below format: | |
# To run only limited tests - give the spec names in the below format: |
Cypress.Commands.add( | ||
"paste", | ||
{ | ||
prevSubject: true, | ||
element: true, | ||
}, | ||
($element, text) => { | ||
const subString = text.slice(0, -1); | ||
const lastChar = text.slice(-1); | ||
|
||
cy.get(commonlocators.entityExplorersearch) | ||
.clear({ force: true }) | ||
.click({ force: true }) | ||
.then(() => { | ||
$element.text(subString); | ||
$element.val(subString); | ||
cy.get($element).type(lastChar); | ||
}); | ||
}, | ||
); |
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.
The implementation of the paste
command looks correct. Consider adding a comment explaining why the last character is typed separately, as this might not be immediately obvious to other developers.
+ // The last character is typed separately to trigger specific UI behaviors that might depend on keypress events.
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
Cypress.Commands.add( | |
"paste", | |
{ | |
prevSubject: true, | |
element: true, | |
}, | |
($element, text) => { | |
const subString = text.slice(0, -1); | |
const lastChar = text.slice(-1); | |
cy.get(commonlocators.entityExplorersearch) | |
.clear({ force: true }) | |
.click({ force: true }) | |
.then(() => { | |
$element.text(subString); | |
$element.val(subString); | |
cy.get($element).type(lastChar); | |
}); | |
}, | |
); | |
Cypress.Commands.add( | |
"paste", | |
{ | |
prevSubject: true, | |
element: true, | |
}, | |
($element, text) => { | |
const subString = text.slice(0, -1); | |
const lastChar = text.slice(-1); | |
// The last character is typed separately to trigger specific UI behaviors that might depend on keypress events. | |
cy.get(commonlocators.entityExplorersearch) | |
.clear({ force: true }) | |
.click({ force: true }) | |
.then(() => { | |
$element.text(subString); | |
$element.val(subString); | |
cy.get($element).type(lastChar); | |
}); | |
}, | |
); |
/ci-test-limit runId=9177629151 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/9178258212. |
/ci-test-limit runId=9177629151 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/9178713562. |
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9178713562. |
@@ -2110,3 +1459,21 @@ Cypress.Commands.add( | |||
cy.get(tooltipSelector).should("be.visible").and("contain", expectedText); | |||
}, | |||
); | |||
|
|||
Cypress.Commands.add( |
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.
Why did we spend time re-writing paste command?
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.
i had mistakenly removed this commad i added it back, its not rewritten. I wasnt able to figure out as it was a chained command
RCA: There are many unused commands within commands.js file
Solution:
Checked the commands in both CE and EE repository and we are removing those commands whcih are not used in any tests as part of cleanup activity
/ok-to-test tags="@tag.All"
Warning
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9177375213
Commit: 925d758
Cypress dashboard url: Click here!
It seems like no tests ran 😔. We are not able to recognize it, please check workflow here.