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

chore: Map Chart Spec #36343

Closed
wants to merge 8 commits into from
Closed

chore: Map Chart Spec #36343

wants to merge 8 commits into from

Conversation

jsartisan
Copy link
Contributor

@jsartisan jsartisan commented Sep 16, 2024

Summary by CodeRabbit

  • New Features

    • Enhanced accuracy in Map Chart Widget tests with updated element selection methods.
    • Included new test case for immediate validation of title changes in the Map Chart settings.
    • Updated data point interactions in tests to reflect current data context.
    • Added mapChartWidget locator for improved test functionality.
  • Bug Fixes

    • Streamlined visibility tests for the Map Chart Widget, removing unnecessary assertions.
  • Chores

    • Updated the limited tests configuration to include the new Map Chart tests while excluding the Fork Template test.

Warning

Tests have not run on the HEAD 0a1afd3 yet


Tue, 17 Sep 2024 07:24:36 UTC

@jsartisan
Copy link
Contributor Author

/build-deploy-preview skip-tests=true

@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Sep 16, 2024
Copy link

Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/10882087903.
Workflow: On demand build Docker image and deploy preview.
skip-tests: true.
env: ``.
PR: 36343.
recreate: .

Copy link

Deploy-Preview-URL: https://ce-36343.dp.appsmith.com

Copy link
Contributor

coderabbitai bot commented Sep 16, 2024

Walkthrough

The changes in this pull request enhance the Map Chart Widget tests within the Cypress framework. Key updates include modifications to element selection methods, improvements in assertions for title updates and widget visibility, and adjustments to the data points used in interactions. Additionally, the limited-tests.txt file has been revised to exclude the Fork_Template_spec.js test while including the new MapChart_Spec.ts, reflecting a shift in testing priorities.

Changes

File Path Change Summary
app/client/cypress/e2e/Regression/ClientSide/Widgets/Others/MapChart_Spec.ts Updated element selection method, refined title assertion, streamlined visibility tests, and modified data points and expected messages.
app/client/cypress/limited-tests.txt Commented out Fork_Template_spec.js and added MapChart_Spec.ts to the limited tests list.
app/client/cypress/locators/publishWidgetspage.json Corrected JSON formatting and added mapChartWidget locator.

Possibly related PRs

Suggested labels

Task, Widgets Product, ok-to-test

🎉 In the land of tests, we make our mark,
With Map Chart changes, we ignite a spark.
From titles that shine to data points anew,
Our Cypress tests now dance, all fresh and true.
Excluding the past, we embrace the bright,
In the world of testing, we soar to new heights! 🌟


Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6922c69 and 0a1afd3.

Files selected for processing (1)
  • app/client/cypress/locators/publishWidgetspage.json (3 hunks)
Files skipped from review due to trivial changes (1)
  • app/client/cypress/locators/publishWidgetspage.json

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>, please review it.
    -- 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 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 using 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

@jsartisan
Copy link
Contributor Author

/ci-test-limit-count run_count=1

Copy link


describe(
"Map Chart Widget Functionality",
{ tags: ["@tag.Widget", "@tag.Maps", "@tag.Visual"] },
function () {
it("1. Drag and drop a Map Chart widget and verify", function () {
it.only("1. Drag and drop a Map Chart widget and verify", function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove only.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -14,13 +14,13 @@ import EditorNavigation, {

const _mapChartCaption = "text:last-child";
const _mapChartPlot = (text: string) =>
"//text()[contains(., '" + text + "')]/..";
`//*[name()='svg']//*[name()='text' and contains(text(), '${text}')]`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we please use data-testid or css locator here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope. The rendered component is coming from 3rd library. Not much control over it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's optimise this then. Discussing with you offline.

@jsartisan
Copy link
Contributor Author

/ci-test-limit-count run_count=1

Copy link

Copy link

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

***** Repeat Run Summary ***** Total Tests with repeat: 1 Total Passed: 0 Total Failed: 1 Total Skipped: 0 *****************************

@jsartisan
Copy link
Contributor Author

/ci-test-limit-count run_count=15

Copy link

Copy link

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

***** Repeat Run Summary ***** Total Tests with repeat: 1 Total Passed: 0 Total Failed: 1 Total Skipped: 0 *****************************

Copy link

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

***** Repeat Run Summary ***** Total Tests with repeat: 15 Total Passed: 0 Total Failed: 15 Total Skipped: 0 *****************************

@jsartisan
Copy link
Contributor Author

/ci-test-limit-count run_count=15

Copy link

@@ -14,13 +14,13 @@ import EditorNavigation, {

const _mapChartCaption = "text:last-child";
const _mapChartPlot = (text: string) =>
"//text()[contains(., '" + text + "')]/..";
`//*[name()='svg']//*[name()='text' and contains(text(), '${text}')]`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's optimise this then. Discussing with you offline.

@jsartisan
Copy link
Contributor Author

/ci-test-limit-count run_count=1

Copy link

@jsartisan
Copy link
Contributor Author

/ci-test-limit-count run_count=1

@jsartisan jsartisan closed this Sep 17, 2024
Copy link

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants