Skip to content

Commit ba40d4e

Browse files
committed
feat: initial e2e setup with first test implemented
1 parent d58c7f9 commit ba40d4e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

test/e2e/specs/loadMlAssets.spec.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@ import { pathUtils } from '../src/utils/pathUtils.js';
99
describe('Asset Explorer Tetsts', () => {
1010

1111
let cloudinarySDK = new CloudinarySDK();
12-
let assetPublicID = `e2e-test-ae-${crypto.randomUUID().substring(0, 8)}`;
12+
let firstAssetPublicID = `e2e-test-ae-${crypto.randomUUID().substring(0, 8)}`;
13+
let secondAssetPublicID = `e2e-test-ae-${crypto.randomUUID().substring(0, 8)}`;
1314

1415
beforeEach(async () => {
15-
await cloudinarySDK.V2.uploader.upload(path.join(pathUtils.getTestAssetsPath(), 'sample_png.png'), { public_id: assetPublicID });
16+
await cloudinarySDK.V2.uploader.upload(path.join(pathUtils.getTestAssetsPath(), 'sample_png.png'), { public_id: firstAssetPublicID });
17+
await cloudinarySDK.V2.uploader.upload(path.join(pathUtils.getTestAssetsPath(), 'sample_png.png'), { public_id: secondAssetPublicID });
1618
});
1719

1820
afterEach(async () => {
19-
await cloudinarySDK.V2.api.delete_resources([assetPublicID]);
21+
await cloudinarySDK.V2.api.delete_resources([firstAssetPublicID, secondAssetPublicID]);
2022
});
2123

2224
/**
@@ -25,7 +27,7 @@ describe('Asset Explorer Tetsts', () => {
2527
*/
2628
it('should load cloudinary media library', async () => {
2729
const expectedTitle = 'CLOUDINARY';
28-
const expectedItems = [assetPublicID];
30+
const expectedItems = [firstAssetPublicID, secondAssetPublicID];
2931

3032
await activityBarUtils.openView('Cloudinary');
3133

0 commit comments

Comments
 (0)