Add test to ensure the CID is deleted when the file is deleted when creating a storage request

This commit is contained in:
Arnaud 2024-10-14 16:49:14 +02:00
parent 679f3807f4
commit c5797c6ebf
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663

View File

@ -63,3 +63,15 @@ test('storage request navigation buttons', async ({ page }) => {
await page.getByRole('button', { name: 'Finish' }).click();
await expect(page.locator('.modal--open')).not.toBeVisible();
})
test('remove the CID when the file is deleted', async ({ page }) => {
await page.goto('/dashboard');
await page.getByRole('link', { name: 'Purchases' }).click();
await page.getByRole('button', { name: 'Storage Request' }).click();
await page.locator('div').getByTestId("upload").setInputFiles([
path.join(__dirname, "assets", 'chatgpt.jpg'),
]);
await expect(page.locator('#cid')).toHaveValue("zDvZRwzkvwapyNeL4mzw5gBsZvyn7x8F8Y9n4RYSC7ETBssDYpGe")
await page.locator('.uploadFile-infoRight .buttonIcon--small').click();
await expect(page.locator('#cid')).toHaveValue("")
})