Fixes for ace editor in cypress tests

This commit is contained in:
Bjarke Berg
2020-08-20 09:42:42 +02:00
parent 1512496f4f
commit 67c25ad39b
3 changed files with 13 additions and 11 deletions

View File

@@ -104,9 +104,9 @@ context('Partial View Macro Files', () => {
.withName(name)
.withContent("@inherits Umbraco.Web.Macros.PartialViewMacroPage")
.build();
cy.savePartialViewMacro(partialViewMacro);
// Navigate to settings
cy.umbracoSection('settings');
cy.get('li .umb-tree-root:contains("Settings")').should("be.visible");
@@ -133,7 +133,7 @@ context('Partial View Macro Files', () => {
.withName(name)
.withContent("@inherits Umbraco.Web.Macros.PartialViewMacroPage")
.build();
cy.savePartialViewMacro(partialViewMacro);
// Navigate to settings
@@ -142,7 +142,7 @@ context('Partial View Macro Files', () => {
cy.umbracoTreeItem("settings", ["Partial View Macro Files", fullName]).click();
// Type an edit
cy.get('.ace_content').type(" // test");
cy.get('.ace_text-input').type(" // test", {force:true} );
// Save
cy.get('.btn-success').click();

View File

@@ -107,11 +107,11 @@ context('Partial Views', () => {
cy.umbracoContextMenuAction("action-delete").click();
cy.umbracoButtonByLabelKey("general_ok").click();
// Assert
// Assert
cy.contains(fileName).should('not.exist');
cy.umbracoPartialViewExists(fileName).then(exists => { expect(exists).to.be.false; });
// Clean
// Clean
cy.umbracoEnsurePartialViewNameNotExists(fileName);
});
@@ -132,7 +132,7 @@ context('Partial Views', () => {
// Open partial view
cy.umbracoTreeItem("settings", ["Partial Views", fileName]).click();
// Edit
cy.get('.ace_content').type("var num = 5;");
cy.get('.ace_text-input').type("var num = 5;", {force:true} );
cy.get('.btn-success').click();
// Assert

View File

@@ -30,7 +30,7 @@ context('Templates', () => {
/* Make an edit, if you don't the file will be create twice,
only happens in testing though, probably because the test is too fast
Certifiably mega wonk regardless */
cy.get('.ace_content').type("var num = 5;");
cy.get('.ace_text-input').type("var num = 5;", {force:true} );
//Save
cy.get('.btn-success').click();
@@ -59,10 +59,11 @@ context('Templates', () => {
// Open partial view
cy.umbracoTreeItem("settings", ["Templates", name]).click();
// Edit
cy.get('.ace_content').type(edit);
cy.get('.ace_text-input').type(edit, {force:true} );
// Navigate away
cy.umbracoSection('content');
// Click stay button
// Click stay button
cy.get('umb-button[label="Stay"] button:enabled').click();
// Assert
@@ -91,7 +92,8 @@ context('Templates', () => {
// Open partial view
cy.umbracoTreeItem("settings", ["Templates", name]).click();
// Edit
cy.get('.ace_content').type(edit);
cy.get('.ace_text-input').type(edit, {force:true} );
// Navigate away
cy.umbracoSection('content');
// Click discard