mattermost-mobile-upstream/detox/e2e/support/ui/component/post_draft.ts
Nate Schlossberg 16c5849eb6
Some checks failed
ci / lint-typecheck (push) Has been cancelled
ci / detox-lint-typecheck (push) Has been cancelled
ci / test (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
MM-70693: Hide burn-on-read quick action when ABAC policy denies it (#10239)
* 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
2026-10-16 15:13:04 -07:00

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;