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: analyse TBP failure EnableGoogleSheet #37335

Closed
wants to merge 1 commit into from
Closed
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
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/Google/EnableGoogle_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

Cypress test spec needs improvements to follow best practices

The test spec contains multiple instances of hard-coded waits (cy.wait) which is against Cypress best practices. These should be replaced with proper assertions or cy.waitUntil with specific conditions.

  • Replace cy.wait(2000) on lines with proper assertions or waitUntil conditions
  • Consider using agHelper.WaitUntilToastDisappear() or agHelper.WaitUntilEleAppear() instead of arbitrary waits
  • Review usage of cy.waitUntil(() => cy.get(homePage.profileMenu)) to ensure it's the most appropriate approach
🔗 Analysis chain

Verify the EnableGoogle test spec existence and implementation.

The change aligns with the PR objective to analyze TBP failure related to EnableGoogleSheet functionality.

Let's verify the test spec existence and its implementation:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of EnableGoogle_spec.js and check its implementation
# for compliance with Cypress best practices

# Check if the spec file exists
if ! fd "EnableGoogle_spec.js" app/client/cypress/; then
    echo "ERROR: Test spec not found"
    exit 1
fi

# Check for prohibited practices in the spec file
echo "Checking for prohibited practices..."
rg -i "cy\.wait|cy\.pause|agHelper\.sleep|it\.only|after\(|afterEach\(" \
    app/client/cypress/e2e/Regression/ClientSide/Google/EnableGoogle_spec.js || true

# Check for proper selector usage
echo "Checking selector patterns..."
rg -i "\.btn\.|button\[|xpath\=|\.submit" \
    app/client/cypress/e2e/Regression/ClientSide/Google/EnableGoogle_spec.js || true

Length of output: 1033

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

Expand Down
Loading