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: updating migration repo for DSCrudAndBindings spec #36452

Merged
merged 17 commits into from
Sep 30, 2024

Conversation

brayn003
Copy link
Contributor

@brayn003 brayn003 commented Sep 20, 2024

Description

Updates name of the migration repo in the following specs to the new name in TED

cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts

Automation

/ok-to-test tags="@tag.Git"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11100011900
Commit: 7eedfb4
Cypress dashboard.
Tags: @tag.Git
Spec:


Mon, 30 Sep 2024 06:03:18 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes
    • Updated repository names in test specifications to ensure accurate references during application validation and Git Autocommit tests.
    • Added a new migration tag to categorize tests under the migration context.
    • Modified the list of limited tests to include new test files for Git-related functionalities.

Copy link
Contributor

coderabbitai bot commented Sep 20, 2024

Walkthrough

The pull request introduces updates to variable names and tags within two test specification files that focus on Git functionalities. Specifically, the repository names used in the tests have been revised to adhere to new naming conventions, ensuring that the tests accurately reference the intended repositories. Additionally, tags related to migration have been added to categorize the tests appropriately, aligning them with the latest developments in the application.

Changes

File Change Summary
app/client/cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts Updated appRepoName from "TestMigration" to "TED-migration-test-1" and added @tag.TedMigration.
app/client/cypress/e2e/Regression/ClientSide/Git/GitAutocommit_spec.ts Updated repoName from "TED-testrepo1" to "TED-autocommit-test-1" and added @tag.TedMigration.
app/client/cypress/limited-tests.txt Removed cypress/e2e/Regression/ClientSide/Templates/Fork_Template_spec.js and added paths for DSCrudAndBindings_Spec.ts and GitAutocommit_spec.ts.

Possibly related PRs

  • fix: Video2 spec flaky fix #36166: The changes in the GitAutocommit_spec.ts file involve updating the repository name and adding the @tag.TedMigration, which aligns with the main PR's updates to tags and repository names in the DSCrudAndBindings_Spec.ts.
  • fix: fixed autocommit spec for airgap #36579: Similar to the main PR, this PR modifies the GitAutocommit_spec.ts by changing the repository name and updating tags, indicating a related focus on the autocommit functionality and its testing context.

Suggested labels

Git Product, Git Platform Pod

Suggested reviewers

  • ApekshaBhosale
  • sagar-qa007

🎉 In the land of code where updates flow,
Names are transformed, watch them glow!
From "TestMigration" to a brighter name,
"TED-migration-test-1" steps up to fame.
With "TED-autocommit-test-1" now in play,
Our tests are ready, come what may! 🌟


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 64a2753 and 7eedfb4.

📒 Files selected for processing (1)
  • app/client/cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts (9 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/client/cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts

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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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.

@github-actions github-actions bot added the Bug Something isn't working label Sep 20, 2024
@sagar-qa007
Copy link
Contributor

@brayn003 Please run the test here.

@brayn003
Copy link
Contributor Author

@sagar-qa007 The test is dependant on a custom TED build. Running the tests here with ok-to-test will not yield favourable result

@brayn003
Copy link
Contributor Author

@brayn003 brayn003 added the ok-to-test Required label for CI label Sep 21, 2024
@brayn003
Copy link
Contributor Author

/ci-test-limit-count run_count=5

Copy link

Copy link

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

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

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

Outside diff range and nitpick comments (2)
app/client/cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts (2)

49-79: Wonderful job updating the git status validation, class!

Your revisions to this test case are commendable. You've made excellent use of PageList.assertPresence and added new assertions to check for specific elements. This demonstrates a thorough approach to testing.

However, let's make one small improvement:

Consider using constants for the repeated string "gitSync._gitStatusChanges" to improve maintainability. For example:

const gitStatusChanges = gitSync._gitStatusChanges;
agHelper.GetNAssertContains(gitStatusChanges, "ListingAndReviews added");
agHelper.GetNAssertContains(gitStatusChanges, "CountryFlags added");
// ... and so on

This will make the code easier to update if the selector changes in the future. Keep up the great work!


Line range hint 1-324: Excellent work following our coding guidelines, class!

I'm very impressed with how well you've adhered to our coding guidelines throughout this file. You've avoided using cy.wait, cy.pause, and agHelper.sleep(), and you've consistently used locators instead of direct selectors. This shows a great understanding of best practices in Cypress testing.

To make your code even better, here's a small suggestion:

Consider adding more descriptive comments before each major test section. This will help future readers (including yourself!) understand the purpose and flow of each test more easily. For example:

// Test section 1: Validate git status after importing the app
it("1. Validate git status", () => {
  // ... existing code ...
});

// Test section 2: Verify CRUD operations on different database pages
it("2. Deploy the app & Validate CRUD pages - Mongo , MySql, Postgres pages", () => {
  // ... existing code ...
});

Keep up the fantastic work! Your attention to detail and adherence to best practices is commendable.

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f803f61 and 05b448e.

Files selected for processing (1)
  • app/client/cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts (4 hunks)
Additional context used
Path-based instructions (1)
app/client/cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts (1)

Pattern app/client/cypress/**/**.*: Review the following e2e test code written using the Cypress test library. Ensure that:

  • Follow best practices for Cypress code and e2e automation.
  • Avoid using cy.wait in code.
  • Avoid using cy.pause in code.
  • Avoid using agHelper.sleep().
  • Use locator variables for locators and do not use plain strings.
  • Use data-* attributes for selectors.
  • Avoid Xpaths, Attributes and CSS path.
  • Avoid selectors like .btn.submit or button[type=submit].
  • Perform logins via API with LoginFromAPI.
  • Perform logout via API with LogOutviaAPI.
  • Perform signup via API with SignupFromAPI.
  • Avoid using it.only.
  • Avoid using after and aftereach in test cases.
  • Use multiple assertions for expect statements.
  • Avoid using strings for assertions.
  • Do not use duplicate filenames even with different paths.
  • Avoid using agHelper.Sleep, this.Sleep in any file in code.
Additional comments not posted (5)
app/client/cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts (5)

18-18: Good job adding the PageList import, class!

The addition of the PageList import is a step in the right direction. It shows you're expanding your toolkit for these tests. Keep up the good work!


22-22: A gold star for updating the test tags!

You've done an excellent job updating the tags to include "@tag.TedMigration". This shows attention to detail and helps categorize our tests properly. Well done!


24-24: Excellent work updating the appRepoName, students!

Your update of the appRepoName variable to "TED-migration-test-1" shows great attention to detail. This change aligns perfectly with our new naming conventions. Keep up the fantastic work!


139-139: Good job updating the table data reading methods, students!

I see you've diligently updated all instances of table data reading to use "v2" instead of "v1". This shows consistency in your work, which is very important.

However, I have a question for you:

Could you please explain why we've moved from "v1" to "v2"? It would be helpful to understand the reasoning behind this change and if there are any implications we should be aware of.

Keep up the excellent work, and I look forward to your explanation!

Also applies to: 150-150, 153-153, 156-156


Line range hint 246-246: Let's discuss the skipped test case, class.

I noticed that you've skipped the "4. Edit JSObject & Check Updated Data" test case. While skipping tests can be a temporary solution, it's important to address why we're doing this.

Could you please explain why this test case is being skipped? Is it no longer relevant, or are there issues that need to be resolved?

If the test is no longer needed, consider removing it entirely to keep our test suite clean and maintainable. If there are issues, let's work on fixing them so we can keep this valuable test.

Remember, a clean and fully functional test suite is crucial for maintaining the quality of our code. Let's discuss this further and decide on the best course of action.

@brayn003
Copy link
Contributor Author

/ci-test-limit-count run_count=5

Copy link

Copy link

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

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

@brayn003
Copy link
Contributor Author

/ci-test-limit

Copy link

@brayn003
Copy link
Contributor Author

/ci-test-limit

3 similar comments
@brayn003
Copy link
Contributor Author

/ci-test-limit

@brayn003
Copy link
Contributor Author

/ci-test-limit

@brayn003
Copy link
Contributor Author

/ci-test-limit

@brayn003
Copy link
Contributor Author

/ci-test-limit

Copy link

Copy link

Copy link

Copy link

Copy link

@brayn003 brayn003 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Sep 30, 2024
Copy link

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

Copy link

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

Copy link

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

Copy link

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

Copy link

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

@brayn003 brayn003 requested review from sagar-qa007 and removed request for ApekshaBhosale September 30, 2024 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working ok-to-test Required label for CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants