Skip to content

fix: enable alby app in E2E tests to fix payment-apps test failures#27071

Merged
emrysal merged 2 commits intomainfrom
devin/1768962654-fix-payment-apps-e2e-tests
Jan 21, 2026
Merged

fix: enable alby app in E2E tests to fix payment-apps test failures#27071
emrysal merged 2 commits intomainfrom
devin/1768962654-fix-payment-apps-e2e-tests

Conversation

@emrysal
Copy link
Contributor

@emrysal emrysal commented Jan 21, 2026

What does this PR do?

Fixes consistently failing E2E tests in payment-apps.e2e.ts caused by PR #27012.

PR #27012 introduced logic to disable apps without valid keys during database seeding. This caused the alby payment app tests to fail because the alby app was disabled in the App table when its environment keys weren't configured in CI.

This fix adds an ensureAppEnabled helper function that enables the app in the App table before running the tests, treating it as a mock/test setup step.

Failing tests fixed:

  • "Should be able to edit alby price, currency"
  • "Should display App is not setup already for alby"

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. N/A - test-only changes.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. The E2E tests should pass in CI after this change
  2. Specifically, the payment-apps.e2e.ts tests for alby should no longer timeout waiting for the switch element

Human Review Checklist

  • Verify the approach of enabling the app in the App table is appropriate vs. configuring test environment keys for alby
  • Confirm the biome-ignore comment for the pre-existing noExcessiveLinesPerFunction warning is acceptable

Checklist

  • I have read the contributing guide
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have checked if my changes generate no new warnings

Link to Devin run: https://app.devin.ai/sessions/070e00078cc049c2ad8f59a5ef82c5da
Requested by: @emrysal

PR #27012 introduced logic to disable apps without valid keys during seeding.
This caused the alby payment app tests to fail because the alby app was
disabled in the App table when its environment keys weren't configured.

This fix adds an ensureAppEnabled helper function that enables the app
in the App table before running the tests, treating it as a mock/test
setup step.

Co-Authored-By: alex@cal.com <me@alexvanandel.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@emrysal emrysal marked this pull request as ready for review January 21, 2026 02:37
@graphite-app graphite-app bot requested a review from a team January 21, 2026 02:37
@graphite-app graphite-app bot added foundation core area: core, team members only labels Jan 21, 2026
@emrysal emrysal enabled auto-merge (squash) January 21, 2026 02:40
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/web/playwright/payment-apps.e2e.ts">

<violation number="1" location="apps/web/playwright/payment-apps.e2e.ts:21">
P1: Rule violated: **E2E Tests Best Practices**

This helper flips a seeded App record to enabled without any cleanup, leaving the DB in a different state after the test. E2E tests must reset the DB state to what it was before to avoid side-effects across parallel runs (E2E Tests Best Practices: reset DB state / avoid side-effects).</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 21, 2026

Devin AI is addressing Cubic AI's review feedback

New feedback has been sent to the existing Devin session.

View Devin Session


✅ Pushed commit 40ac4a8

Address Cubic AI review feedback: the ensureAppEnabled helper now returns
a cleanup function that restores the app's original enabled state after
the test completes. This prevents side-effects across parallel test runs.

Co-Authored-By: alex@cal.com <me@alexvanandel.com>
@pull-request-size pull-request-size bot added size/L and removed size/S labels Jan 21, 2026
@emrysal emrysal merged commit 455a919 into main Jan 21, 2026
52 checks passed
@emrysal emrysal deleted the devin/1768962654-fix-payment-apps-e2e-tests branch January 21, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments