fix(Navbar Settings): reload page after save (#26274)

* fix(Navbar Settings): reload page after save

* test: file uploader flake

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
This commit is contained in:
Raffael Meyer 2024-05-01 15:20:04 +02:00 committed by GitHub
parent 0a34f8b28e
commit 8eb8c64fbd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -5,6 +5,7 @@ context("FileUploader", () => {
beforeEach(() => {
cy.visit("/app");
cy.wait(2000); // workspace can load async and clear active dialog
});
function open_upload_dialog() {
@ -13,7 +14,7 @@ context("FileUploader", () => {
.then((frappe) => {
new frappe.ui.FileUploader();
});
cy.wait(1000);
cy.wait(500);
}
it("upload dialog api works", () => {

View File

@ -1,4 +1,8 @@
// Copyright (c) 2020, Frappe Technologies and contributors
// For license information, please see license.txt
frappe.ui.form.on("Navbar Settings", {});
frappe.ui.form.on("Navbar Settings", {
after_save: function (frm) {
frappe.ui.toolbar.clear_cache();
},
});