Skip to content

Commit

Permalink
test: add override ignore threads
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris committed Jun 11, 2024
1 parent 80485cf commit 7158079
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion apps/meteor/tests/e2e/retention-policy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ test.describe.serial('retention-policy', () => {
let ignoreThreadsSetting: boolean;

test.beforeAll(async ({ api }) => {
ignoreThreadsSetting = await getSettingValueById(api, 'RetentionPolicy_DoNotPruneThreads') as boolean;
ignoreThreadsSetting = (await getSettingValueById(api, 'RetentionPolicy_DoNotPruneThreads')) as boolean;
expect((await setSettingValueById(api, 'RetentionPolicy_MaxAge_Channels', 15)).status()).toBe(200);
});

Expand Down Expand Up @@ -183,6 +183,17 @@ test.describe.serial('retention-policy', () => {

await expect(poHomeChannel.tabs.room.checkboxIgnoreThreads).toBeChecked({ checked: ignoreThreadsSetting });
});

test('should override ignore threads default value', async () => {
await poHomeChannel.sidenav.openChat(targetChannel);
await poHomeChannel.tabs.btnRoomInfo.click();
await poHomeChannel.tabs.room.btnEdit.click();
await poHomeChannel.tabs.room.pruneAccordion.click();
await poHomeChannel.tabs.room.checkboxIgnoreThreads.click();
await poHomeChannel.tabs.room.btnSave.click();

await expect(poHomeChannel.tabs.room.checkboxIgnoreThreads).toBeChecked({ checked: !ignoreThreadsSetting });
});
});
});
});

0 comments on commit 7158079

Please sign in to comment.