E2E test for scheduled Draft feature (#28433)

Этот коммит содержится в:
yasserfaraazkhan
2024-11-15 02:39:35 +05:30
коммит произвёл GitHub
родитель 3af3af0b25
Коммит 38823603a3
15 изменённых файлов: 955 добавлений и 8 удалений

Просмотреть файл

@@ -12,6 +12,8 @@ export default class ChannelsPage {
readonly globalHeader;
readonly centerView;
readonly scheduledDraftDropdown;
readonly scheduledDraftModal;
readonly sidebarLeft;
readonly sidebarRight;
readonly appBar;
@@ -20,6 +22,7 @@ export default class ChannelsPage {
readonly deletePostModal;
readonly settingsModal;
readonly postContainer;
readonly postDotMenu;
readonly postReminderMenu;
@@ -46,21 +49,30 @@ export default class ChannelsPage {
// Popovers
this.emojiGifPickerPopup = new components.EmojiGifPicker(page.locator('#emojiGifPicker'));
this.scheduledDraftDropdown = new components.ScheduledDraftMenu(page.locator('#dropdown_send_post_options'));
this.scheduledDraftModal = new components.ScheduledDraftModal(page.locator('div.modal-content'));
// Posts
this.postContainer = page.locator('div.post-message__text');
}
async toBeVisible() {
await this.centerView.toBeVisible();
}
async getLastPost() {
return this.postContainer.last();
}
async goto(teamName = '', channelName = '') {
let channelsUrl = '/';
if (teamName) {
channelsUrl += `${teamName}`;
if (channelName) {
channelsUrl += `/${channelName}`;
const prefix = channelName.startsWith('@') ? '/messages' : '';
channelsUrl += `${prefix}/${channelName}`;
}
}
await this.page.goto(channelsUrl);
}
}