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

Open
wants to merge 12 commits into
base: release
Choose a base branch
from

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

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

🔍 Cypress test results

Warning

Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/11065831616
Commit: 050a5a2
Cypress dashboard.
Tags:
Spec: cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts

It seems like no tests ran 😔. We are not able to recognize it, please check workflow here.


Fri, 27 Sep 2024 07:05:51 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: Fixed flaky fork template test case #36200: The changes in this PR involve adding a new tag @tag.TedMigration and updating the repository name in the GitAutocommit_spec.ts, which aligns with the main PR's focus on updating tags and repository names in the DSCrudAndBindings_Spec.ts.
  • fix: Fixed Bug29566 spec with list widget #36260: This PR modifies the limited-tests.txt to include the DSCrudAndBindings_Spec.ts, which is directly related to the main PR that also updates this file to reflect changes in the test specifications.
  • test: fix DataSourceScheme #36339: The modifications in this PR include changes to the DatasourceSchema_spec.ts and updates to the limited-tests.txt, which are relevant as the main PR also involves changes to test specifications and the organization of tests.
  • test: udpated 3rd party api for Commandclick nav spec #36545: This PR updates the Command Click Navigation spec to replace a third-party API with TED, which is relevant to the main PR's focus on migration and updating test specifications related to Git operations.

Suggested labels

Task, Git Product, Git Platform Pod, Test

Suggested reviewers

  • ApekshaBhosale
  • sagar-qa007
  • jsartisan

🎉 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 d6e5d67 and 050a5a2.

📒 Files selected for processing (1)
  • app/client/cypress/e2e/Regression/ClientSide/Git/ExistingApps/v1.9.24/DSCrudAndBindings_Spec.ts (8 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

1 similar comment
@brayn003
Copy link
Contributor Author

/ci-test-limit

Copy link

Copy link

Copy link

Copy link

Copy link

@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

Copy link

Copy link

Copy link

Copy link

Copy link

@brayn003
Copy link
Contributor Author

/ci-test-limit

Copy link

@brayn003 brayn003 changed the title fix: updating migration repo name in cy tests fix: updating migration repo for DSCrudAndBindings spec Sep 27, 2024
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.

2 participants