Skip to content

Commit

Permalink
test: tweak setting update
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego committed May 27, 2024
1 parent 6436ab8 commit 5aa0b89
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions apps/meteor/tests/e2e/presence.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ test.describe.serial('Presence', () => {
await page.goto('/home');
});

test.describe('Login using default settings', () => {
test.beforeAll(async ({ api }) => {
await expect((await setSettingValueById(api, 'API_Use_REST_For_DDP_Calls', true)).status()).toBe(200);
});
test.beforeAll(async ({ api }) => {
await expect((await setSettingValueById(api, 'API_Use_REST_For_DDP_Calls', true)).status()).toBe(200);
});

test.afterAll(async ({ api }) => {
await expect((await setSettingValueById(api, 'API_Use_REST_For_DDP_Calls', false)).status()).toBe(200);
});
test.afterAll(async ({ api }) => {
await expect((await setSettingValueById(api, 'API_Use_REST_For_DDP_Calls', true)).status()).toBe(200);
});

test.describe('Login using default settings', () => {
test('expect user to be online after log in', async ({ page }) => {
await poRegistration.username.type('user1');
await poRegistration.inputPassword.type(DEFAULT_USER_CREDENTIALS.password);
Expand All @@ -35,10 +35,6 @@ test.describe.serial('Presence', () => {
await expect((await setSettingValueById(api, 'API_Use_REST_For_DDP_Calls', false)).status()).toBe(200);
});

test.afterAll(async ({ api }) => {
await expect((await setSettingValueById(api, 'API_Use_REST_For_DDP_Calls', true)).status()).toBe(200);
});

test('expect user to be online after log in', async ({ page }) => {
await poRegistration.username.type('user1');
await poRegistration.inputPassword.type(DEFAULT_USER_CREDENTIALS.password);
Expand Down

0 comments on commit 5aa0b89

Please sign in to comment.