Skip to content

Commit d400ba5

Browse files
authored
Delivery API: QA Add acceptance test for media delivery api (#20182)
* Added tests for media delivery api * Added tests for content delivery api * Fixed import * Updated skip tag and issue link for the failing tests * Bumped version * Split delivery api tests into 2 files * Updated tests for media delivery Api * Cleaned up * Fixed comments * Fixed comments
1 parent 184c17e commit d400ba5

File tree

3 files changed

+454
-80
lines changed

3 files changed

+454
-80
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import {expect} from '@playwright/test';
22
import {AliasHelper, test} from '@umbraco/playwright-testhelpers';
33

4-
test.skip('can get content from delivery api', async ({umbracoApi}) => {
4+
// Fixed it later in other PR
5+
test.fixme('can get content from delivery api', async ({umbracoApi}) => {
56
// Arrange
67
const documentTypeName = 'TestDocumentType';
78
const contentName = 'TestContent';
@@ -25,18 +26,3 @@ test.skip('can get content from delivery api', async ({umbracoApi}) => {
2526
// Clean
2627
await umbracoApi.documentType.ensureNameNotExists(documentTypeName);
2728
});
28-
29-
test('can get media image from delivery api', async ({umbracoApi}) => {
30-
// Arrange
31-
const mediaName = 'TestMedia';
32-
const mediaTypeName = 'File';
33-
await umbracoApi.media.ensureNameNotExists(mediaName);
34-
const mediaId = await umbracoApi.media.createDefaultMediaFile(mediaName);
35-
const mediaUrl = await umbracoApi.media.getMediaUrlWithoutBaseUrl(mediaId);
36-
37-
// Assert
38-
expect(await umbracoApi.mediaDeliveryApi.doesMediaItemWithIdContainValues(mediaId, mediaName, mediaTypeName, mediaUrl)).toBeTruthy();
39-
40-
// Clean
41-
await umbracoApi.media.ensureNameNotExists(mediaName);
42-
});

0 commit comments

Comments
 (0)