fixed test attributes and typos
This commit is contained in:
parent
401419fb0e
commit
fe2d89ca49
4 changed files with 23 additions and 38 deletions
|
@ -91,7 +91,7 @@ public class LoginPage implements TemplateComposer {
|
||||||
gridData.verticalIndent = 10;
|
gridData.verticalIndent = 10;
|
||||||
final Label pwd = this.widgetFactory.labelLocalized(loginGroup, TEXT_PWD);
|
final Label pwd = this.widgetFactory.labelLocalized(loginGroup, TEXT_PWD);
|
||||||
pwd.setLayoutData(gridData);
|
pwd.setLayoutData(gridData);
|
||||||
final Text loginPassword = this.widgetFactory.passwordInput(loginGroup, TEXT_PWD);
|
final Text loginPassword = this.widgetFactory.passwordInput(loginGroup, TEXT_PWD.name, TEXT_PWD);
|
||||||
loginPassword.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false));
|
loginPassword.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, false));
|
||||||
|
|
||||||
final Composite buttons = new Composite(loginGroup, SWT.NONE);
|
final Composite buttons = new Composite(loginGroup, SWT.NONE);
|
||||||
|
|
|
@ -118,12 +118,13 @@ public final class TextFieldBuilder extends FieldBuilder<String> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final String testKey = (this.label != null) ? this.label.name : this.name;
|
||||||
final LocTextKey label = getARIALabel(builder);
|
final LocTextKey label = getARIALabel(builder);
|
||||||
final Text textInput = (this.isNumber)
|
final Text textInput = (this.isNumber)
|
||||||
? builder.widgetFactory.numberInput(fieldGrid, this.numberCheck, readonly, label)
|
? builder.widgetFactory.numberInput(fieldGrid, this.numberCheck, readonly, label)
|
||||||
: (this.isArea)
|
: (this.isArea)
|
||||||
? builder.widgetFactory.textAreaInput(fieldGrid, readonly, label)
|
? builder.widgetFactory.textAreaInput(fieldGrid, readonly, label)
|
||||||
: builder.widgetFactory.textInput(fieldGrid, this.isPassword, readonly, label);
|
: builder.widgetFactory.textInput(fieldGrid, this.isPassword, readonly, testKey, label);
|
||||||
|
|
||||||
if (builder.pageService.getFormTooltipMode() == PageService.FormTooltipMode.INPUT) {
|
if (builder.pageService.getFormTooltipMode() == PageService.FormTooltipMode.INPUT) {
|
||||||
builder.pageService.getPolyglotPageService().injectI18nTooltip(
|
builder.pageService.getPolyglotPageService().injectI18nTooltip(
|
||||||
|
|
|
@ -502,63 +502,47 @@ public class WidgetFactory {
|
||||||
return labelLocalized;
|
return labelLocalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Text textInput(final Composite content, final LocTextKey label) {
|
public Text textInput(final Composite content, final LocTextKey ariaLabel) {
|
||||||
return textInput(content, false, false, label.name, this.i18nSupport.getText(label));
|
return textInput(content, false, false, ariaLabel.name, ariaLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Text textInput(final Composite content, final String testKey, final LocTextKey label) {
|
public Text textInput(final Composite content, final String testKey, final LocTextKey ariaLabel) {
|
||||||
return textInput(content, false, false, testKey, this.i18nSupport.getText(label));
|
return textInput(content, false, false, testKey, ariaLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Text textInput(final Composite content, final String testKey, final String label) {
|
public Text textInput(final Composite content, final String testKey, final String ariaLabel) {
|
||||||
return textInput(content, false, false, testKey, label);
|
final Text textInput = textInput(content, false, false, testKey, null);
|
||||||
|
if (ariaLabel != null) {
|
||||||
|
WidgetFactory.setARIALabel(textInput, this.i18nSupport.getText(ariaLabel));
|
||||||
|
}
|
||||||
|
return textInput;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Text passwordInput(final Composite content, final LocTextKey label) {
|
//
|
||||||
return textInput(content, true, false, label.name, this.i18nSupport.getText(label));
|
public Text passwordInput(final Composite content, final String testKey, final LocTextKey ariaLabel) {
|
||||||
}
|
return textInput(content, true, false, testKey, ariaLabel);
|
||||||
|
|
||||||
public Text passwordInput(final Composite content, final String testKey, final String label) {
|
|
||||||
return textInput(content, true, false, testKey, label);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Text textAreaInput(
|
public Text textAreaInput(
|
||||||
final Composite content,
|
final Composite content,
|
||||||
final boolean readonly,
|
final boolean readonly,
|
||||||
final LocTextKey label) {
|
final LocTextKey ariaLabel) {
|
||||||
|
|
||||||
return textAreaInput(content, readonly, this.i18nSupport.getText(label));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Text textAreaInput(
|
|
||||||
final Composite content,
|
|
||||||
final boolean readonly,
|
|
||||||
final String label) {
|
|
||||||
|
|
||||||
final Text input = readonly
|
final Text input = readonly
|
||||||
? new Text(content, SWT.LEFT | SWT.MULTI)
|
? new Text(content, SWT.LEFT | SWT.MULTI)
|
||||||
: new Text(content, SWT.LEFT | SWT.BORDER | SWT.MULTI);
|
: new Text(content, SWT.LEFT | SWT.BORDER | SWT.MULTI);
|
||||||
if (label != null) {
|
if (ariaLabel != null) {
|
||||||
WidgetFactory.setARIALabel(input, label);
|
WidgetFactory.setARIALabel(input, this.i18nSupport.getText(ariaLabel));
|
||||||
}
|
}
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Text textInput(
|
|
||||||
final Composite content,
|
|
||||||
final boolean password,
|
|
||||||
final boolean readonly,
|
|
||||||
final LocTextKey label) {
|
|
||||||
|
|
||||||
return textInput(content, password, readonly, label.name, this.i18nSupport.getText(label));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Text textInput(
|
public Text textInput(
|
||||||
final Composite content,
|
final Composite content,
|
||||||
final boolean password,
|
final boolean password,
|
||||||
final boolean readonly,
|
final boolean readonly,
|
||||||
final String testKey,
|
final String testKey,
|
||||||
final String label) {
|
final LocTextKey ariaLabel) {
|
||||||
|
|
||||||
final Text input = readonly
|
final Text input = readonly
|
||||||
? new Text(content, SWT.LEFT)
|
? new Text(content, SWT.LEFT)
|
||||||
|
@ -566,8 +550,8 @@ public class WidgetFactory {
|
||||||
? SWT.LEFT | SWT.BORDER | SWT.PASSWORD
|
? SWT.LEFT | SWT.BORDER | SWT.PASSWORD
|
||||||
: SWT.LEFT | SWT.BORDER);
|
: SWT.LEFT | SWT.BORDER);
|
||||||
|
|
||||||
if (label != null) {
|
if (ariaLabel != null) {
|
||||||
WidgetFactory.setARIALabel(input, label);
|
WidgetFactory.setARIALabel(input, this.i18nSupport.getText(ariaLabel));
|
||||||
}
|
}
|
||||||
if (testKey != null) {
|
if (testKey != null) {
|
||||||
setTestId(input, testKey);
|
setTestId(input, testKey);
|
||||||
|
|
|
@ -1371,7 +1371,7 @@ sebserver.examconfig.props.label.enablePrintScreen=Allow screen capture
|
||||||
sebserver.examconfig.props.label.enablePrintScreen.tooltip=Controls Print Screen and OS X screen capture, corresponds with Enable screen capture in Security settings
|
sebserver.examconfig.props.label.enablePrintScreen.tooltip=Controls Print Screen and OS X screen capture, corresponds with Enable screen capture in Security settings
|
||||||
sebserver.examconfig.props.label.enableCtrlEsc=Enable Ctrl-Esc
|
sebserver.examconfig.props.label.enableCtrlEsc=Enable Ctrl-Esc
|
||||||
sebserver.examconfig.props.label.enableAltEsc=Enable Alt-Esc
|
sebserver.examconfig.props.label.enableAltEsc=Enable Alt-Esc
|
||||||
sebserver.examconfig.props.label.enableAltTab=Enable Alt-Tap
|
sebserver.examconfig.props.label.enableAltTab=Enable Alt-Tab
|
||||||
sebserver.examconfig.props.label.enableAltF4=Enable Alt-F4
|
sebserver.examconfig.props.label.enableAltF4=Enable Alt-F4
|
||||||
sebserver.examconfig.props.label.enableStartMenu=Enable Start Menu
|
sebserver.examconfig.props.label.enableStartMenu=Enable Start Menu
|
||||||
sebserver.examconfig.props.label.enableRightMouse=Enable Right Mouse
|
sebserver.examconfig.props.label.enableRightMouse=Enable Right Mouse
|
||||||
|
|
Loading…
Reference in a new issue