mattermost-mobile/detox/e2e/support/ui/component/input_quick_action.js
2022-02-02 16:04:24 -03:00

30 lines
1.2 KiB
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
class InputQuickAction {
testID = {
atInputActionSuffix: 'post_draft.quick_actions.at_input_action',
atInputActionDisabledSuffix: 'post_draft.quick_actions.at_input_action.disabled',
slashInputActionSuffix: 'post_draft.quick_actions.slash_input_action',
slashInputActionDisabledSuffix: 'post_draft.quick_actions.slash_input_action.disabled',
};
getAtInputQuickAction = (screenPrefix) => {
return element(by.id(`${screenPrefix}${this.testID.atInputActionSuffix}`));
};
getAtInputQuickActionDisabled = (screenPrefix) => {
return element(by.id(`${screenPrefix}${this.testID.atInputActionDisabledSuffix}`));
};
getSlashInputQuickAction = (screenPrefix) => {
return element(by.id(`${screenPrefix}${this.testID.slashInputActionSuffix}`));
};
getSlashInputQuickActionDisabled = (screenPrefix) => {
return element(by.id(`${screenPrefix}${this.testID.slashInputActionDisabledSuffix}`));
};
}
const inputQuickAction = new InputQuickAction();
export default inputQuickAction;