MM-61891 Fix styles for attachment card overflow issue (#30544)
* Fix styles for attachment card overflow issue * fixed style linter issues * fix linting issues * fixed positioning issue * updated snapshots * E2E fix for playwrite test --------- Co-authored-by: Caleb Roseland <caleb@calebroseland.com> Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
357aa58163
Коммит
19bea2c8d7
@@ -21,7 +21,9 @@ export default class ChannelsCenterView {
|
||||
readonly scheduledDraftChannelIcon;
|
||||
readonly scheduledDraftChannelInfoMessage;
|
||||
readonly scheduledDraftChannelInfoMessageLocator;
|
||||
readonly scheduledDraftDMChannelLocator;
|
||||
readonly scheduledDraftChannelInfoMessageText;
|
||||
readonly scheduledDraftDMChannelLocatorString;
|
||||
readonly scheduledDraftSeeAllLink;
|
||||
readonly postEdit;
|
||||
readonly editedPostIcon;
|
||||
@@ -29,6 +31,7 @@ export default class ChannelsCenterView {
|
||||
constructor(container: Locator) {
|
||||
this.container = container;
|
||||
this.scheduledDraftChannelInfoMessageLocator = 'span:has-text("Message scheduled for")';
|
||||
this.scheduledDraftDMChannelLocatorString = 'div.ScheduledPostIndicator span a';
|
||||
this.header = new ChannelsHeader(this.container.locator('.channel-header'));
|
||||
this.postCreate = new ChannelsPostCreate(container.getByTestId('post-create'));
|
||||
this.scheduledDraftOptions = new ChannelsPostCreate(container.locator('#dropdown_send_post_options'));
|
||||
@@ -37,6 +40,7 @@ export default class ChannelsCenterView {
|
||||
this.scheduledDraftChannelIcon = container.locator('#create_post i.icon-draft-indicator');
|
||||
this.scheduledDraftChannelInfoMessage = container.locator('div.ScheduledPostIndicator span');
|
||||
this.scheduledDraftChannelInfoMessageText = container.locator(this.scheduledDraftChannelInfoMessageLocator);
|
||||
this.scheduledDraftDMChannelLocator = container.locator(this.scheduledDraftDMChannelLocatorString);
|
||||
this.scheduledDraftSeeAllLink = container.locator('a:has-text("See all")');
|
||||
this.editedPostIcon = (postID: string) => container.locator(`#postEdited_${postID}`);
|
||||
}
|
||||
@@ -127,16 +131,20 @@ export default class ChannelsCenterView {
|
||||
);
|
||||
}
|
||||
|
||||
async goToScheduledDraftsFromDMChannel() {
|
||||
if (await this.scheduledDraftDMChannelLocator.isVisible()) {
|
||||
await this.scheduledDraftDMChannelLocator.click();
|
||||
return;
|
||||
}
|
||||
await this.scheduledDraftSeeAllLink.isVisible();
|
||||
await this.scheduledDraftSeeAllLink.click();
|
||||
}
|
||||
|
||||
async verifyscheduledDraftChannelInfo() {
|
||||
await this.postBoxIndicator.isVisible();
|
||||
await this.scheduledDraftChannelIcon.isVisible();
|
||||
const messageLocator = this.scheduledDraftChannelInfoMessage.first();
|
||||
try {
|
||||
await expect(messageLocator).toContainText('Message scheduled for');
|
||||
} catch {
|
||||
// First assertion failed, trying fallback
|
||||
await expect(messageLocator).toContainText('You have one scheduled message.');
|
||||
}
|
||||
await expect(messageLocator).toContainText('Message scheduled for');
|
||||
}
|
||||
|
||||
async clickOnLastEditedPost(postID: string | null) {
|
||||
|
||||
@@ -192,11 +192,7 @@ test('MM-T5643_3 should create a scheduled message from a DM', async ({pw}) => {
|
||||
await setupChannelPage(channelsPage, draftMessage, team.name, `@${user2.username}`);
|
||||
await scheduleMessage(channelsPage);
|
||||
|
||||
await channelsPage.centerView.verifyscheduledDraftChannelInfo();
|
||||
|
||||
const postBoxIndicator = await channelsPage.centerView.scheduledDraftChannelInfoMessageText.innerText();
|
||||
|
||||
await verifyScheduledDraft(channelsPage, scheduledDraftPage, draftMessage, postBoxIndicator);
|
||||
await channelsPage.centerView.goToScheduledDraftsFromDMChannel();
|
||||
|
||||
// # Hover and verify options
|
||||
await scheduledDraftPage.verifyOnHoverActionItems(draftMessage);
|
||||
@@ -288,7 +284,7 @@ test('MM-T5650 should copy scheduled message', async ({pw, browserName}) => {
|
||||
const {user} = await pw.initSetup();
|
||||
const {page, channelsPage, scheduledDraftPage} = await pw.testBrowser.login(user);
|
||||
|
||||
await setupChannelPage(channelsPage, draftMessage);
|
||||
await setupChannelPage(channelsPage, draftMessage, '', 'town-square');
|
||||
await scheduleMessage(channelsPage);
|
||||
|
||||
await channelsPage.centerView.verifyscheduledDraftChannelInfo();
|
||||
|
||||
Ссылка в новой задаче
Block a user