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: disable fully parallel #8522

Merged
merged 9 commits into from
May 22, 2024
Merged

Conversation

dstala
Copy link
Member

@dstala dstala commented May 18, 2024

Change Summary

Provide summary of changes with issue number if any.

Change type

  • feat: (new feature for the user, not a new feature for build script)
  • fix: (bug fix for the user, not a fix to a build script)
  • docs: (changes to the documentation)
  • style: (formatting, missing semi colons, etc; no production code change)
  • refactor: (refactoring production code, eg. renaming a variable)
  • test: (adding missing tests, refactoring tests; no production code change)
  • chore: (updating grunt tasks etc; no production code change)

Test/ Verification

Provide summary of changes.

Additional information / screenshots (optional)

Anything for maintainers to be made aware of

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
Copy link
Contributor

coderabbitai bot commented May 18, 2024

Walkthrough

Walkthrough

The recent updates to the Playwright test scripts and configuration files aim to enhance test reliability and execution behavior. Changes include adding wait times for proper UI element handling, adjusting test execution to run sequentially, and refining response handling for improved test stability and accuracy.

Changes

File Path Summary
tests/playwright/tests/db/features/multiFieldEditor.spec.ts Added a 500ms wait before clicking save to ensure toggle updates properly.
tests/playwright/playwright.config.ts Changed fullyParallel setting from true to false for sequential test runs.
tests/playwright/pages/Dashboard/Details/FieldsPage.ts Extended saveChanges timeout to 1000ms, updated request URL path, and response JSON matcher.
tests/playwright/pages/Dashboard/common/Topbar/index.ts Updated openDetailedTab and openDataTab methods to use waitForResponse with specific criteria.

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.

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 a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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.

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 aaffd2e and dc8d4e3.
Files selected for processing (1)
  • tests/playwright/tests/db/features/multiFieldEditor.spec.ts (1 hunks)
Additional comments not posted (1)
tests/playwright/tests/db/features/multiFieldEditor.spec.ts (1)

268-269: LGTM! The added delay should help stabilize the test by ensuring UI updates are processed before saving.

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
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 dc8d4e3 and ab2ee32.
Files selected for processing (1)
  • tests/playwright/playwright.config.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • tests/playwright/playwright.config.ts

@dstala dstala changed the title test: fix mfe field disable test test: disable fully parallel May 21, 2024
Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
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 ab2ee32 and 8c8df78.
Files selected for processing (1)
  • tests/playwright/pages/Dashboard/Details/FieldsPage.ts (1 hunks)
Additional comments not posted (1)
tests/playwright/pages/Dashboard/Details/FieldsPage.ts (1)

243-247: Changes to the saveChanges method align with the PR objectives to adjust the wait time and update the API endpoint.

Verification successful

The search results indicate that the new API endpoint /api/v1/db/meta/tables/ is used in multiple files across the codebase, including the FieldsPage.ts file. This confirms that the endpoint is consistently used and integrated within the project.

  • tests/playwright/pages/Dashboard/ViewSidebar/index.ts
  • tests/playwright/pages/Dashboard/TreeView.ts
  • tests/playwright/pages/Dashboard/Sidebar/index.ts
  • tests/playwright/pages/Dashboard/Details/FieldsPage.ts
  • Various files in packages/nocodb/tests/unit/
  • Various files in packages/nocodb/src/controllers/
  • Various files in packages/nocodb-sdk/src/lib/

This widespread usage suggests that the new endpoint is correctly implemented and aligns with the project's structure.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the new API endpoint and response structure in the `saveChanges` method.

# Test: Search for the usage of the new API endpoint. Expect: Only occurrences of the new endpoint.
rg --type typescript $'api/v1/db/meta/tables/'

Length of output: 80



Script:

#!/bin/bash
# Description: Verify the new API endpoint and response structure in the `saveChanges` method.

# Test: Search for the usage of the new API endpoint. Expect: Only occurrences of the new endpoint.
rg 'api/v1/db/meta/tables/' --glob '*.ts'

Length of output: 6892

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
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 8c8df78 and 6a30067.
Files selected for processing (1)
  • tests/playwright/pages/Dashboard/common/Topbar/index.ts (1 hunks)
Additional comments not posted (2)
tests/playwright/pages/Dashboard/common/Topbar/index.ts (2)

83-88: LGTM! Ensure the new URL and response structure are correctly implemented in the backend.

Verification successful

The search results indicate multiple instances of the URL pattern /api/v1/db/data/noco/ in various test files, suggesting that the backend implementation is being tested. However, to ensure the response structure is correctly handled, we need to verify that the response contains the expected list field.

Let's generate a script to search for the handling of the list field in the backend code.


The search results show numerous instances of the list field being used in various contexts, including tests and backend services. This indicates that the list field is indeed a recognized and handled part of the response structure in the backend.

Given this evidence, it appears that the backend correctly handles the list field in responses, aligning with the changes made in the openDataTab method.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the new URL and response structure for `openDataTab`.

# Test: Search for backend implementations of the new URL. Expect: Correct handling of the 'list' response.
rg --type typescript $'api/v1/db/data/noco/'

Length of output: 78



Script:

#!/bin/bash
# Description: Verify the new URL and response structure for `openDataTab`.

# Test: Search for backend implementations of the new URL. Expect: Correct handling of the 'list' response.
rg --type ts 'api/v1/db/data/noco/'

Length of output: 22875



Script:

#!/bin/bash
# Description: Verify the handling of the 'list' field in the backend response.

# Test: Search for the 'list' field in the backend code to ensure it is correctly handled.
rg --type ts 'list' --glob '!node_modules'

Length of output: 188404


73-78: LGTM! Ensure the new URL and response structure are correctly implemented in the backend.

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
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 6a30067 and 17fb0a0.
Files selected for processing (1)
  • tests/playwright/tests/db/features/erd.spec.ts (3 hunks)
Files skipped from review due to trivial changes (1)
  • tests/playwright/tests/db/features/erd.spec.ts

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
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 17fb0a0 and 3ee566f.
Files selected for processing (3)
  • tests/playwright/pages/Dashboard/WebhookForm/index.ts (1 hunks)
  • tests/playwright/pages/Dashboard/common/Topbar/index.ts (1 hunks)
  • tests/playwright/tests/db/features/webhook.spec.ts (1 hunks)
Additional comments not posted (4)
tests/playwright/pages/Dashboard/common/Topbar/index.ts (2)

72-82: Refactor openDetailedTab to improve reliability by waiting for specific responses.

Consider adding a comment explaining why this conditional wait is necessary, as it helps maintain the code's readability and understandability.


87-92: Refactor openDataTab to enhance test stability by incorporating response waiting.

Adding a brief comment about the purpose of waiting for a specific response could enhance code clarity and maintainability.

tests/playwright/pages/Dashboard/WebhookForm/index.ts (1)

119-120: Enhance the delete method with an optional wfr parameter to control response waiting.

Consider documenting the wfr parameter in the method's docstring to clarify its purpose and usage.

tests/playwright/tests/db/features/webhook.spec.ts (1)

307-308: Utilize the wfr parameter in delete calls to optimize test execution speed.

Verify that setting wfr to false does not negatively impact the reliability of the tests, especially in environments with variable response times.

@rameshmane7218 rameshmane7218 merged commit 3eed090 into develop May 22, 2024
17 checks passed
@rameshmane7218 rameshmane7218 deleted the test/fix-multi-field-editor-test branch May 22, 2024 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants