Add 'edit' dir to template testing

Some small modifications were needed to make the tests pass.

Change-Id: Ic4ebd6b3df70c1df86183003c542b84b7dacee9c
This commit is contained in:
Kasper Nilsson 2018-02-12 17:37:35 -08:00
parent 7cfe3deb88
commit b6805a0d6e
2 changed files with 20 additions and 1 deletions

View File

@ -124,6 +124,7 @@ DIRECTORIES = [
"change-list",
"core",
"diff",
"edit",
"plugins",
"settings",
"shared",

View File

@ -74,21 +74,33 @@
}
},
/**
* @param {string=} opt_path
*/
openOpenDialog(opt_path) {
if (opt_path) { this._path = opt_path; }
return this._showDialog(this.$.openDialog);
},
/**
* @param {string=} opt_path
*/
openDeleteDialog(opt_path) {
if (opt_path) { this._path = opt_path; }
return this._showDialog(this.$.deleteDialog);
},
/**
* @param {string=} opt_path
*/
openRenameDialog(opt_path) {
if (opt_path) { this._path = opt_path; }
return this._showDialog(this.$.renameDialog);
},
/**
* @param {string=} opt_path
*/
openRestoreDialog(opt_path) {
if (opt_path) { this._path = opt_path; }
return this._showDialog(this.$.restoreDialog);
@ -111,7 +123,7 @@
/**
* Given a dom event, gets the dialog that lies along this event path.
* @param {!Event} e
* @return {!Element}
* @return {!Element|undefined}
*/
_getDialogFromEvent(e) {
return Polymer.dom(e).path.find(element => {
@ -129,7 +141,13 @@
});
},
/**
* @param {Element|undefined} dialog
* @param {boolean=} clearInputs
*/
_closeDialog(dialog, clearInputs) {
if (!dialog) { return; }
if (clearInputs) {
// Dialog may have autocompletes and plain inputs -- as these have
// different properties representing their bound text, it is easier to