From 035b5beba737f97ed80c6eb473b18c7fc0247f3f Mon Sep 17 00:00:00 2001 From: Mole Date: Wed, 7 Oct 2020 15:19:56 +0200 Subject: [PATCH] Click the content area in create template test instead of making edit Tests no longer fail with a weird The process cannot access the file, or well at least not in the 10 recurrent tries i just did. --- .../cypress/integration/Settings/templates.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts index aff1c38093..e315a74c8a 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts +++ b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts @@ -27,12 +27,14 @@ context('Templates', () => { createTemplate(); //Type name cy.umbracoEditorHeaderName(name); - /* 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_text-input').type("var num = 5;", {force:true} ); - - //Save + /* + Click the content area, if we don't do this we wont get redirected + to the new edit url, this will cause the test to save two copies at best + worst case, we'll get an error "The process cannot access the file" on the + template. + */ + cy.get('.ace_content').click(); + // Save cy.get('.btn-success').click(); //Assert