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

fix: Checking fix working for js indent failure #38382

Merged
merged 2 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import EditorNavigation, {
} from "../../../../support/Pages/EditorNavigation";
import PageList from "../../../../support/Pages/PageList";

//test comment
describe(
"JSEditor Indendation - Visual tests",
{ tags: ["@tag.Visual"] },
Expand Down
2 changes: 1 addition & 1 deletion app/client/cypress/limited-tests.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# To run only limited tests - give the spec names in below format:
cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js
cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Consider optimizing test performance by replacing Sleep calls

The test file exists and is properly structured, but it contains multiple agHelper.Sleep() calls which can make tests slower and flakier. Consider replacing these with Cypress's built-in automatic retry-ability and waiting mechanisms.

  • Replace agHelper.Sleep() calls in app/client/cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js with more reliable alternatives:
    • For UI changes, use cy.should('be.visible') or other assertions
    • For network requests, use cy.wait('@aliasName')
    • For DOM changes, use cy.should() with appropriate assertions
🔗 Analysis chain

Verify the new test specification file.

Let's ensure the new test file exists and is appropriate for limited testing.


Let me verify the content of the test file since the path seems to be different from what we initially tried.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and content of the new test file

# Check if the new test file exists
fd "JSEditorIndent_spec.js" --type f

# Check the content of the test file for potential it.only or similar limiting patterns
rg -A 2 "it\.only|describe\.only|context\.only" "cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js" || echo "No .only found (good)"

# Check for sleep/wait usage which should be avoided
rg "cy\.wait|cy\.pause|agHelper\.sleep|\.Sleep" "cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js" || echo "No problematic wait/sleep patterns found (good)"

Length of output: 730


Script:

#!/bin/bash
# Check the content of the test file at the correct path
rg -A 2 "it\.only|describe\.only|context\.only" "app/client/cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js" || echo "No .only found (good)"

# Check for sleep/wait usage which should be avoided
rg "cy\.wait|cy\.pause|agHelper\.sleep|\.Sleep" "app/client/cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js" || echo "No problematic wait/sleep patterns found (good)"

# Get a glimpse of the test content
head -n 20 "app/client/cypress/e2e/Regression/ClientSide/VisualTests/JSEditorIndent_spec.js"

Length of output: 1392

# For running all specs - uncomment below:
#cypress/e2e/**/**/*

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading