Bugfix for issue with hanging saves. + Fix for double post of save templates

This commit is contained in:
Bjarke Berg
2020-05-22 10:46:13 +02:00
parent c36495ac9c
commit 5b7f1227f9
3 changed files with 23 additions and 30 deletions

View File

@@ -6,28 +6,28 @@ 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);
});
});

View File

@@ -6,7 +6,7 @@
"devDependencies": {
"cross-env": "^7.0.2",
"ncp": "^2.0.0",
"cypress": "^4.5.0",
"cypress": "^4.6.0",
"umbraco-cypress-testhelpers": "1.0.0-beta-38"
},
"dependencies": {

View File

@@ -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();