Skip to content

Commit

Permalink
[DE-827] Fix test env (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
maciej-nedza authored May 17, 2024
1 parent f2b39d9 commit 29a3357
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions e2e/src/eventsController.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { EventsController } from 'advanced-billing-sdk';
import { createClient, createInvalidClient } from './config';
import { createSubscription } from './utils/subscription';
import { waitForSeconds } from './utils';

describe('Events Controller', () => {
let eventsController: EventsController;
Expand Down Expand Up @@ -35,6 +36,7 @@ describe('Events Controller', () => {
test('should list events for subscription when the user sends a valid subscription id', async () => {
const { subscriptionResponse } = await createSubscription({});
const subscriptId = subscriptionResponse?.subscription?.id;
await waitForSeconds(1);
const listResponse = await eventsController.listSubscriptionEvents({
subscriptionId: subscriptId || 0,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ describe('Proforma Invoices Controller', () => {
const [proformaInvoice] = listResponse.result.proformaInvoices || [];
expect(listResponse.statusCode).toBe(200);
expect(listResponse.result.proformaInvoices?.length).toBeGreaterThan(0);
expect(proformaInvoice.siteId).toBe(4511);
expect(proformaInvoice.siteId).toBe(86562);
expect(proformaInvoice.customerId).toBe(customerResponse.customer.id);
});

Expand Down
10 changes: 5 additions & 5 deletions e2e/src/sitesController.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ describe('SitesController', () => {
const sitesController = new SitesController(client);
const response = await sitesController.readSite();
const expectedSite = {
id: 4511,
name: 'Typescript SDK Env',
subdomain: 'tp-sdk',
id: 86562,
name: 'Typescript SDK',
subdomain: 'ts-sdk',
currency: 'USD',
brighton_v1_enabled: false,
sellerId: 722159,
sellerId: 56887,
nonPrimaryCurrencies: ['EUR', 'GBP'],
relationshipInvoicingEnabled: true,
customerHierarchyEnabled: false,
Expand All @@ -31,7 +31,7 @@ describe('SitesController', () => {
state: 'TX',
zip: '78015',
country: 'US',
name: 'Developer Experience',
name: 'Maxio Developer Experience',
phone: '555 111 222',
},
taxConfiguration: {
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/webhooksController.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('webhooks Controller', () => {
expect(result).toHaveLength(5);
expect(
urlsResponse.includes(
'https://play.svix.com/in/e_94XdF-OwN3EaTKty4izJDWRAH3V/'
'https://play.svix.com/in/e_Z1G9YLgAbB9Ze6wMTL4qEAE7j22/'
)
).toBeTruthy();
expect(urlsResponse.includes('https://www.google.com/')).toBeTruthy();
Expand Down

0 comments on commit 29a3357

Please sign in to comment.