Skip to content

Commit

Permalink
Longer timout, smaller file (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanovSPvirtru authored Oct 27, 2023
1 parent 449eb18 commit 0d72e65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web-app/tests/tests/huge.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ test.beforeEach(async ({ page }) => {

test('Large File', async ({ page }) => {
await authorize(page);
const fiveGigs = 5 * 2 ** 30;
await page.locator('#randomSelector').fill(fiveGigs.toString());
const threeGigs = 3 * 2 ** 30;
await page.locator('#randomSelector').fill(threeGigs.toString());

const downloadPromise = page.waitForEvent('download');
await page.locator('#zipEncrypt').click();
Expand All @@ -32,7 +32,7 @@ test('Large File', async ({ page }) => {

await page.locator('#randomSelector').clear();
await loadFile(page, cipherTextPath);
const plainDownloadPromise = page.waitForEvent('download');
const plainDownloadPromise = await page.waitForEvent('download', { timeout: 60000 });
await page.locator('#tdfDecrypt').click();
await page.locator('#fileSink').click();
await page.locator('#decryptButton').click();
Expand All @@ -44,7 +44,7 @@ test('Large File', async ({ page }) => {
}
try {
const stats = fs.statSync(plainTextPath);
expect(stats).toHaveProperty('size', fiveGigs);
expect(stats).toHaveProperty('size', threeGigs);
} finally {
plainTextPath && fs.unlinkSync(plainTextPath);
}
Expand Down

0 comments on commit 0d72e65

Please sign in to comment.