mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-12 06:00:14 +00:00
* Remove BoR quick action on ABAC permission denial * Update Render Permission to support handling for ABAC servers that do not yet support a particular permision action - they will be treated as "unenforced" * detox - allow skipping of tests on permission policy actions that are not supported by the test server yet
50 lines
1.8 KiB
TypeScript
50 lines
1.8 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
class PostDraft {
|
|
testID = {
|
|
postDraftSuffix: 'post_draft',
|
|
postDraftArchivedSuffix: 'post_draft.archived',
|
|
postDraftReadOnlySuffix: 'post_draft.read_only',
|
|
postInputSuffix: 'post_draft.post.input',
|
|
attachmentActionSuffix: 'post_draft.quick_actions.attachment_action',
|
|
attachmentActionDisabledSuffix: 'post_draft.quick_actions.attachment_action.disabled',
|
|
borActionSuffix: 'post_draft.quick_actions.bor_action',
|
|
};
|
|
|
|
getPostDraft = (screenPrefix: string) => {
|
|
return element(by.id(`${screenPrefix}${this.testID.postDraftSuffix}`));
|
|
};
|
|
|
|
getPostDraftArchived = (screenPrefix: string) => {
|
|
return element(by.id(`${screenPrefix}${this.testID.postDraftArchivedSuffix}`));
|
|
};
|
|
|
|
getPostDraftArchivedCloseChannelButton = (screenPrefix: string) => {
|
|
return element(by.id(`${screenPrefix}${this.testID.postDraftArchivedSuffix}.close_channel.button`));
|
|
};
|
|
|
|
getPostDraftReadOnly = (screenPrefix: string) => {
|
|
return element(by.id(`${screenPrefix}${this.testID.postDraftReadOnlySuffix}`));
|
|
};
|
|
|
|
getPostInput = (screenPrefix: string) => {
|
|
return element(by.id(`${screenPrefix}${this.testID.postInputSuffix}`));
|
|
};
|
|
|
|
getAttachmentAction = (screenPrefix: string) => {
|
|
return element(by.id(`${screenPrefix}${this.testID.attachmentActionSuffix}`));
|
|
};
|
|
|
|
getAttachmentActionDisabled = (screenPrefix: string) => {
|
|
return element(by.id(`${screenPrefix}${this.testID.attachmentActionDisabledSuffix}`));
|
|
};
|
|
|
|
getBoRAction = (screenPrefix: string) => {
|
|
return element(by.id(`${screenPrefix}${this.testID.borActionSuffix}`));
|
|
};
|
|
}
|
|
|
|
const postDraft = new PostDraft();
|
|
export default postDraft;
|