Skip to content

Commit 35cfcfc

Browse files
committed
Fixed acceptance tests to use v9 templates
1 parent 9b2acd0 commit 35cfcfc

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

src/Umbraco.Tests.AcceptanceTest/cypress/integration/Content/urlpicker.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ context('Url Picker', () => {
1212
});
1313

1414
it('Test Url Picker', () => {
15-
15+
1616
const urlPickerDocTypeName = 'Url Picker Test';
17-
const pickerDocTypeAlias = AliasHelper.toAlias(urlPickerDocTypeName);
17+
const pickerDocTypeAlias = AliasHelper.toAlias(urlPickerDocTypeName);
1818
cy.umbracoEnsureDocumentTypeNameNotExists(urlPickerDocTypeName);
1919
cy.deleteAllContent();
2020
const pickerDocType = new DocumentTypeBuilder()
@@ -31,8 +31,7 @@ context('Url Picker', () => {
3131
.build();
3232

3333
cy.saveDocumentType(pickerDocType);
34-
cy.editTemplate(urlPickerDocTypeName, '@inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.UrlPickerTest>' +
35-
'\n@using ContentModels = Umbraco.Web.PublishedModels;' +
34+
cy.editTemplate(urlPickerDocTypeName, '@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<UrlPickerTest>' +
3635
'\n@{' +
3736
'\n Layout = null;' +
3837
'\n}' +
@@ -61,13 +60,13 @@ context('Url Picker', () => {
6160
//Assert
6261
cy.get('.umb-notifications__notifications > .alert-error').should('not.exist');
6362
//Editing template with some content
64-
63+
6564
//Testing if the edits match the expected results
6665
const expected = '<a href="/">UrlPickerContent</a>';
67-
cy.umbracoVerifyRenderedViewContent('/', expected, true).should('be.true');
66+
cy.umbracoVerifyRenderedViewContent('/', expected, true).should('be.true');
6867
//clean
6968
cy.umbracoEnsureDocumentTypeNameNotExists(urlPickerDocTypeName);
7069
cy.umbracoEnsureTemplateNameNotExists(urlPickerDocTypeName);
7170

7271
});
73-
});
72+
});

src/Umbraco.Tests.AcceptanceTest/cypress/integration/DataTypes/dataTypes.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,11 @@ context('DataTypes', () => {
3232
cy.umbracoTreeItem("content", [name]).click();
3333
//Pick a colour
3434
cy.get('.btn-000000').click();
35-
//Save
35+
//Save
3636
cy.umbracoButtonByLabelKey('buttons_saveAndPublish').click();
3737
cy.umbracoSuccessNotification().should('be.visible');
3838
//Editing template with some content
39-
cy.editTemplate(name, '@inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.ApprovedColourTest>' +
40-
'\n@using ContentModels = Umbraco.Web.PublishedModels;' +
39+
cy.editTemplate(name, '@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ApprovedColourTest>' +
4140
'\n@{' +
4241
'\n Layout = null;' +
4342
'\n}' +
@@ -49,7 +48,7 @@ context('DataTypes', () => {
4948

5049
//Pick another colour to verify both work
5150
cy.get('.btn-FF0000').click();
52-
//Save
51+
//Save
5352
cy.umbracoButtonByLabelKey('buttons_saveAndPublish').click();
5453
cy.umbracoSuccessNotification().should('be.visible');
5554
//Assert
@@ -64,7 +63,7 @@ context('DataTypes', () => {
6463

6564
// it('Tests Checkbox List', () => {
6665
// const name = 'CheckBox List';
67-
// const alias = AliasHelper.toAlias(name);
66+
// const alias = AliasHelper.toAlias(name);
6867

6968
// cy.umbracoEnsureDocumentTypeNameNotExists(name);
7069
// cy.umbracoEnsureDataTypeNameNotExists(name);
@@ -85,7 +84,7 @@ context('DataTypes', () => {
8584
// //Save
8685
// cy.umbracoButtonByLabelKey('buttons_saveAndPublish').click();
8786
// cy.umbracoSuccessNotification().should('be.visible');
88-
87+
8988
// //Edit template with content
9089
// cy.editTemplate(name, '@inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.CheckboxList>' +
9190
// '\n@using ContentModels = Umbraco.Web.PublishedModels;' +
@@ -94,4 +93,4 @@ context('DataTypes', () => {
9493
// '\n}' +
9594
// '\n<p>@Model.UmbracoTest</p>');
9695
// });
97-
});
96+
});

0 commit comments

Comments
 (0)