Playwright/E2E: Add method to stub notification in Playwright and automate MM-T483 (#29203)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
05abb39019
Коммит
80289a0d8c
@@ -63,6 +63,14 @@ export default class ChannelsPost {
|
||||
await this.removePostButton.waitFor();
|
||||
await this.removePostButton.click();
|
||||
}
|
||||
|
||||
/**
|
||||
* `toContainText` verifies if the post contains the specified text.
|
||||
* @param text Text to be verified in the post
|
||||
*/
|
||||
async toContainText(text: string) {
|
||||
await expect(this.container).toContainText(text);
|
||||
}
|
||||
}
|
||||
|
||||
export {ChannelsPost};
|
||||
|
||||
@@ -69,12 +69,20 @@ export default class ChannelsPage {
|
||||
if (teamName) {
|
||||
channelsUrl += `${teamName}`;
|
||||
if (channelName) {
|
||||
const prefix = channelName.startsWith('@') ? '/messages' : '';
|
||||
const prefix = channelName.startsWith('@') ? '/messages' : '/channels';
|
||||
channelsUrl += `${prefix}/${channelName}`;
|
||||
}
|
||||
}
|
||||
await this.page.goto(channelsUrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* `postMessage` posts a message in the current channel
|
||||
* @param message Message to post
|
||||
*/
|
||||
async postMessage(message: string) {
|
||||
await this.centerView.postCreate.postMessage(message);
|
||||
}
|
||||
}
|
||||
|
||||
export {ChannelsPage};
|
||||
|
||||
Ссылка в новой задаче
Block a user