Skip to content

test: flay table header validation#34080

Merged
trishaanand merged 4 commits intoreleasefrom
test/fixFlayTableHeaderValidation
Jun 7, 2024
Merged

test: flay table header validation#34080
trishaanand merged 4 commits intoreleasefrom
test/fixFlayTableHeaderValidation

Conversation

@NandanAnantharamu
Copy link
Contributor

@NandanAnantharamu NandanAnantharamu commented Jun 7, 2024

Xpath used to read the header text is flaky.

Solution:
Replacing xpath with css locator to make it stable

EE PR: https://github.com/appsmithorg/appsmith-ee/pull/4382

Summary by CodeRabbit

  • Tests

    • Updated spec names and file paths for tests related to Community Issues and TableV2 widget.
  • Refactor

    • Simplified the selector for table headers to improve readability and maintainability.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 7, 2024

Walkthrough

The recent changes focus on improving the Cypress test suite and updating the Table widget's selector. Specifically, the test paths have been revised to include new files for Community Issues and TableV2 widget testing. Additionally, the Table widget's header selector has been simplified from a complex XPath to a more straightforward CSS selector.

Changes

Files/Paths Change Summary
cypress/e2e/Regression/ClientSide/Templates/... Renamed and repurposed spec file for Community Issues testing.
cypress/e2e/Regression/ClientSide/Widgets/TableV2/... Renamed and repurposed spec file for TableV2 widget data change testing.
app/client/cypress/support/Pages/Table.ts Simplified the _tableHeader selector from an XPath expression to a CSS selector for efficiency.

Sequence Diagram(s) (Beta)

sequenceDiagram
    participant User
    participant Cypress
    participant App

    User->>Cypress: Run CommunityIssues_Spec.ts
    Cypress->>App: Execute tests for Community Issues
    App-->>Cypress: Return test results

    User->>Cypress: Run table_data_change_spec.ts
    Cypress->>App: Execute tests for TableV2 data change
    App-->>Cypress: Return test results

    User->>App: Interact with Table widget
    App->>App: Use CSS selector for _tableHeader
    App-->>User: Display updated table header
Loading

Poem

In the land of code, where changes bloom,
Cypress tests now find new rooms.
Community issues, tables too,
Simplified paths make tests anew.
With CSS selectors, swift and bright,
Our codebase dances in the light. 🌟


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 7, 2024
@NandanAnantharamu
Copy link
Contributor Author

/ci-test-limit

@github-actions
Copy link

github-actions bot commented Jun 7, 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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c096bb5 and 31684ff.

Files selected for processing (2)
  • app/client/cypress/limited-tests.txt (1 hunks)
  • app/client/cypress/support/Pages/Table.ts (2 hunks)
Files skipped from review due to trivial changes (1)
  • app/client/cypress/support/Pages/Table.ts
Additional context used
LanguageTool
app/client/cypress/limited-tests.txt

[uncategorized] ~1-~1: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ... limited tests - give the spec names in below format: cypress/e2e/Regression/Apps/Com...


[uncategorized] ~9-~9: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ...ile to run minimum of specs. Do not run entire suite with this command.

Additional comments not posted (1)
app/client/cypress/limited-tests.txt (1)

2-4: Updated test paths reflect the new structure and focus areas in the test suite.

@github-actions
Copy link

github-actions bot commented Jun 7, 2024

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

@trishaanand trishaanand merged commit bf34395 into release Jun 7, 2024
@trishaanand trishaanand deleted the test/fixFlayTableHeaderValidation branch June 7, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants