Merge pull request #8147 from umbraco/v8/feature/stabilising-acceptance-tests
Stabilising acceptance tests + Bugfix for hanging saves of media.
This commit is contained in:
@@ -6,5 +6,6 @@
|
||||
"username": "<insert username/email in cypress.env.json>",
|
||||
"password": "<insert password in cypress.env.json>"
|
||||
},
|
||||
"supportFile": "cypress/support/index.ts"
|
||||
"supportFile": "cypress/support/index.ts",
|
||||
"videoUploadOnPasses" : false
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/// <reference types="Cypress" />
|
||||
import {DocumentTypeBuilder, TemplateBuilder} from "umbraco-cypress-testhelpers";
|
||||
|
||||
context('Templates', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -6,28 +8,50 @@ context('Templates', () => {
|
||||
});
|
||||
|
||||
it('Create template', () => {
|
||||
const name = "Test template";
|
||||
const name = "Test template";
|
||||
|
||||
cy.umbracoEnsureTemplateNameNotExists(name);
|
||||
cy.umbracoEnsureTemplateNameNotExists(name);
|
||||
|
||||
cy.umbracoSection('settings');
|
||||
cy.get('li .umb-tree-root:contains("Settings")').should("be.visible");
|
||||
cy.umbracoSection('settings');
|
||||
cy.get('li .umb-tree-root:contains("Settings")').should("be.visible");
|
||||
|
||||
cy.umbracoTreeItem("settings", ["Templates"]).rightclick();
|
||||
cy.umbracoTreeItem("settings", ["Templates"]).rightclick();
|
||||
|
||||
cy.umbracoContextMenuAction("action-create").click();
|
||||
cy.umbracoContextMenuAction("action-create").click();
|
||||
|
||||
//Type name
|
||||
cy.umbracoEditorHeaderName(name);
|
||||
//Type name
|
||||
cy.umbracoEditorHeaderName(name);
|
||||
|
||||
//Save
|
||||
cy.get('.btn-success').click();
|
||||
//Save
|
||||
cy.get("form[name='contentForm']").submit();
|
||||
|
||||
//Assert
|
||||
cy.umbracoSuccessNotification().should('be.visible');
|
||||
//Assert
|
||||
cy.umbracoSuccessNotification().should('be.visible');
|
||||
|
||||
//Clean up
|
||||
cy.umbracoEnsureTemplateNameNotExists(name);
|
||||
//Clean up
|
||||
cy.umbracoEnsureTemplateNameNotExists(name);
|
||||
});
|
||||
|
||||
it('Delete template', () => {
|
||||
const name = "Test template";
|
||||
cy.umbracoEnsureTemplateNameNotExists(name);
|
||||
|
||||
const template = new TemplateBuilder()
|
||||
.withName(name)
|
||||
.build();
|
||||
|
||||
cy.saveTemplate(template);
|
||||
|
||||
cy.umbracoSection('settings');
|
||||
cy.get('li .umb-tree-root:contains("Settings")').should("be.visible");
|
||||
|
||||
cy.umbracoTreeItem("settings", ["Templates", name]).rightclick();
|
||||
cy.umbracoContextMenuAction("action-delete").click();
|
||||
|
||||
cy.umbracoButtonByLabelKey("general_ok").click();
|
||||
|
||||
cy.contains(name).should('not.exist');
|
||||
|
||||
cy.umbracoEnsureTemplateNameNotExists(name);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
"devDependencies": {
|
||||
"cross-env": "^7.0.2",
|
||||
"ncp": "^2.0.0",
|
||||
"cypress": "^4.5.0",
|
||||
"umbraco-cypress-testhelpers": "1.0.0-beta-38"
|
||||
"cypress": "^4.6.0",
|
||||
"umbraco-cypress-testhelpers": "1.0.0-beta-39"
|
||||
},
|
||||
"dependencies": {
|
||||
"typescript": "^3.9.2"
|
||||
|
||||
@@ -882,22 +882,15 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
// they require.
|
||||
|
||||
// These can be run side by side in parallel.
|
||||
using (_contentStore.GetScopedWriteLock(_scopeProvider))
|
||||
{
|
||||
NotifyLocked(new[] { new ContentCacheRefresher.JsonPayload(0, null, TreeChangeTypes.RefreshAll) }, out _, out _);
|
||||
}
|
||||
|
||||
Parallel.Invoke(
|
||||
() =>
|
||||
{
|
||||
using (_contentStore.GetScopedWriteLock(_scopeProvider))
|
||||
{
|
||||
NotifyLocked(new[] { new ContentCacheRefresher.JsonPayload(0, null, TreeChangeTypes.RefreshAll) }, out _, out _);
|
||||
}
|
||||
},
|
||||
() =>
|
||||
{
|
||||
using (_mediaStore.GetScopedWriteLock(_scopeProvider))
|
||||
{
|
||||
NotifyLocked(new[] { new MediaCacheRefresher.JsonPayload(0, null, TreeChangeTypes.RefreshAll) }, out _);
|
||||
}
|
||||
});
|
||||
using (_mediaStore.GetScopedWriteLock(_scopeProvider))
|
||||
{
|
||||
NotifyLocked(new[] { new MediaCacheRefresher.JsonPayload(0, null, TreeChangeTypes.RefreshAll) }, out _);
|
||||
}
|
||||
}
|
||||
|
||||
((PublishedSnapshot)CurrentPublishedSnapshot)?.Resync();
|
||||
|
||||
Reference in New Issue
Block a user