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

Add coverage for list connectors and info #209

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Conversation

Rodri77
Copy link
Collaborator

@Rodri77 Rodri77 commented Jan 7, 2025

Important

Add end-to-end tests in end-to-end.spec.ts for listing connections, connector config info, configured integrations, and token creation.

  • Tests in end-to-end.spec.ts:
    • Add list connections test to verify default postgres and greenhouse connectors.
    • Add list connector config info test for plaid and greenhouse connectors.
    • Add list configured integrations test to ensure plaid and greenhouse integrations are listed.
    • Add create token test to verify token creation with POST /connect/token.

This description was created by Ellipsis for 284277b. It will automatically update as commits are pushed.

@Rodri77 Rodri77 requested a review from pellicceama January 7, 2025 15:37
Copy link

vercel bot commented Jan 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
openint ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 7, 2025 4:42pm

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to e447526 in 48 seconds

More details
  • Looked at 55 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. apps/web/__tests__/end-to-end.spec.ts:205
  • Draft comment:
    Expecting exactly 2 connections might lead to flaky tests if more connections are added in the future. Consider checking for at least the expected connections instead.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The test is specifically verifying the state after creating two specific connections in previous tests. The exact count of 2 is intentional and matches the test setup. Making it "at least 2" would make the test less precise and could hide bugs where extra unexpected connections are present.
    The comment raises a valid point about test maintainability. If the test suite is expanded to create more connections, this test would need updating.
    However, this is an end-to-end test that verifies a specific sequence of operations. The exact count is part of validating that the test environment is in the expected state. If more connections are added, the test should be explicitly updated.
    Delete the comment. The exact count assertion is intentional and appropriate for this end-to-end test scenario.
2. apps/web/__tests__/end-to-end.spec.ts:219
  • Draft comment:
    Expecting exactly 2 connectors might lead to flaky tests if more connectors are added in the future. Consider checking for at least the expected connectors instead.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The test is specifically verifying the state after creating 2 specific connectors. The exact count check is intentional as it verifies no unexpected connectors were created. The test is not meant to be future-proof, but rather to verify the specific test scenario. Making it less specific would actually make it a weaker test.
    The comment raises a valid point about test maintainability. If more connectors are added by default in the future, this test would need updating.
    However, that's actually good - we want the test to fail if the system behavior changes, so we can intentionally update the tests to match the new expected behavior. Making the test more permissive would hide potential issues.
    The comment should be deleted. The exact count check is intentional and appropriate for this specific test scenario. Making it more permissive would make the test less effective at catching issues.
3. apps/web/__tests__/end-to-end.spec.ts:231
  • Draft comment:
    Expecting exactly 2 integrations might lead to flaky tests if more integrations are added in the future. Consider checking for at least the expected integrations instead.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    This is an end-to-end test that runs in a controlled test environment. The test sets up exactly 2 specific integrations (plaid and greenhouse) earlier in the test suite. The test is verifying that those specific integrations exist. We don't want "at least" - we want exactly what we set up, to ensure nothing unexpected is happening.
    The comment raises a valid point about test maintainability - if more integrations are added later, tests will need updating. However, in E2E tests, being precise about the exact state is often more important than being flexible.
    While test maintainability is important, this is an E2E test that should precisely verify the exact state we set up. Being too flexible could hide bugs where unexpected integrations appear.
    Delete this comment. The exact count check is appropriate for an E2E test verifying specific test setup. Being more flexible could mask real issues.

Workflow ID: wflow_Wn2PREIY820rmkZF


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Jan 7, 2025

Stably Runner - Test Suite - 'Pre Merge CI Checks'

Test Suite Run Result: 🟢 Success (1/1 tests passed) [dashboard]


This comment was generated from stably-runner-action

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 284277b in 19 seconds

More details
  • Looked at 65 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. apps/web/__tests__/end-to-end.spec.ts:211
  • Draft comment:
    The test description mentions verifying default postgres and greenhouse connectors, but the test only checks for the greenhouse connector. Ensure both connectors are verified.
  • Reason this comment was not posted:
    Comment did not seem useful.
2. apps/web/__tests__/end-to-end.spec.ts:229
  • Draft comment:
    The test should verify the presence of specific connectors like 'plaid' and 'greenhouse', as mentioned in the PR description, instead of just checking the count.
  • Reason this comment was not posted:
    Marked as duplicate.
3. apps/web/__tests__/end-to-end.spec.ts:269
  • Draft comment:
    Ensure to verify the structure of the second item in the list, similar to the first item, to maintain consistency in the test.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The test for listing configured integrations checks for 'plaid' and 'greenhouse' connectors, which aligns with the PR description. However, it should also verify the structure of the second item in the list, similar to the first item.

Workflow ID: wflow_X2DbFjG1HaaLinOA


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@pellicceama pellicceama merged commit 6bfa139 into main Jan 8, 2025
3 of 4 checks passed
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.

2 participants