Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test.describe('Script tests', () => {
await umbracoApi.script.ensureNameNotExists(scriptName);
});

test('can create a empty script', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a empty script', async ({umbracoApi, umbracoUi}) => {
// Act
await umbracoUi.script.clickActionsMenuAtRoot();
await umbracoUi.script.clickCreateButton();
Expand All @@ -30,7 +30,7 @@ test.describe('Script tests', () => {
await umbracoUi.script.isScriptTreeItemVisibile(scriptName);
});

test('can create a script with content', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a script with content', async ({umbracoApi, umbracoUi}) => {
// Arrange
const scriptContent = 'TestContent';

Expand All @@ -51,7 +51,7 @@ test.describe('Script tests', () => {
await umbracoUi.script.isScriptTreeItemVisibile(scriptName);
});

test('can update a script', async ({umbracoApi, umbracoUi}) => {
test.skip('can update a script', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.script.create(scriptName, 'test');
const updatedScriptContent = 'const test = {\r\n script = \u0022Test\u0022,\r\n extension = \u0022.js\u0022,\r\n scriptPath: function() {\r\n return this.script \u002B this.extension;\r\n }\r\n};\r\n';
Expand All @@ -67,7 +67,7 @@ test.describe('Script tests', () => {
expect(updatedScript.content).toBe(updatedScriptContent);
});

test('can delete a script', async ({umbracoApi, umbracoUi}) => {
test.skip('can delete a script', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.script.create(scriptName, '');

Expand All @@ -82,7 +82,7 @@ test.describe('Script tests', () => {
await umbracoUi.script.isScriptTreeItemVisibile(scriptName, false);
});

test('can rename a script', async ({umbracoApi, umbracoUi}) => {
test.skip('can rename a script', async ({umbracoApi, umbracoUi}) => {
// Arrange
const wrongScriptName = 'WrongTestScript.js';
await umbracoApi.script.create(wrongScriptName, '');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test.describe('Script tests', () => {
await umbracoApi.script.ensureNameNotExists(scriptFolderName);
});

test('can create a folder', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a folder', async ({umbracoApi, umbracoUi}) => {
// Act
await umbracoUi.script.clickActionsMenuAtRoot();
await umbracoUi.script.createFolder(scriptFolderName);
Expand All @@ -27,7 +27,7 @@ test.describe('Script tests', () => {
await umbracoUi.script.isScriptTreeItemVisibile(scriptFolderName);
});

test('can delete a folder', async ({umbracoApi, umbracoUi}) => {
test.skip('can delete a folder', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.script.createFolder(scriptFolderName);

Expand All @@ -42,7 +42,7 @@ test.describe('Script tests', () => {
await umbracoUi.script.isScriptTreeItemVisibile(scriptFolderName, false);
});

test('can create a script in a folder', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a script in a folder', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.script.createFolder(scriptFolderName);
const scriptContent = 'const test = {\r\n script = \u0022Test\u0022,\r\n extension = \u0022.js\u0022,\r\n scriptPath: function() {\r\n return this.script \u002B this.extension;\r\n }\r\n};\r\n';
Expand All @@ -67,7 +67,7 @@ test.describe('Script tests', () => {
await umbracoUi.script.isScriptTreeItemVisibile(scriptName);
});

test('can create a folder in a folder', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a folder in a folder', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.script.createFolder(scriptFolderName);
const childFolderName = 'childFolderName';
Expand All @@ -86,7 +86,7 @@ test.describe('Script tests', () => {
await umbracoUi.script.isScriptTreeItemVisibile(childFolderName);
});

test('can create a folder in a folder in a folder', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a folder in a folder in a folder', async ({umbracoApi, umbracoUi}) => {
// Arrange
const childFolderName = 'ChildFolderName';
const childOfChildFolderName = 'ChildOfChildFolderName';
Expand All @@ -108,7 +108,7 @@ test.describe('Script tests', () => {
await umbracoUi.script.isScriptTreeItemVisibile(childOfChildFolderName);
});

test('can create a script in a folder in a folder', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a script in a folder in a folder', async ({umbracoApi, umbracoUi}) => {
// Arrange
const childFolderName = 'ChildFolderName';
await umbracoApi.script.createFolder(scriptFolderName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ test.describe('Stylesheets tests', () => {
await umbracoApi.stylesheet.ensureNameNotExists(stylesheetName);
});

test('can create a empty stylesheet', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a empty stylesheet', async ({umbracoApi, umbracoUi}) => {
// Act
await umbracoUi.stylesheet.clickActionsMenuAtRoot();
await umbracoUi.stylesheet.clickCreateButton();
Expand All @@ -32,7 +32,7 @@ test.describe('Stylesheets tests', () => {
await umbracoUi.stylesheet.isStylesheetTreeItemVisibile(stylesheetName);
});

test('can create a stylesheet with content', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a stylesheet with content', async ({umbracoApi, umbracoUi}) => {
// Arrange
const stylesheetContent = 'TestContent';

Expand All @@ -53,7 +53,7 @@ test.describe('Stylesheets tests', () => {
await umbracoUi.stylesheet.isStylesheetTreeItemVisibile(stylesheetName);
});

test('can create a new Rich Text Editor stylesheet file', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a new Rich Text Editor stylesheet file', async ({umbracoApi, umbracoUi}) => {
// Arrange
const stylesheetContent = '/**umb_name:' + styleName + '*/\n' + styleSelector + ' {\n\t' + styleStyles + '\n}';

Expand All @@ -74,7 +74,7 @@ test.describe('Stylesheets tests', () => {
await umbracoUi.stylesheet.isStylesheetTreeItemVisibile(stylesheetName);
});

test('can update a stylesheet', async ({umbracoApi, umbracoUi}) => {
test.skip('can update a stylesheet', async ({umbracoApi, umbracoUi}) => {
// Arrange
const stylesheetContent = '/**umb_name:' + styleName + '*/\n' + styleSelector + ' {\n\t' + styleStyles + '\n}';
await umbracoApi.stylesheet.create(stylesheetName, '', '/');
Expand All @@ -91,7 +91,7 @@ test.describe('Stylesheets tests', () => {
expect(stylesheetData.content).toEqual(stylesheetContent);
});

test('can delete a stylesheet', async ({umbracoApi, umbracoUi}) => {
test.skip('can delete a stylesheet', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.stylesheet.create(stylesheetName, '', '/');

Expand All @@ -106,7 +106,7 @@ test.describe('Stylesheets tests', () => {
await umbracoUi.stylesheet.isStylesheetTreeItemVisibile(stylesheetName, false);
});

test('can rename a stylesheet', async ({umbracoApi, umbracoUi}) => {
test.skip('can rename a stylesheet', async ({umbracoApi, umbracoUi}) => {
// Arrange
const wrongStylesheetName = 'WrongStylesheetName.css';
await umbracoApi.stylesheet.create(wrongStylesheetName, '', '/');
Expand All @@ -122,7 +122,7 @@ test.describe('Stylesheets tests', () => {
expect(await umbracoApi.stylesheet.doesNameExist(wrongStylesheetName)).toBeFalsy();
});

test('can edit rich text editor styles', async ({umbracoApi, umbracoUi}) => {
test.skip('can edit rich text editor styles', async ({umbracoApi, umbracoUi}) => {
// Arrange
const newStyleName = 'TestNewStyleName';
const newStyleSelector = 'h2';
Expand All @@ -143,7 +143,7 @@ test.describe('Stylesheets tests', () => {
expect(stylesheetData.content).toEqual(newStylesheetContent);
});

test('can remove rich text editor styles', async ({umbracoApi, umbracoUi}) => {
test.skip('can remove rich text editor styles', async ({umbracoApi, umbracoUi}) => {
// Arrange
const stylesheetContent = '/**umb_name:' + styleName + '*/\n' + styleSelector + ' {\n\t' + styleStyles + '\n}';
await umbracoApi.stylesheet.create(stylesheetName, stylesheetContent, '/');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test.describe('Stylesheets tests', () => {
await umbracoApi.stylesheet.ensureNameNotExists(stylesheetFolderName);
});

test('can create a folder', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a folder', async ({umbracoApi, umbracoUi}) => {
// Act
await umbracoUi.stylesheet.clickActionsMenuAtRoot();
await umbracoUi.stylesheet.createFolder(stylesheetFolderName);
Expand All @@ -27,7 +27,7 @@ test.describe('Stylesheets tests', () => {
await umbracoUi.stylesheet.isStylesheetTreeItemVisibile(stylesheetFolderName);
});

test('can delete a folder', async ({umbracoApi, umbracoUi}) => {
test.skip('can delete a folder', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.stylesheet.createFolder(stylesheetFolderName, '');

Expand All @@ -42,7 +42,7 @@ test.describe('Stylesheets tests', () => {
await umbracoUi.stylesheet.isStylesheetTreeItemVisibile(stylesheetFolderName, false);
});

test('can create a folder in a folder', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a folder in a folder', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.stylesheet.createFolder(stylesheetFolderName);
const childFolderName = 'ChildFolderName';
Expand All @@ -61,7 +61,7 @@ test.describe('Stylesheets tests', () => {
await umbracoUi.stylesheet.isStylesheetTreeItemVisibile(childFolderName);
});

test('can create a folder in a folder in a folder', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a folder in a folder in a folder', async ({umbracoApi, umbracoUi}) => {
// Arrange
const childFolderName = 'ChildFolderName';
const childOfChildFolderName = 'ChildOfChildFolderName';
Expand All @@ -83,7 +83,7 @@ test.describe('Stylesheets tests', () => {
await umbracoUi.stylesheet.isStylesheetTreeItemVisibile(childOfChildFolderName);
});

test('can create a stylesheet in a folder', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a stylesheet in a folder', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.stylesheet.createFolder(stylesheetFolderName);
const stylesheetContent = 'TestContent';
Expand All @@ -108,7 +108,7 @@ test.describe('Stylesheets tests', () => {
await umbracoUi.stylesheet.isStylesheetTreeItemVisibile(stylesheetName);
});

test('can create a stylesheet in a folder in a folder', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a stylesheet in a folder in a folder', async ({umbracoApi, umbracoUi}) => {
// Arrange
const childFolderName = 'ChildFolderName';
await umbracoApi.stylesheet.createFolder(stylesheetFolderName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test.describe('Template tests', () => {
await umbracoApi.template.ensureNameNotExists(templateName);
});

test('can create a template', async ({umbracoApi, umbracoUi}) => {
test.skip('can create a template', async ({umbracoApi, umbracoUi}) => {
// Act
await umbracoUi.template.clickActionsMenuAtRoot();
await umbracoUi.template.clickCreateButton();
Expand All @@ -29,7 +29,7 @@ test.describe('Template tests', () => {
await umbracoUi.template.isTemplateTreeItemVisibile(templateName);
});

test('can update content of a template', async ({umbracoApi, umbracoUi}) => {
test.skip('can update content of a template', async ({umbracoApi, umbracoUi}) => {
// Arrange
const updatedTemplateContent =
defaultTemplateContent + '\r\n' + '<p>AcceptanceTests</p>';
Expand All @@ -48,7 +48,7 @@ test.describe('Template tests', () => {
expect(updatedTemplate.content).toBe(updatedTemplateContent);
});

test('can rename a template', async ({umbracoApi, umbracoUi}) => {
test.skip('can rename a template', async ({umbracoApi, umbracoUi}) => {
// Arrange
const wrongTemplateName = 'WrongTemplateName';
const templateAlias = AliasHelper.toAlias(wrongTemplateName);
Expand All @@ -67,7 +67,7 @@ test.describe('Template tests', () => {
expect(templateData.name).toBe(templateName);
});

test('can delete a template', async ({umbracoApi, umbracoUi}) => {
test.skip('can delete a template', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.template.createDefaultTemplate(templateName);

Expand All @@ -82,7 +82,7 @@ test.describe('Template tests', () => {
await umbracoUi.template.isTemplateTreeItemVisibile(templateName, false);
});

test('can set a template as master template', async ({umbracoApi, umbracoUi}) => {
test.skip('can set a template as master template', async ({umbracoApi, umbracoUi}) => {
// Arrange
const childTemplateName = 'ChildTemplate';
await umbracoApi.template.ensureNameNotExists(childTemplateName);
Expand All @@ -108,7 +108,7 @@ test.describe('Template tests', () => {
await umbracoApi.template.ensureNameNotExists(childTemplateName);
});

test('can remove a master template', async ({umbracoApi, umbracoUi}) => {
test.skip('can remove a master template', async ({umbracoApi, umbracoUi}) => {
// Arrange
const childTemplateName = 'ChildTemplate';
const templateAlias = AliasHelper.toAlias(templateName);
Expand Down Expand Up @@ -173,7 +173,7 @@ test.describe('Template tests', () => {
expect(templateData.content).toBe(expectedTemplateContent);
});

test('can use query builder with Where statement for a template', async ({umbracoApi, umbracoUi}) => {
test.skip('can use query builder with Where statement for a template', async ({umbracoApi, umbracoUi}) => {
// Arrange
//Arrange
const propertyAliasValue = 'Name';
Expand Down Expand Up @@ -214,7 +214,7 @@ test.describe('Template tests', () => {
expect(templateData.content).toBe(expectedTemplateContent);
});

test('can insert sections - render child template into a template', async ({umbracoApi, umbracoUi}) => {
test.skip('can insert sections - render child template into a template', async ({umbracoApi, umbracoUi}) => {
// Arrange
const sectionType = 'Render child template';
const insertedContent = '@RenderBody()';
Expand All @@ -233,7 +233,7 @@ test.describe('Template tests', () => {
expect(templateData.content).toBe(templateContent);
});

test('can insert sections - render a named section into a template', async ({umbracoApi, umbracoUi}) => {
test.skip('can insert sections - render a named section into a template', async ({umbracoApi, umbracoUi}) => {
// Arrange
const sectionType = 'Render a named section';
const sectionName = 'TestSectionName';
Expand All @@ -253,7 +253,7 @@ test.describe('Template tests', () => {
expect(templateData.content).toBe(templateContent);
});

test('can insert sections - define a named section into a template', async ({umbracoApi, umbracoUi}) => {
test.skip('can insert sections - define a named section into a template', async ({umbracoApi, umbracoUi}) => {
// Arrange
const sectionType = 'Define a named section';
const sectionName = 'TestSectionName';
Expand All @@ -273,7 +273,7 @@ test.describe('Template tests', () => {
expect(templateData.content).toBe(templateContent);
});

test('can insert dictionary item into a template', async ({umbracoApi, umbracoUi}) => {
test.skip('can insert dictionary item into a template', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.template.createDefaultTemplate(templateName);
const dictionaryName = 'TestDictionary';
Expand All @@ -296,7 +296,7 @@ test.describe('Template tests', () => {
await umbracoApi.dictionary.ensureNameNotExists(dictionaryName);
});

test('can insert partial view into a template', async ({umbracoApi, umbracoUi}) => {
test.skip('can insert partial view into a template', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.template.createDefaultTemplate(templateName);
const partialViewName = 'TestPartialView';
Expand All @@ -317,7 +317,7 @@ test.describe('Template tests', () => {
expect(templateData.content).toBe(templateContent);
});

test('can insert value into a template', async ({umbracoApi, umbracoUi}) => {
test.skip('can insert value into a template', async ({umbracoApi, umbracoUi}) => {
// Arrange
await umbracoApi.template.createDefaultTemplate(templateName);
const systemFieldValue = 'createDate';
Expand All @@ -335,31 +335,31 @@ test.describe('Template tests', () => {
expect(templateData.content).toBe(templateContent);
});

// TODO: Remove skip when the front-end is ready. Currently the returned items count is not updated after choosing the root content.
test.skip('can show returned items in query builder ', async ({umbracoApi, umbracoUi}) => {
//Arrange
// Create content at root with a child
const documentTypeName = 'ParentDocumentType';
const childDocumentTypeName = 'ChildDocumentType';
const contentName = 'ContentName';
const childContentName = 'ChildContentName';
const childDocumentTypeId = await umbracoApi.documentType.createDefaultDocumentTypeWithAllowAsRoot(childDocumentTypeName);
const documentTypeId = await umbracoApi.documentType.createDocumentTypeWithAllowedChildNode(documentTypeName, childDocumentTypeId);
const contentId = await umbracoApi.document.createDefaultDocument(contentName, documentTypeId);
await umbracoApi.document.createDefaultDocumentWithParent(childContentName, childDocumentTypeId, contentId);
// Create template
await umbracoApi.template.createDefaultTemplate(templateName);
// TODO: Remove skip when the front-end is ready. Currently the returned items count is not updated after choosing the root content.
test.skip('can show returned items in query builder ', async ({umbracoApi, umbracoUi}) => {
// Arrange
// Create content at root with a child
const documentTypeName = 'ParentDocumentType';
const childDocumentTypeName = 'ChildDocumentType';
const contentName = 'ContentName';
const childContentName = 'ChildContentName';
const childDocumentTypeId = await umbracoApi.documentType.createDefaultDocumentTypeWithAllowAsRoot(childDocumentTypeName);
const documentTypeId = await umbracoApi.documentType.createDocumentTypeWithAllowedChildNode(documentTypeName, childDocumentTypeId);
const contentId = await umbracoApi.document.createDefaultDocument(contentName, documentTypeId);
await umbracoApi.document.createDefaultDocumentWithParent(childContentName, childDocumentTypeId, contentId);
// Create template
await umbracoApi.template.createDefaultTemplate(templateName);

//Act
await umbracoUi.template.goToTemplate(templateName);
await umbracoUi.template.clickQueryBuilderButton();
await umbracoUi.template.chooseRootContentInQueryBuilder('(' + contentName + ')');
// Act
await umbracoUi.template.goToTemplate(templateName);
await umbracoUi.template.clickQueryBuilderButton();
await umbracoUi.template.chooseRootContentInQueryBuilder('(' + contentName + ')');

// Assert
await umbracoUi.template.doesReturnedItemsHaveCount(1);
await umbracoUi.template.doesQueryResultHaveContentName(childContentName);
// Assert
await umbracoUi.template.doesReturnedItemsHaveCount(1);
await umbracoUi.template.doesQueryResultHaveContentName(childContentName);

// Clean
await umbracoApi.documentType.ensureNameNotExists(documentTypeName);
});
// Clean
await umbracoApi.documentType.ensureNameNotExists(documentTypeName);
});
});