e2e-prod: platform wallet adjust route, fund scenario player, RCs seeded directly in prod env
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { describe, it, expect, beforeAll, vi } from 'vitest';
|
||||
import { loadArtifact, makeProdClient } from './_setup/harness.js';
|
||||
import { adminApi, loadArtifact, makeProdClient } from './_setup/harness.js';
|
||||
import type { SeedArtifact } from './_setup/types.js';
|
||||
import type { NotificationEffect, StoreOfferEffect } from '../../src/index.js';
|
||||
import { getScenarioRuntime } from '../../src/client/RudderClient.js';
|
||||
@@ -30,6 +30,17 @@ describe('e2e-prod: scenarios', () => {
|
||||
};
|
||||
await client.auth.loginWithDevice({ region: 'en', language: 'en' });
|
||||
|
||||
// The boundary buy uses the paid offer — fund the wallet so the purchase succeeds.
|
||||
const playerId = (await client.player.reload()).player!.id!;
|
||||
await adminApi(artifact).post(
|
||||
`/platform/v1/projects/${artifact.projectId}/players/${playerId}/wallet/adjust`,
|
||||
{
|
||||
currencyCode: artifact.store.paidPrice.currency,
|
||||
amount: artifact.store.paidPrice.amount,
|
||||
reason: 'e2e scenario funding',
|
||||
},
|
||||
);
|
||||
|
||||
// First notification dispatched.
|
||||
await vi.waitFor(() => expect(notifications.length).toBe(1), { timeout: 10_000 });
|
||||
await notifications[0].done();
|
||||
|
||||
Reference in New Issue
Block a user