V11/feature/block grid editor content tests area (#13867)
* Added test for testing the area of the blockGridDataType * Bumped version of playwright, builders and the helpers * Added additional test timeout * Added additional timeout since some test can be slow and timeout * Added additional mediaLibrary to the path * Changed so we now use slow which increases the test timeout by three times * Changed to slow instead of setting timeout
This commit is contained in:
62
tests/Umbraco.Tests.AcceptanceTest/package-lock.json
generated
62
tests/Umbraco.Tests.AcceptanceTest/package-lock.json
generated
@@ -7,8 +7,8 @@
|
||||
"name": "acceptancetest",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@umbraco/json-models-builders": "^1.0.3",
|
||||
"@umbraco/playwright-testhelpers": "^1.0.21",
|
||||
"@umbraco/json-models-builders": "^1.0.5",
|
||||
"@umbraco/playwright-testhelpers": "^1.0.22",
|
||||
"camelize": "^1.0.0",
|
||||
"dotenv": "^16.0.2",
|
||||
"faker": "^4.1.0",
|
||||
@@ -17,7 +17,7 @@
|
||||
"xhr2": "^0.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.19.2",
|
||||
"@playwright/test": "^1.29",
|
||||
"del": "^6.0.0",
|
||||
"ncp": "^2.0.0",
|
||||
"prompt": "^1.2.0",
|
||||
@@ -86,13 +86,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@playwright/test": {
|
||||
"version": "1.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.26.0.tgz",
|
||||
"integrity": "sha512-D24pu1k/gQw3Lhbpc38G5bXlBjGDrH5A52MsrH12wz6ohGDeQ+aZg/JFSEsT/B3G8zlJe/EU4EkJK74hpqsjEg==",
|
||||
"version": "1.30.0",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.30.0.tgz",
|
||||
"integrity": "sha512-SVxkQw1xvn/Wk/EvBnqWIq6NLo1AppwbYOjNLmyU0R1RoQ3rLEBtmjTnElcnz8VEtn11fptj1ECxK0tgURhajw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"playwright-core": "1.26.0"
|
||||
"playwright-core": "1.30.0"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
@@ -129,20 +129,20 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@umbraco/json-models-builders": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/json-models-builders/-/json-models-builders-1.0.3.tgz",
|
||||
"integrity": "sha512-NNBIP9ZXXZvxanmG5OvE+Ppc2ObSLLUyBbwZiPtwerFxdlnYuUYA6qCq6mj7vx3na6MOQTPZMAiNFEaM0V9xFw==",
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/json-models-builders/-/json-models-builders-1.0.5.tgz",
|
||||
"integrity": "sha512-14xowT8oiW9+DQVOoundRPvcvnNrU0Ey+06G/q/iZyUnqaNRu/i5nUqcbUZGdv6VBCdxaxq2H3WwtSET3gtneA==",
|
||||
"dependencies": {
|
||||
"camelize": "^1.0.0",
|
||||
"faker": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@umbraco/playwright-testhelpers": {
|
||||
"version": "1.0.21",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-1.0.21.tgz",
|
||||
"integrity": "sha512-JfE1MvKc7LEVayF9AX4Ctmx8c6+M+m6+mV7g7QSOYPO7ky/PSlzVvI9S9S7vcpuwLB2Vp4NE9PcXaXUGEvNCnw==",
|
||||
"version": "1.0.22",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-1.0.22.tgz",
|
||||
"integrity": "sha512-hFqqQvEIylagfqFyhQ2rSyYlUP+xpWA5lkhJjkpb2qpxkIISxjwC/FYJTJGvcoBHuUaZrjsSv4lM2aJy2ZWHMA==",
|
||||
"dependencies": {
|
||||
"@umbraco/json-models-builders": "^1.0.2",
|
||||
"@umbraco/json-models-builders": "^1.0.5",
|
||||
"camelize": "^1.0.0",
|
||||
"faker": "^4.1.0",
|
||||
"form-data": "^4.0.0",
|
||||
@@ -725,9 +725,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/playwright-core": {
|
||||
"version": "1.26.0",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.26.0.tgz",
|
||||
"integrity": "sha512-p8huU8eU4gD3VkJd3DA1nA7R3XA6rFvFL+1RYS96cSljCF2yJE9CWEHTPF4LqX8KN9MoWCrAfVKP5381X3CZqg==",
|
||||
"version": "1.30.0",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.30.0.tgz",
|
||||
"integrity": "sha512-7AnRmTCf+GVYhHbLJsGUtskWTE33SwMZkybJ0v6rqR1boxq2x36U7p1vDRV7HO2IwTZgmycracLxPEJI49wu4g==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
@@ -1018,13 +1018,13 @@
|
||||
}
|
||||
},
|
||||
"@playwright/test": {
|
||||
"version": "1.26.0",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.26.0.tgz",
|
||||
"integrity": "sha512-D24pu1k/gQw3Lhbpc38G5bXlBjGDrH5A52MsrH12wz6ohGDeQ+aZg/JFSEsT/B3G8zlJe/EU4EkJK74hpqsjEg==",
|
||||
"version": "1.30.0",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.30.0.tgz",
|
||||
"integrity": "sha512-SVxkQw1xvn/Wk/EvBnqWIq6NLo1AppwbYOjNLmyU0R1RoQ3rLEBtmjTnElcnz8VEtn11fptj1ECxK0tgURhajw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*",
|
||||
"playwright-core": "1.26.0"
|
||||
"playwright-core": "1.30.0"
|
||||
}
|
||||
},
|
||||
"@sideway/address": {
|
||||
@@ -1055,20 +1055,20 @@
|
||||
"dev": true
|
||||
},
|
||||
"@umbraco/json-models-builders": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/json-models-builders/-/json-models-builders-1.0.3.tgz",
|
||||
"integrity": "sha512-NNBIP9ZXXZvxanmG5OvE+Ppc2ObSLLUyBbwZiPtwerFxdlnYuUYA6qCq6mj7vx3na6MOQTPZMAiNFEaM0V9xFw==",
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/json-models-builders/-/json-models-builders-1.0.5.tgz",
|
||||
"integrity": "sha512-14xowT8oiW9+DQVOoundRPvcvnNrU0Ey+06G/q/iZyUnqaNRu/i5nUqcbUZGdv6VBCdxaxq2H3WwtSET3gtneA==",
|
||||
"requires": {
|
||||
"camelize": "^1.0.0",
|
||||
"faker": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"@umbraco/playwright-testhelpers": {
|
||||
"version": "1.0.21",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-1.0.21.tgz",
|
||||
"integrity": "sha512-JfE1MvKc7LEVayF9AX4Ctmx8c6+M+m6+mV7g7QSOYPO7ky/PSlzVvI9S9S7vcpuwLB2Vp4NE9PcXaXUGEvNCnw==",
|
||||
"version": "1.0.22",
|
||||
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-1.0.22.tgz",
|
||||
"integrity": "sha512-hFqqQvEIylagfqFyhQ2rSyYlUP+xpWA5lkhJjkpb2qpxkIISxjwC/FYJTJGvcoBHuUaZrjsSv4lM2aJy2ZWHMA==",
|
||||
"requires": {
|
||||
"@umbraco/json-models-builders": "^1.0.2",
|
||||
"@umbraco/json-models-builders": "^1.0.5",
|
||||
"camelize": "^1.0.0",
|
||||
"faker": "^4.1.0",
|
||||
"form-data": "^4.0.0",
|
||||
@@ -1503,9 +1503,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"playwright-core": {
|
||||
"version": "1.26.0",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.26.0.tgz",
|
||||
"integrity": "sha512-p8huU8eU4gD3VkJd3DA1nA7R3XA6rFvFL+1RYS96cSljCF2yJE9CWEHTPF4LqX8KN9MoWCrAfVKP5381X3CZqg==",
|
||||
"version": "1.30.0",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.30.0.tgz",
|
||||
"integrity": "sha512-7AnRmTCf+GVYhHbLJsGUtskWTE33SwMZkybJ0v6rqR1boxq2x36U7p1vDRV7HO2IwTZgmycracLxPEJI49wu4g==",
|
||||
"dev": true
|
||||
},
|
||||
"prompt": {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"createTest": "node createTest.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "^1.19.2",
|
||||
"@playwright/test": "^1.29",
|
||||
"typescript": "^4.8.3",
|
||||
"tslib": "^2.4.0",
|
||||
"del": "^6.0.0",
|
||||
@@ -19,8 +19,8 @@
|
||||
"wait-on": "^6.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@umbraco/json-models-builders": "^1.0.3",
|
||||
"@umbraco/playwright-testhelpers": "^1.0.21",
|
||||
"@umbraco/json-models-builders": "^1.0.5",
|
||||
"@umbraco/playwright-testhelpers": "^1.0.22",
|
||||
"camelize": "^1.0.0",
|
||||
"faker": "^4.1.0",
|
||||
"form-data": "^4.0.0",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -259,7 +259,9 @@ test.describe('BlockGridEditorDataTypeBlock', () => {
|
||||
await umbracoApi.documentTypes.ensureNameNotExists(elementNameThree);
|
||||
});
|
||||
|
||||
test('can create a block grid datatype with multiple groups and multiple element in each group', async ({page, umbracoApi, umbracoUi}) => {
|
||||
test('can create a block grid datatype with multiple groups and multiple element in each group', async ({page, umbracoApi, umbracoUi},testInfo) => {
|
||||
await testInfo.slow();
|
||||
|
||||
const GroupOne = 'GroupOne';
|
||||
const elementNameFourth = 'FourthElement';
|
||||
const elementFourthAlias = AliasHelper.toAlias(elementNameFourth);
|
||||
|
||||
@@ -4,7 +4,6 @@ import {MediaBuilder, MediaFileBuilder, StylesheetBuilder} from "@umbraco/json-m
|
||||
import {BlockListDataTypeBuilder} from "@umbraco/json-models-builders/dist/lib/builders/dataTypes";
|
||||
|
||||
test.describe('BlockListEditorDataType', () => {
|
||||
const documentName = 'DocumentName'
|
||||
const blockListName = 'BlockListTest';
|
||||
const elementName = 'TestElement';
|
||||
|
||||
@@ -13,13 +12,11 @@ test.describe('BlockListEditorDataType', () => {
|
||||
test.beforeEach(async ({page, umbracoApi, umbracoUi}, testInfo) => {
|
||||
await umbracoApi.report.report(testInfo);
|
||||
await umbracoApi.login();
|
||||
await umbracoApi.documentTypes.ensureNameNotExists(documentName);
|
||||
await umbracoApi.dataTypes.ensureNameNotExists(blockListName);
|
||||
await umbracoApi.documentTypes.ensureNameNotExists(elementName);
|
||||
});
|
||||
|
||||
test.afterEach(async({page, umbracoApi, umbracoUi}) => {
|
||||
await umbracoApi.documentTypes.ensureNameNotExists(documentName);
|
||||
await umbracoApi.dataTypes.ensureNameNotExists(blockListName);
|
||||
await umbracoApi.documentTypes.ensureNameNotExists(elementName);
|
||||
})
|
||||
@@ -152,7 +149,10 @@ test.describe('BlockListEditorDataType', () => {
|
||||
await expect(page.locator('[block-config-model="block"]')).toHaveCount(1);
|
||||
});
|
||||
|
||||
test('can edit a block list editor', async ({page, umbracoApi, umbracoUi}) => {
|
||||
test('can edit a block list editor', async ({page, umbracoApi, umbracoUi}, testInfo) => {
|
||||
// We need to increase the timeout because the test is taking too long to end
|
||||
await testInfo.slow()
|
||||
|
||||
const elementNameTwo = 'SecondElement';
|
||||
const elementTwoAlias = AliasHelper.toAlias(elementNameTwo);
|
||||
const stylesheetName = 'TestStyleSheet';
|
||||
@@ -160,7 +160,7 @@ test.describe('BlockListEditorDataType', () => {
|
||||
const imageName = "Umbraco";
|
||||
const umbracoFileValue = {"src": "Umbraco.png"};
|
||||
const fileName = "Umbraco.png";
|
||||
const path = fileName;
|
||||
const path = 'mediaLibrary/' + fileName;
|
||||
const mimeType = "image/png";
|
||||
|
||||
await umbracoApi.documentTypes.ensureNameNotExists(elementNameTwo);
|
||||
|
||||
@@ -14,7 +14,7 @@ test.describe('media File Types', () => {
|
||||
test('create Article', async ({page, umbracoApi, umbracoUi}) => {
|
||||
const articleName = "Article";
|
||||
const fileName = "Article.pdf";
|
||||
const path = fileName;
|
||||
const path = 'mediaLibrary/' + fileName;
|
||||
const mimeType = "application/pdf";
|
||||
await umbracoApi.media.ensureNameNotExists(articleName);
|
||||
|
||||
@@ -32,7 +32,7 @@ test.describe('media File Types', () => {
|
||||
test('create Audio', async ({page, umbracoApi, umbracoUi}) => {
|
||||
const audioName = "Audio";
|
||||
const fileName = "Audio.mp3";
|
||||
const path = fileName;
|
||||
const path = 'mediaLibrary/' + fileName;
|
||||
const mimeType = "audio/mp3"
|
||||
await umbracoApi.media.ensureNameNotExists(audioName);
|
||||
|
||||
@@ -50,7 +50,7 @@ test.describe('media File Types', () => {
|
||||
test('create File', async ({page, umbracoApi, umbracoUi}) => {
|
||||
const fileItemName = "File";
|
||||
const fileName = "File.txt";
|
||||
const path = fileName;
|
||||
const path = 'mediaLibrary/' + fileName;
|
||||
const mimeType = "*/*";
|
||||
await umbracoApi.media.ensureNameNotExists(fileItemName);
|
||||
|
||||
@@ -84,7 +84,7 @@ test.describe('media File Types', () => {
|
||||
const imageName = "Umbraco";
|
||||
const umbracoFileValue = {"src": "Umbraco.png"};
|
||||
const fileName = "Umbraco.png"
|
||||
const path = fileName;
|
||||
const path = 'mediaLibrary/' + fileName;
|
||||
const mimeType = "image/png";
|
||||
await umbracoApi.media.ensureNameNotExists(imageName);
|
||||
|
||||
@@ -102,7 +102,7 @@ test.describe('media File Types', () => {
|
||||
test('create VectorGraphics(SVG)', async ({page, umbracoApi, umbracoUi}) => {
|
||||
const vectorGraphicsName = 'VectorGraphics';
|
||||
const fileName = "VectorGraphics.svg";
|
||||
const path = fileName;
|
||||
const path = 'mediaLibrary/' + fileName;
|
||||
const mimeType = "image/svg+xml";
|
||||
await umbracoApi.media.ensureNameNotExists(vectorGraphicsName);
|
||||
|
||||
@@ -120,7 +120,7 @@ test.describe('media File Types', () => {
|
||||
test('create Video', async ({page, umbracoApi, umbracoUi}) => {
|
||||
const videoName = "Video";
|
||||
const fileName = "Video.mp4";
|
||||
const path = fileName;
|
||||
const path = 'mediaLibrary/' + fileName;
|
||||
const mimeType = "video/mp4";
|
||||
await umbracoApi.media.ensureNameNotExists(videoName);
|
||||
|
||||
@@ -367,7 +367,7 @@ test.describe('media File Types', () => {
|
||||
const fileItemNameOld = "File";
|
||||
const fileItemNameNew = "UpdatedFile";
|
||||
const fileName = "File.txt";
|
||||
const path = fileName;
|
||||
const path = 'mediaLibrary/' + fileName;
|
||||
const mimeType = "*/*";
|
||||
await umbracoApi.media.ensureNameNotExists(fileItemNameOld);
|
||||
|
||||
@@ -389,7 +389,7 @@ test.describe('media File Types', () => {
|
||||
test('Update existing File with new File', async ({page, umbracoApi, umbracoUi}) => {
|
||||
const fileItemName = "File";
|
||||
const fileName = "File.txt";
|
||||
const path = fileName;
|
||||
const path = 'mediaLibrary/' + fileName;
|
||||
const fileNameNew = "UpdatedFile.txt"
|
||||
const pathNew = "./fixtures/mediaLibrary/" + fileNameNew;
|
||||
const mimeType = "*/*";
|
||||
|
||||
Reference in New Issue
Block a user