diff --git a/plugins/NewTest.java b/plugins/NewTest.java index 14e0d0f..62dad3a 100644 --- a/plugins/NewTest.java +++ b/plugins/NewTest.java @@ -497,18 +497,20 @@ public class NewTest extends javax.swing.JPanel { "Please remove forbidden chars from the tests suite name; allowed are: "+ allowedChars.replace("\\", "").replace("*", "")); return false; } - if(!(txtContactName.getText().matches(ALLOWED_CHARSET3) - )){ - SwingUtils.showMessage(this, "checkDataFields()", - "Please provide a valid user name"); - return false; - } else{ //check if the user name is in LDAP *FOR THE MOMENT IT DOES NOT WORK* - if ( !userExists(txtContactName.getText())){ - OptionResult ret = SwingUtils.showOption(this, "checkDataFields()", - "Could not find user name "+txtContactName.getText() + "\nDo you want to continue generating the test?", OptionType.YesNoCancel); - if(ret != OptionResult.Yes){ - return false; - } + if (sType == TypeOfNewFile.Test){ + if(!(txtContactName.getText().matches(ALLOWED_CHARSET3) + )){ + SwingUtils.showMessage(this, "checkDataFields()", + "Please provide a valid user name"); + return false; + } else{ //check if the user name is in LDAP *FOR THE MOMENT IT DOES NOT WORK* + if ( !userExists(txtContactName.getText())){ + OptionResult ret = SwingUtils.showOption(this, "checkDataFields()", + "Could not find user name "+txtContactName.getText() + "\nDo you want to continue generating the test?", OptionType.YesNoCancel); + if(ret != OptionResult.Yes){ + return false; + } + } } } //check parameters table