@mattermost/playwright-lib 10.7.0-1 → 10.7.0-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser_context.js +21 -14
- package/dist/constant.js +6 -3
- package/dist/file.js +20 -20
- package/dist/flag.d.ts +2 -2
- package/dist/flag.js +77 -35
- package/dist/flag.js.map +1 -1
- package/dist/global_setup.js +24 -14
- package/dist/global_setup.js.map +1 -1
- package/dist/index.js +42 -9
- package/dist/mock_browser_api.js +8 -2
- package/dist/server/channel.js +9 -3
- package/dist/server/client.js +16 -10
- package/dist/server/default_config.js +15 -9
- package/dist/server/index.d.ts +0 -1
- package/dist/server/init.js +36 -29
- package/dist/server/post.js +9 -3
- package/dist/server/team.js +9 -3
- package/dist/server/user.js +15 -8
- package/dist/test_action.js +14 -3
- package/dist/test_config.js +30 -4
- package/dist/test_fixture.d.ts +2 -2
- package/dist/test_fixture.js +68 -49
- package/dist/test_fixture.js.map +1 -1
- package/dist/ui/components/channels/app_bar.js +9 -3
- package/dist/ui/components/channels/center_view.js +28 -22
- package/dist/ui/components/channels/delete_post_confirmation_dialog.js +14 -8
- package/dist/ui/components/channels/delete_post_modal.js +10 -4
- package/dist/ui/components/channels/emoji_gif_picker.js +15 -9
- package/dist/ui/components/channels/find_channels_modal.js +9 -3
- package/dist/ui/components/channels/generic_confirm_modal.js +11 -5
- package/dist/ui/components/channels/header.js +9 -3
- package/dist/ui/components/channels/message_priority.js +20 -14
- package/dist/ui/components/channels/post.js +16 -10
- package/dist/ui/components/channels/post_create.js +29 -23
- package/dist/ui/components/channels/post_dot_menu.js +9 -3
- package/dist/ui/components/channels/post_edit.js +22 -16
- package/dist/ui/components/channels/post_menu.js +9 -3
- package/dist/ui/components/channels/post_reminder_menu.js +9 -3
- package/dist/ui/components/channels/restore_post_confirmation_dialog.js +12 -6
- package/dist/ui/components/channels/scheduled_draft_menu.js +9 -3
- package/dist/ui/components/channels/scheduled_draft_modal.js +10 -4
- package/dist/ui/components/channels/search_popover.js +9 -3
- package/dist/ui/components/channels/settings/notification_settings.js +14 -8
- package/dist/ui/components/channels/settings/settings_modal.js +13 -7
- package/dist/ui/components/channels/sidebar_left.js +14 -8
- package/dist/ui/components/channels/sidebar_right.js +26 -20
- package/dist/ui/components/channels/thread_footer.js +9 -3
- package/dist/ui/components/channels/user_profile_popover.js +9 -3
- package/dist/ui/components/footer.js +9 -3
- package/dist/ui/components/global_header.js +13 -7
- package/dist/ui/components/index.js +74 -72
- package/dist/ui/components/main_header.js +9 -3
- package/dist/ui/components/system_console/navbar.js +9 -3
- package/dist/ui/components/system_console/sections/system_users/column_toggle_menu.js +10 -4
- package/dist/ui/components/system_console/sections/system_users/feature_discovery.js +10 -4
- package/dist/ui/components/system_console/sections/system_users/filter_menu.js +9 -3
- package/dist/ui/components/system_console/sections/system_users/filter_popover.js +14 -8
- package/dist/ui/components/system_console/sections/system_users/mobile_security.js +9 -3
- package/dist/ui/components/system_console/sections/system_users/system_users.js +16 -10
- package/dist/ui/components/system_console/sidebar.js +10 -4
- package/dist/ui/pages/channels.js +24 -18
- package/dist/ui/pages/drafts.js +23 -17
- package/dist/ui/pages/index.js +30 -17
- package/dist/ui/pages/landing_login.js +11 -5
- package/dist/ui/pages/login.js +14 -8
- package/dist/ui/pages/reset_password.js +15 -9
- package/dist/ui/pages/scheduled_draft.js +25 -19
- package/dist/ui/pages/signup.js +17 -11
- package/dist/ui/pages/system_console.js +22 -16
- package/dist/util.js +19 -8
- package/dist/visual/index.js +20 -14
- package/dist/visual/percy.js +10 -4
- package/package.json +1 -1
- package/dist/server/index.js +0 -10
- package/dist/server/plugins.d.ts +0 -2
- package/dist/server/plugins.js +0 -30
- package/dist/server/plugins.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types.js +0 -3
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
|
|
1
5
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
6
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
export default class PostMenu {
|
|
7
|
+
class PostMenu {
|
|
5
8
|
container;
|
|
6
9
|
plusOneEmojiButton;
|
|
7
10
|
grinningEmojiButton;
|
|
@@ -23,7 +26,7 @@ export default class PostMenu {
|
|
|
23
26
|
this.dotMenuButton = container.getByRole('button', { name: 'more' });
|
|
24
27
|
}
|
|
25
28
|
async toBeVisible() {
|
|
26
|
-
await expect(this.container).toBeVisible();
|
|
29
|
+
await test.expect(this.container).toBeVisible();
|
|
27
30
|
}
|
|
28
31
|
/**
|
|
29
32
|
* Clicks on the reply button from the post menu.
|
|
@@ -46,3 +49,6 @@ export default class PostMenu {
|
|
|
46
49
|
await this.dotMenuButton.click();
|
|
47
50
|
}
|
|
48
51
|
}
|
|
52
|
+
|
|
53
|
+
module.exports = PostMenu;
|
|
54
|
+
//# sourceMappingURL=post_menu.js.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
|
|
1
5
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
6
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
export default class PostReminderMenu {
|
|
7
|
+
class PostReminderMenu {
|
|
5
8
|
container;
|
|
6
9
|
thirtyMinsMenuItem;
|
|
7
10
|
oneHourMenuItem;
|
|
@@ -18,6 +21,9 @@ export default class PostReminderMenu {
|
|
|
18
21
|
this.customMenuItem = getMenuItem('Custom');
|
|
19
22
|
}
|
|
20
23
|
async toBeVisible() {
|
|
21
|
-
await expect(this.container).toBeVisible();
|
|
24
|
+
await test.expect(this.container).toBeVisible();
|
|
22
25
|
}
|
|
23
26
|
}
|
|
27
|
+
|
|
28
|
+
module.exports = PostReminderMenu;
|
|
29
|
+
//# sourceMappingURL=post_reminder_menu.js.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
|
|
1
5
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
6
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
export default class RestorePostConfirmationDialog {
|
|
7
|
+
class RestorePostConfirmationDialog {
|
|
5
8
|
container;
|
|
6
9
|
cancelButton;
|
|
7
10
|
confirmButton;
|
|
@@ -11,14 +14,17 @@ export default class RestorePostConfirmationDialog {
|
|
|
11
14
|
this.confirmButton = container.locator('button.GenericModal__button.btn.btn-primary.confirm');
|
|
12
15
|
}
|
|
13
16
|
async toBeVisible() {
|
|
14
|
-
await expect(this.container).toBeVisible();
|
|
15
|
-
await expect(this.cancelButton).toBeVisible();
|
|
16
|
-
await expect(this.confirmButton).toBeVisible();
|
|
17
|
+
await test.expect(this.container).toBeVisible();
|
|
18
|
+
await test.expect(this.cancelButton).toBeVisible();
|
|
19
|
+
await test.expect(this.confirmButton).toBeVisible();
|
|
17
20
|
}
|
|
18
21
|
async notToBeVisible() {
|
|
19
|
-
await expect(this.container).not.toBeVisible();
|
|
22
|
+
await test.expect(this.container).not.toBeVisible();
|
|
20
23
|
}
|
|
21
24
|
async confirmRestore() {
|
|
22
25
|
await this.confirmButton.click();
|
|
23
26
|
}
|
|
24
27
|
}
|
|
28
|
+
|
|
29
|
+
module.exports = RestorePostConfirmationDialog;
|
|
30
|
+
//# sourceMappingURL=restore_post_confirmation_dialog.js.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
|
|
1
5
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
6
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
export default class ScheduledDraftMenu {
|
|
7
|
+
class ScheduledDraftMenu {
|
|
5
8
|
container;
|
|
6
9
|
scheduleDraftMessageCustomTimeOption;
|
|
7
10
|
constructor(container) {
|
|
@@ -9,9 +12,12 @@ export default class ScheduledDraftMenu {
|
|
|
9
12
|
this.scheduleDraftMessageCustomTimeOption = container.getByText('Choose a custom time');
|
|
10
13
|
}
|
|
11
14
|
async toBeVisible() {
|
|
12
|
-
await expect(this.container).toBeVisible();
|
|
15
|
+
await test.expect(this.container).toBeVisible();
|
|
13
16
|
}
|
|
14
17
|
async selectCustomTime() {
|
|
15
18
|
await this.scheduleDraftMessageCustomTimeOption.click();
|
|
16
19
|
}
|
|
17
20
|
}
|
|
21
|
+
|
|
22
|
+
module.exports = ScheduledDraftMenu;
|
|
23
|
+
//# sourceMappingURL=scheduled_draft_menu.js.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
|
|
1
5
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
6
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
export default class ScheduledDraftModal {
|
|
7
|
+
class ScheduledDraftModal {
|
|
5
8
|
container;
|
|
6
9
|
confirmButton;
|
|
7
10
|
dateInput;
|
|
@@ -15,7 +18,7 @@ export default class ScheduledDraftModal {
|
|
|
15
18
|
this.timeDropdownOptions = container.locator('ul.dropdown-menu .MenuItem');
|
|
16
19
|
}
|
|
17
20
|
async toBeVisible() {
|
|
18
|
-
await expect(this.container).toBeVisible();
|
|
21
|
+
await test.expect(this.container).toBeVisible();
|
|
19
22
|
}
|
|
20
23
|
getDaySuffix(day) {
|
|
21
24
|
if (day > 3 && day < 21)
|
|
@@ -64,7 +67,7 @@ export default class ScheduledDraftModal {
|
|
|
64
67
|
async selectTime() {
|
|
65
68
|
await this.timeLocator.click();
|
|
66
69
|
const timeButton = this.timeDropdownOptions.nth(2);
|
|
67
|
-
await expect(timeButton).toBeVisible();
|
|
70
|
+
await test.expect(timeButton).toBeVisible();
|
|
68
71
|
await timeButton.click();
|
|
69
72
|
}
|
|
70
73
|
getPacificDate() {
|
|
@@ -76,3 +79,6 @@ export default class ScheduledDraftModal {
|
|
|
76
79
|
return pacificTime;
|
|
77
80
|
}
|
|
78
81
|
}
|
|
82
|
+
|
|
83
|
+
module.exports = ScheduledDraftModal;
|
|
84
|
+
//# sourceMappingURL=scheduled_draft_modal.js.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
|
|
1
5
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
6
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
export default class SearchPopover {
|
|
7
|
+
class SearchPopover {
|
|
5
8
|
container;
|
|
6
9
|
messagesButton;
|
|
7
10
|
filesButton;
|
|
@@ -29,9 +32,12 @@ export default class SearchPopover {
|
|
|
29
32
|
return false;
|
|
30
33
|
}
|
|
31
34
|
async toBeVisible() {
|
|
32
|
-
await expect(this.container).toBeVisible();
|
|
35
|
+
await test.expect(this.container).toBeVisible();
|
|
33
36
|
}
|
|
34
37
|
getSelectedSuggestion() {
|
|
35
38
|
return this.searchHints.locator('.suggestion--selected');
|
|
36
39
|
}
|
|
37
40
|
}
|
|
41
|
+
|
|
42
|
+
module.exports = SearchPopover;
|
|
43
|
+
//# sourceMappingURL=search_popover.js.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
|
|
1
5
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
6
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
export default class NotificationsSettings {
|
|
7
|
+
class NotificationsSettings {
|
|
5
8
|
container;
|
|
6
9
|
keysWithHighlightDesc;
|
|
7
10
|
constructor(container) {
|
|
@@ -9,7 +12,7 @@ export default class NotificationsSettings {
|
|
|
9
12
|
this.keysWithHighlightDesc = container.locator('#keywordsAndHighlightDesc');
|
|
10
13
|
}
|
|
11
14
|
async toBeVisible() {
|
|
12
|
-
await expect(this.container).toBeVisible();
|
|
15
|
+
await test.expect(this.container).toBeVisible();
|
|
13
16
|
}
|
|
14
17
|
async expandSection(section) {
|
|
15
18
|
if (section === 'keysWithHighlight') {
|
|
@@ -18,18 +21,21 @@ export default class NotificationsSettings {
|
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
23
|
async verifySectionIsExpanded(section) {
|
|
21
|
-
await expect(this.container.locator(`#${section}Edit`)).not.toBeVisible();
|
|
24
|
+
await test.expect(this.container.locator(`#${section}Edit`)).not.toBeVisible();
|
|
22
25
|
if (section === 'keysWithHighlight') {
|
|
23
|
-
await expect(this.container.getByText('Enter non case-sensitive keywords, press Tab or use commas to separate them:')).toBeVisible();
|
|
24
|
-
await expect(this.container.getByText('These keywords will be shown to you with a highlight when anyone sends a message that includes them.')).toBeVisible();
|
|
26
|
+
await test.expect(this.container.getByText('Enter non case-sensitive keywords, press Tab or use commas to separate them:')).toBeVisible();
|
|
27
|
+
await test.expect(this.container.getByText('These keywords will be shown to you with a highlight when anyone sends a message that includes them.')).toBeVisible();
|
|
25
28
|
}
|
|
26
29
|
}
|
|
27
30
|
async getKeywordsInput() {
|
|
28
|
-
await expect(this.container.locator('input')).toBeVisible();
|
|
31
|
+
await test.expect(this.container.locator('input')).toBeVisible();
|
|
29
32
|
return this.container.locator('input');
|
|
30
33
|
}
|
|
31
34
|
async save() {
|
|
32
|
-
await expect(this.container.getByText('Save')).toBeVisible();
|
|
35
|
+
await test.expect(this.container.getByText('Save')).toBeVisible();
|
|
33
36
|
await this.container.getByText('Save').click();
|
|
34
37
|
}
|
|
35
38
|
}
|
|
39
|
+
|
|
40
|
+
module.exports = NotificationsSettings;
|
|
41
|
+
//# sourceMappingURL=notification_settings.js.map
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
var notification_settings = require('./notification_settings.js');
|
|
5
|
+
|
|
1
6
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
7
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
import NotificationsSettings from './notification_settings';
|
|
5
|
-
export default class SettingsModal {
|
|
8
|
+
class SettingsModal {
|
|
6
9
|
container;
|
|
7
10
|
notificationsSettingsTab;
|
|
8
11
|
notificationsSettings;
|
|
9
12
|
constructor(container) {
|
|
10
13
|
this.container = container;
|
|
11
14
|
this.notificationsSettingsTab = container.locator('#notificationsButton');
|
|
12
|
-
this.notificationsSettings = new
|
|
15
|
+
this.notificationsSettings = new notification_settings(container.locator('#notificationsSettings'));
|
|
13
16
|
}
|
|
14
17
|
async toBeVisible() {
|
|
15
|
-
await expect(this.container).toBeVisible();
|
|
18
|
+
await test.expect(this.container).toBeVisible();
|
|
16
19
|
}
|
|
17
20
|
async openNotificationsTab() {
|
|
18
|
-
await expect(this.notificationsSettingsTab).toBeVisible();
|
|
21
|
+
await test.expect(this.notificationsSettingsTab).toBeVisible();
|
|
19
22
|
await this.notificationsSettingsTab.click();
|
|
20
23
|
await this.notificationsSettings.toBeVisible();
|
|
21
24
|
}
|
|
22
25
|
async closeModal() {
|
|
23
26
|
await this.container.getByLabel('Close').click();
|
|
24
|
-
await expect(this.container).not.toBeVisible();
|
|
27
|
+
await test.expect(this.container).not.toBeVisible();
|
|
25
28
|
}
|
|
26
29
|
}
|
|
30
|
+
|
|
31
|
+
module.exports = SettingsModal;
|
|
32
|
+
//# sourceMappingURL=settings_modal.js.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
|
|
1
5
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
6
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
export default class ChannelsSidebarLeft {
|
|
7
|
+
class ChannelsSidebarLeft {
|
|
5
8
|
container;
|
|
6
9
|
findChannelButton;
|
|
7
10
|
scheduledDraftCountonLHS;
|
|
@@ -11,14 +14,14 @@ export default class ChannelsSidebarLeft {
|
|
|
11
14
|
this.scheduledDraftCountonLHS = container.locator('span.scheduledPostBadge');
|
|
12
15
|
}
|
|
13
16
|
async toBeVisible() {
|
|
14
|
-
await expect(this.container).toBeVisible();
|
|
17
|
+
await test.expect(this.container).toBeVisible();
|
|
15
18
|
}
|
|
16
19
|
async assertNoPendingScheduledDraft() {
|
|
17
|
-
await expect(this.scheduledDraftCountonLHS).not.toBeVisible();
|
|
20
|
+
await test.expect(this.scheduledDraftCountonLHS).not.toBeVisible();
|
|
18
21
|
}
|
|
19
22
|
async assertscheduledDraftCountLHS(count) {
|
|
20
|
-
await expect(this.scheduledDraftCountonLHS).toBeVisible();
|
|
21
|
-
await expect(this.scheduledDraftCountonLHS).toHaveText(count);
|
|
23
|
+
await test.expect(this.scheduledDraftCountonLHS).toBeVisible();
|
|
24
|
+
await test.expect(this.scheduledDraftCountonLHS).toHaveText(count);
|
|
22
25
|
}
|
|
23
26
|
/**
|
|
24
27
|
* Clicks on the sidebar channel link with the given name.
|
|
@@ -36,13 +39,16 @@ export default class ChannelsSidebarLeft {
|
|
|
36
39
|
async draftsVisible() {
|
|
37
40
|
const draftSidebarLink = this.container.getByText('Drafts', { exact: true });
|
|
38
41
|
await draftSidebarLink.waitFor();
|
|
39
|
-
await expect(draftSidebarLink).toBeVisible();
|
|
42
|
+
await test.expect(draftSidebarLink).toBeVisible();
|
|
40
43
|
}
|
|
41
44
|
/**
|
|
42
45
|
* Verifies 'Drafts' as a sidebar link does not exist in LHS.
|
|
43
46
|
*/
|
|
44
47
|
async draftsNotVisible() {
|
|
45
48
|
const channel = this.container.getByText('Drafts', { exact: true });
|
|
46
|
-
await expect(channel).not.toBeVisible();
|
|
49
|
+
await test.expect(channel).not.toBeVisible();
|
|
47
50
|
}
|
|
48
51
|
}
|
|
52
|
+
|
|
53
|
+
module.exports = ChannelsSidebarLeft;
|
|
54
|
+
//# sourceMappingURL=sidebar_left.js.map
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
var post_create = require('./post_create.js');
|
|
5
|
+
var post_edit = require('./post_edit.js');
|
|
6
|
+
var post = require('./post.js');
|
|
7
|
+
|
|
1
8
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
9
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
import ChannelsPostCreate from './post_create';
|
|
5
|
-
import ChannelsPostEdit from './post_edit';
|
|
6
|
-
import ChannelsPost from './post';
|
|
7
|
-
export default class ChannelsSidebarRight {
|
|
10
|
+
class ChannelsSidebarRight {
|
|
8
11
|
container;
|
|
9
12
|
closeButton;
|
|
10
13
|
postCreate;
|
|
@@ -24,37 +27,37 @@ export default class ChannelsSidebarRight {
|
|
|
24
27
|
this.scheduledDraftSeeAllLink = container.locator('a:has-text("See all")');
|
|
25
28
|
this.scheduledDraftChannelInfoMessageText = container.locator('span:has-text("Message scheduled for")');
|
|
26
29
|
this.rhsPostBody = container.locator('.post-message__text');
|
|
27
|
-
this.postCreate = new
|
|
30
|
+
this.postCreate = new post_create(container.getByTestId('comment-create'), true);
|
|
28
31
|
this.closeButton = container.locator('.sidebar--right__close');
|
|
29
32
|
this.editTextbox = container.locator('#edit_textbox');
|
|
30
|
-
this.postEdit = new
|
|
33
|
+
this.postEdit = new post_edit(container.locator('.post-edit__container'));
|
|
31
34
|
this.currentVersionEditedPosttext = (postID) => container.locator(`#rhsPostMessageText_${postID} p`);
|
|
32
35
|
this.restorePreviousPostVersionIcon = container.locator('button[aria-label="Select to restore an old message."]');
|
|
33
36
|
}
|
|
34
37
|
async toBeVisible() {
|
|
35
|
-
await expect(this.container).toBeVisible();
|
|
38
|
+
await test.expect(this.container).toBeVisible();
|
|
36
39
|
}
|
|
37
40
|
/**
|
|
38
41
|
* Returns the RHS post by post id
|
|
39
42
|
* @param postId Just the ID without the prefix
|
|
40
43
|
*/
|
|
41
44
|
async getPostById(postId) {
|
|
42
|
-
const post = this.container.locator(`[id="rhsPost_${postId}"]`);
|
|
43
|
-
await post.waitFor();
|
|
44
|
-
return new
|
|
45
|
+
const post$1 = this.container.locator(`[id="rhsPost_${postId}"]`);
|
|
46
|
+
await post$1.waitFor();
|
|
47
|
+
return new post(post$1);
|
|
45
48
|
}
|
|
46
49
|
/**
|
|
47
50
|
* Return the last post in the RHS
|
|
48
51
|
*/
|
|
49
52
|
async getLastPost() {
|
|
50
|
-
const post = this.container.getByTestId('rhsPostView').last();
|
|
51
|
-
await post.waitFor();
|
|
52
|
-
return new
|
|
53
|
+
const post$1 = this.container.getByTestId('rhsPostView').last();
|
|
54
|
+
await post$1.waitFor();
|
|
55
|
+
return new post(post$1);
|
|
53
56
|
}
|
|
54
57
|
async getFirstPost() {
|
|
55
|
-
const post = this.container.getByTestId('rhsPostView').first();
|
|
56
|
-
await post.waitFor();
|
|
57
|
-
return new
|
|
58
|
+
const post$1 = this.container.getByTestId('rhsPostView').first();
|
|
59
|
+
await post$1.waitFor();
|
|
60
|
+
return new post(post$1);
|
|
58
61
|
}
|
|
59
62
|
/**
|
|
60
63
|
* Closes the RHS
|
|
@@ -62,20 +65,23 @@ export default class ChannelsSidebarRight {
|
|
|
62
65
|
async close() {
|
|
63
66
|
await this.closeButton.waitFor();
|
|
64
67
|
await this.closeButton.click();
|
|
65
|
-
await expect(this.container).not.toBeVisible();
|
|
68
|
+
await test.expect(this.container).not.toBeVisible();
|
|
66
69
|
}
|
|
67
70
|
async clickOnSeeAllscheduledDrafts() {
|
|
68
71
|
await this.scheduledDraftSeeAllLink.isVisible();
|
|
69
72
|
await this.scheduledDraftSeeAllLink.click();
|
|
70
73
|
}
|
|
71
74
|
async toContainText(text) {
|
|
72
|
-
await expect(this.container).toContainText(text);
|
|
75
|
+
await test.expect(this.container).toContainText(text);
|
|
73
76
|
}
|
|
74
77
|
async verifyCurrentVersionPostMessage(postID, postMessageContent) {
|
|
75
|
-
expect(await this.currentVersionEditedPosttext(postID).textContent()).toBe(postMessageContent);
|
|
78
|
+
test.expect(await this.currentVersionEditedPosttext(postID).textContent()).toBe(postMessageContent);
|
|
76
79
|
}
|
|
77
80
|
async restorePreviousPostVersion() {
|
|
78
81
|
await this.restorePreviousPostVersionIcon.isVisible();
|
|
79
82
|
await this.restorePreviousPostVersionIcon.click();
|
|
80
83
|
}
|
|
81
84
|
}
|
|
85
|
+
|
|
86
|
+
module.exports = ChannelsSidebarRight;
|
|
87
|
+
//# sourceMappingURL=sidebar_right.js.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
|
|
1
5
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
6
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
export default class ThreadFooter {
|
|
7
|
+
class ThreadFooter {
|
|
5
8
|
container;
|
|
6
9
|
replyButton;
|
|
7
10
|
constructor(container) {
|
|
@@ -9,7 +12,7 @@ export default class ThreadFooter {
|
|
|
9
12
|
this.replyButton = container.locator('.ReplyButton');
|
|
10
13
|
}
|
|
11
14
|
async toBeVisible() {
|
|
12
|
-
await expect(this.container).toBeVisible();
|
|
15
|
+
await test.expect(this.container).toBeVisible();
|
|
13
16
|
}
|
|
14
17
|
/**
|
|
15
18
|
* Clicks on the reply button in the thread footer to open the thread in RHS.
|
|
@@ -19,3 +22,6 @@ export default class ThreadFooter {
|
|
|
19
22
|
await this.replyButton.click();
|
|
20
23
|
}
|
|
21
24
|
}
|
|
25
|
+
|
|
26
|
+
module.exports = ThreadFooter;
|
|
27
|
+
//# sourceMappingURL=thread_footer.js.map
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
|
|
1
5
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
6
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
export default class UserProfilePopover {
|
|
7
|
+
class UserProfilePopover {
|
|
5
8
|
container;
|
|
6
9
|
constructor(container) {
|
|
7
10
|
this.container = container;
|
|
8
11
|
}
|
|
9
12
|
async toBeVisible() {
|
|
10
|
-
await expect(this.container).toBeVisible();
|
|
13
|
+
await test.expect(this.container).toBeVisible();
|
|
11
14
|
}
|
|
12
15
|
async close() {
|
|
13
16
|
await this.container.getByLabel('Close user profile popover').click();
|
|
14
17
|
}
|
|
15
18
|
}
|
|
19
|
+
|
|
20
|
+
module.exports = UserProfilePopover;
|
|
21
|
+
//# sourceMappingURL=user_profile_popover.js.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
|
|
1
5
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
6
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
export default class Footer {
|
|
7
|
+
class Footer {
|
|
5
8
|
container;
|
|
6
9
|
copyright;
|
|
7
10
|
aboutLink;
|
|
@@ -17,6 +20,9 @@ export default class Footer {
|
|
|
17
20
|
this.helpLink = container.locator('text=Help');
|
|
18
21
|
}
|
|
19
22
|
async toBeVisible() {
|
|
20
|
-
await expect(this.copyright).toBeVisible();
|
|
23
|
+
await test.expect(this.copyright).toBeVisible();
|
|
21
24
|
}
|
|
22
25
|
}
|
|
26
|
+
|
|
27
|
+
module.exports = Footer;
|
|
28
|
+
//# sourceMappingURL=footer.js.map
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('@playwright/test');
|
|
4
|
+
|
|
1
5
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
2
6
|
// See LICENSE.txt for license information.
|
|
3
|
-
|
|
4
|
-
export default class GlobalHeader {
|
|
7
|
+
class GlobalHeader {
|
|
5
8
|
container;
|
|
6
9
|
accountMenuButton;
|
|
7
10
|
productSwitchMenu;
|
|
@@ -17,26 +20,29 @@ export default class GlobalHeader {
|
|
|
17
20
|
this.searchBox = container.locator('#searchFormContainer');
|
|
18
21
|
}
|
|
19
22
|
async toBeVisible(name) {
|
|
20
|
-
await expect(this.container.getByRole('heading', { name })).toBeVisible();
|
|
23
|
+
await test.expect(this.container.getByRole('heading', { name })).toBeVisible();
|
|
21
24
|
}
|
|
22
25
|
async switchProduct(name) {
|
|
23
26
|
await this.productSwitchMenu.click();
|
|
24
27
|
await this.container.getByRole('link', { name }).click();
|
|
25
28
|
}
|
|
26
29
|
async openSettings() {
|
|
27
|
-
await expect(this.settingsButton).toBeVisible();
|
|
30
|
+
await test.expect(this.settingsButton).toBeVisible();
|
|
28
31
|
await this.settingsButton.click();
|
|
29
32
|
}
|
|
30
33
|
async openRecentMentions() {
|
|
31
|
-
await expect(this.recentMentionsButton).toBeVisible();
|
|
34
|
+
await test.expect(this.recentMentionsButton).toBeVisible();
|
|
32
35
|
await this.recentMentionsButton.click();
|
|
33
36
|
}
|
|
34
37
|
async openSearch() {
|
|
35
|
-
await expect(this.searchBox).toBeVisible();
|
|
38
|
+
await test.expect(this.searchBox).toBeVisible();
|
|
36
39
|
await this.searchBox.click();
|
|
37
40
|
}
|
|
38
41
|
async closeSearch() {
|
|
39
|
-
await expect(this.searchBox).toBeVisible();
|
|
42
|
+
await test.expect(this.searchBox).toBeVisible();
|
|
40
43
|
await this.searchBox.getByTestId('searchBoxClose').click();
|
|
41
44
|
}
|
|
42
45
|
}
|
|
46
|
+
|
|
47
|
+
module.exports = GlobalHeader;
|
|
48
|
+
//# sourceMappingURL=global_header.js.map
|