diff --git a/src/main/resources/lib/users.js b/src/main/resources/lib/users.js index 438fa6b00..dee4475a0 100644 --- a/src/main/resources/lib/users.js +++ b/src/main/resources/lib/users.js @@ -57,7 +57,7 @@ exports.update = function updateUser(params) { }; exports.updatePwd = function (key, pwd) { - var password = pwd.replace(/\s/g, ''); + const password = pwd ? pwd.replace(/\s/g, '') : null; try { authLib.changePassword({ userKey: key, diff --git a/src/main/resources/services/graphql/schema/mutation.js b/src/main/resources/services/graphql/schema/mutation.js index 03626530a..0632d825f 100644 --- a/src/main/resources/services/graphql/schema/mutation.js +++ b/src/main/resources/services/graphql/schema/mutation.js @@ -72,7 +72,7 @@ module.exports = schemaGenerator.createObjectType({ type: graphQl.GraphQLBoolean, args: { key: graphQl.nonNull(graphQl.GraphQLString), - password: graphQl.nonNull(graphQl.GraphQLString) + password: graphQl.GraphQLString, }, resolve: function(env) { return users.updatePwd(env.args.key, env.args.password); diff --git a/testing/page_objects/browsepanel/new.principal.dialog.js b/testing/page_objects/browsepanel/new.principal.dialog.js index e19bfed3b..300db9a8f 100644 --- a/testing/page_objects/browsepanel/new.principal.dialog.js +++ b/testing/page_objects/browsepanel/new.principal.dialog.js @@ -41,10 +41,11 @@ class NewPrincipalDialog extends Page { async waitForDialogLoaded() { try { - return await this.waitForElementDisplayed(XPATH.container, appConst.mediumTimeout); + await this.waitForElementDisplayed(XPATH.container, appConst.mediumTimeout); + await this.pause(500); } catch (err) { - await this.saveScreenshot('err_principal_dialog_load'); - throw new Error("New Principal dialog is not loaded in: " + appConst.mediumTimeout + " ms " + err); + let screenshot = await this.saveScreenshotUniqueName('err_principal_dialog_load'); + throw new Error(`New Principal dialog is not loaded screenshot${screenshot}: ` + err); } }