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: Updated file name for remove duplicate #34821

Merged
merged 9 commits into from
Jul 12, 2024
Merged

Conversation

sagar-qa007
Copy link
Contributor

@sagar-qa007 sagar-qa007 commented Jul 9, 2024

Description

Renamed the file name to remove duplicity for FileNames.

Fixes #34799

Automation

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

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/9891607703
Commit: 0cf957b
Cypress dashboard.
Tags: @tag.All
Spec:


Thu, 11 Jul 2024 13:34:23 UTC

Communication

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

  • Yes
  • No

Summary by CodeRabbit

  • Tests
    • Updated import paths in testing files to ensure compatibility with the latest data structure.
    • Enhanced test descriptions and scenarios for the Admin settings page in the Enterprise context, including redirection and button functionalities.

@sagar-qa007 sagar-qa007 added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Jul 9, 2024
@sagar-qa007 sagar-qa007 added the ok-to-test Required label for CI label Jul 9, 2024
Copy link
Contributor

coderabbitai bot commented Jul 9, 2024

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Files selected but had no reviewable changes (1)
  • app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This update involves modifications to Cypress E2E test files, focusing on import path adjustments and the enhancement of test descriptions within an Enterprise context. Additionally, a linter task is outlined for identifying and managing duplicate filenames in spec files.

Changes

Files Change Summary
app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts Updated import path in homePage.ImportApp() from "Table/TableFilterImportApp.json" to "TableV2FilterImportApp.json".
app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js Updated test suite description to "Admin settings page in Enterprise"; introduced changes for testing Admin settings, intercepts, redirection, and button functionalities.

Assessment against linked issues

Objective Addressed Explanation
Add linter for unique names for specs (SubTasks):
- Find duplicate filename and store in google sheet (#34799) This task is not addressed in the code changes.
- Custom linter development (#34799) This task is not addressed in the code changes.
- Linter testing (#34799) This task is not addressed in the code changes.

Poem

Among the code, where changes weave,
Paths updated, tests believe.
Admin's realm checks galore,
Widgets hum and tests explore.
A bunny's delight, code refined,
In Cypress fields, success we'll find. 🐇


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 removed the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Jul 9, 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 08c3ea9 and 37d30ae.

Files selected for processing (2)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts (1 hunks)
  • app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_settings_EE_spec.js (1 hunks)
Files skipped from review due to trivial changes (2)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts
  • app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_settings_EE_spec.js

Copy link
Contributor

@ApekshaBhosale ApekshaBhosale left a comment

Choose a reason for hiding this comment

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

what sis the naming convention are you suggesting for all devs from going onwards?

@sagar-qa007 sagar-qa007 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Jul 9, 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 37d30ae and 09fa750.

Files selected for processing (2)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts (1 hunks)
  • app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts
Additional context used
Path-based instructions (1)
app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js (1)

Pattern app/client/cypress/**/**.*: Follow best practices for Cypress code and e2e automation.
Avoid using cy.wait in code.
Avoid using cy.pause in code.
Use variables for locators, not strings.
Use data-* attributes for selectors; avoid Xpaths and CSS attributes.
Avoid selectors like .btn.submit or button[type=submit].
Perform logins via API with LoginFromAPI.
Only interact with controlled sites/servers.
Ensure tests can run with it.only and are independent.
Use before, beforeEach, after, afterEach correctly; clean state before tests.
Check new specs for flakiness by running them 10 times on CI.
Use multiple assertions; don't treat Cypress as unit tests.
Use constants for strings.
Include datasource operations in before hooks.

Additional comments not posted (1)
app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js (1)

9-9: LGTM! The test suite description update improves specificity.

The updated description "Admin settings page in Enterprise" is more specific and helps in better understanding the context of the tests.

@sagar-qa007
Copy link
Contributor Author

Naming conventions for duplicate file that I can suggest. We can discuss more scenarios as well :

  • Use specific function name even if spec is doing most of the steps same. E.g. JSONForm_MongoDB_spec.js
  • Use folder/directory name to make things more clear about function in prefix. E.g. DynamicaHeightStatbox_spec.js.

Here is the Google sheet for the duplicate name remove and few examples are given:

https://docs.google.com/spreadsheets/d/1UAmtwvKSjFOm8_4uXCSmwbL_YDutlVv1wdXn-xQ18WM/edit?usp=sharing

@ApekshaBhosale
Copy link
Contributor

@sagar-qa007 let's add this to our best practices doc

@sagar-qa007 sagar-qa007 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Jul 9, 2024
@sagar-qa007 sagar-qa007 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Jul 10, 2024
Copy link

🔴 There's new test files in JS, please port to TS and re-trigger Cypress tests:

  1. app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js

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 09fa750 and e3b4571.

Files selected for processing (1)
  • app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js

@sagar-qa007 sagar-qa007 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Jul 10, 2024
Copy link

🔴 There's new test files in JS, please port to TS and re-trigger Cypress tests:

  1. app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js

@ApekshaBhosale ApekshaBhosale changed the title task: Updated file name for remove duplicate test: Updated file name for remove duplicate Jul 10, 2024
@github-actions github-actions bot added skip-changelog Adding this label to a PR prevents it from being listed in the changelog Test labels Jul 10, 2024
@sagar-qa007 sagar-qa007 removed the ok-to-test Required label for CI label Jul 10, 2024
@sagar-qa007 sagar-qa007 added the ok-to-test Required label for CI label Jul 10, 2024
Copy link

🔴 There's new test files in JS, please port to TS and re-trigger Cypress tests:

  1. app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js

Copy link

🔴 There's new test files in JS, please port to TS and re-trigger Cypress tests:

  1. app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js

ApekshaBhosale
ApekshaBhosale previously approved these changes Jul 10, 2024
@sagar-qa007 sagar-qa007 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Jul 10, 2024
Copy link

🔴 There's new test files in JS, please port to TS and re-trigger Cypress tests:

  1. app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js

1 similar comment
Copy link

🔴 There's new test files in JS, please port to TS and re-trigger Cypress tests:

  1. app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js

@sagar-qa007 sagar-qa007 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Jul 10, 2024
Copy link

🔴 There's new test files in JS, please port to TS and re-trigger Cypress tests:

  1. app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js

@sagar-qa007 sagar-qa007 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Jul 10, 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 e3b4571 and 0365fc8.

Files selected for processing (1)
  • app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js (2 hunks)
Files skipped from review due to trivial changes (1)
  • app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js

@sagar-qa007 sagar-qa007 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Jul 10, 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 0365fc8 and 6d80679.

Files selected for processing (1)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/client/cypress/e2e/Regression/ClientSide/Widgets/TableV2/TableV2Filter2_2_Spec.ts

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 6d80679 and 2323ea3.

Files selected for processing (1)
  • app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • app/client/cypress/e2e/Regression/Enterprise/AdminSettings/Admin_Settings_NoAccess_spec.js

@sagar-qa007 sagar-qa007 added ok-to-test Required label for CI and removed ok-to-test Required label for CI labels Jul 11, 2024
@sagar-qa007 sagar-qa007 merged commit 3078d81 into release Jul 12, 2024
82 checks passed
@sagar-qa007 sagar-qa007 deleted the fix/duplicateFileName branch July 12, 2024 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Required label for CI 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.

2 participants