@mattermost/playwright-lib 10.6.1 → 10.7.0-1
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 +14 -21
- package/dist/constant.js +3 -6
- package/dist/file.js +20 -20
- package/dist/flag.d.ts +2 -0
- package/dist/flag.js +49 -38
- package/dist/flag.js.map +1 -1
- package/dist/global_setup.d.ts +0 -2
- package/dist/global_setup.js +14 -71
- package/dist/global_setup.js.map +1 -1
- package/dist/index.js +9 -42
- package/dist/mock_browser_api.js +2 -8
- package/dist/server/channel.js +3 -9
- package/dist/server/client.js +10 -16
- package/dist/server/default_config.js +18 -17
- package/dist/server/default_config.js.map +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +10 -0
- package/dist/server/init.js +29 -36
- package/dist/server/plugins.d.ts +2 -0
- package/dist/server/plugins.js +30 -0
- package/dist/server/plugins.js.map +1 -0
- package/dist/server/post.js +3 -9
- package/dist/server/team.js +3 -9
- package/dist/server/user.js +8 -15
- package/dist/test_action.js +3 -14
- package/dist/test_config.js +4 -30
- package/dist/test_fixture.d.ts +4 -2
- package/dist/test_fixture.js +51 -66
- package/dist/test_fixture.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.js +3 -0
- package/dist/ui/components/channels/app_bar.js +3 -9
- package/dist/ui/components/channels/center_view.js +22 -28
- package/dist/ui/components/channels/delete_post_confirmation_dialog.js +8 -14
- package/dist/ui/components/channels/delete_post_modal.js +4 -10
- package/dist/ui/components/channels/emoji_gif_picker.js +9 -15
- package/dist/ui/components/channels/find_channels_modal.js +3 -9
- package/dist/ui/components/channels/generic_confirm_modal.js +5 -11
- package/dist/ui/components/channels/header.js +3 -9
- package/dist/ui/components/channels/message_priority.js +14 -20
- package/dist/ui/components/channels/post.js +10 -16
- package/dist/ui/components/channels/post_create.js +23 -29
- package/dist/ui/components/channels/post_dot_menu.js +3 -9
- package/dist/ui/components/channels/post_edit.js +16 -22
- package/dist/ui/components/channels/post_menu.js +3 -9
- package/dist/ui/components/channels/post_reminder_menu.js +3 -9
- package/dist/ui/components/channels/restore_post_confirmation_dialog.js +6 -12
- package/dist/ui/components/channels/scheduled_draft_menu.js +3 -9
- package/dist/ui/components/channels/scheduled_draft_modal.js +4 -10
- package/dist/ui/components/channels/search_popover.js +3 -9
- package/dist/ui/components/channels/settings/notification_settings.js +8 -14
- package/dist/ui/components/channels/settings/settings_modal.js +7 -13
- package/dist/ui/components/channels/sidebar_left.js +8 -14
- package/dist/ui/components/channels/sidebar_right.js +20 -26
- package/dist/ui/components/channels/thread_footer.js +3 -9
- package/dist/ui/components/channels/user_profile_popover.js +3 -9
- package/dist/ui/components/footer.js +3 -9
- package/dist/ui/components/global_header.d.ts +1 -0
- package/dist/ui/components/global_header.js +9 -13
- package/dist/ui/components/global_header.js.map +1 -1
- package/dist/ui/components/index.js +72 -74
- package/dist/ui/components/main_header.js +3 -9
- package/dist/ui/components/system_console/navbar.js +3 -9
- package/dist/ui/components/system_console/sections/system_users/column_toggle_menu.js +4 -10
- package/dist/ui/components/system_console/sections/system_users/feature_discovery.js +4 -10
- package/dist/ui/components/system_console/sections/system_users/filter_menu.js +3 -9
- package/dist/ui/components/system_console/sections/system_users/filter_popover.js +8 -14
- package/dist/ui/components/system_console/sections/system_users/mobile_security.js +3 -9
- package/dist/ui/components/system_console/sections/system_users/system_users.js +10 -16
- package/dist/ui/components/system_console/sidebar.js +4 -10
- package/dist/ui/pages/channels.js +18 -24
- package/dist/ui/pages/drafts.js +17 -23
- package/dist/ui/pages/index.js +17 -30
- package/dist/ui/pages/landing_login.js +5 -11
- package/dist/ui/pages/login.js +8 -14
- package/dist/ui/pages/reset_password.js +9 -15
- package/dist/ui/pages/scheduled_draft.js +19 -25
- package/dist/ui/pages/signup.js +11 -17
- package/dist/ui/pages/system_console.js +16 -22
- package/dist/util.js +8 -19
- package/dist/visual/index.js +14 -20
- package/dist/visual/percy.js +4 -10
- package/package.json +1 -1
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('@playwright/test');
|
|
4
|
-
|
|
5
1
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
6
2
|
// See LICENSE.txt for license information.
|
|
7
|
-
|
|
3
|
+
import { expect } from '@playwright/test';
|
|
4
|
+
export default class NotificationsSettings {
|
|
8
5
|
container;
|
|
9
6
|
keysWithHighlightDesc;
|
|
10
7
|
constructor(container) {
|
|
@@ -12,7 +9,7 @@ class NotificationsSettings {
|
|
|
12
9
|
this.keysWithHighlightDesc = container.locator('#keywordsAndHighlightDesc');
|
|
13
10
|
}
|
|
14
11
|
async toBeVisible() {
|
|
15
|
-
await
|
|
12
|
+
await expect(this.container).toBeVisible();
|
|
16
13
|
}
|
|
17
14
|
async expandSection(section) {
|
|
18
15
|
if (section === 'keysWithHighlight') {
|
|
@@ -21,21 +18,18 @@ class NotificationsSettings {
|
|
|
21
18
|
}
|
|
22
19
|
}
|
|
23
20
|
async verifySectionIsExpanded(section) {
|
|
24
|
-
await
|
|
21
|
+
await expect(this.container.locator(`#${section}Edit`)).not.toBeVisible();
|
|
25
22
|
if (section === 'keysWithHighlight') {
|
|
26
|
-
await
|
|
27
|
-
await
|
|
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();
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
27
|
async getKeywordsInput() {
|
|
31
|
-
await
|
|
28
|
+
await expect(this.container.locator('input')).toBeVisible();
|
|
32
29
|
return this.container.locator('input');
|
|
33
30
|
}
|
|
34
31
|
async save() {
|
|
35
|
-
await
|
|
32
|
+
await expect(this.container.getByText('Save')).toBeVisible();
|
|
36
33
|
await this.container.getByText('Save').click();
|
|
37
34
|
}
|
|
38
35
|
}
|
|
39
|
-
|
|
40
|
-
module.exports = NotificationsSettings;
|
|
41
|
-
//# sourceMappingURL=notification_settings.js.map
|
|
@@ -1,32 +1,26 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('@playwright/test');
|
|
4
|
-
var notification_settings = require('./notification_settings.js');
|
|
5
|
-
|
|
6
1
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
7
2
|
// See LICENSE.txt for license information.
|
|
8
|
-
|
|
3
|
+
import { expect } from '@playwright/test';
|
|
4
|
+
import NotificationsSettings from './notification_settings';
|
|
5
|
+
export default class SettingsModal {
|
|
9
6
|
container;
|
|
10
7
|
notificationsSettingsTab;
|
|
11
8
|
notificationsSettings;
|
|
12
9
|
constructor(container) {
|
|
13
10
|
this.container = container;
|
|
14
11
|
this.notificationsSettingsTab = container.locator('#notificationsButton');
|
|
15
|
-
this.notificationsSettings = new
|
|
12
|
+
this.notificationsSettings = new NotificationsSettings(container.locator('#notificationsSettings'));
|
|
16
13
|
}
|
|
17
14
|
async toBeVisible() {
|
|
18
|
-
await
|
|
15
|
+
await expect(this.container).toBeVisible();
|
|
19
16
|
}
|
|
20
17
|
async openNotificationsTab() {
|
|
21
|
-
await
|
|
18
|
+
await expect(this.notificationsSettingsTab).toBeVisible();
|
|
22
19
|
await this.notificationsSettingsTab.click();
|
|
23
20
|
await this.notificationsSettings.toBeVisible();
|
|
24
21
|
}
|
|
25
22
|
async closeModal() {
|
|
26
23
|
await this.container.getByLabel('Close').click();
|
|
27
|
-
await
|
|
24
|
+
await expect(this.container).not.toBeVisible();
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
|
-
|
|
31
|
-
module.exports = SettingsModal;
|
|
32
|
-
//# sourceMappingURL=settings_modal.js.map
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('@playwright/test');
|
|
4
|
-
|
|
5
1
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
6
2
|
// See LICENSE.txt for license information.
|
|
7
|
-
|
|
3
|
+
import { expect } from '@playwright/test';
|
|
4
|
+
export default class ChannelsSidebarLeft {
|
|
8
5
|
container;
|
|
9
6
|
findChannelButton;
|
|
10
7
|
scheduledDraftCountonLHS;
|
|
@@ -14,14 +11,14 @@ class ChannelsSidebarLeft {
|
|
|
14
11
|
this.scheduledDraftCountonLHS = container.locator('span.scheduledPostBadge');
|
|
15
12
|
}
|
|
16
13
|
async toBeVisible() {
|
|
17
|
-
await
|
|
14
|
+
await expect(this.container).toBeVisible();
|
|
18
15
|
}
|
|
19
16
|
async assertNoPendingScheduledDraft() {
|
|
20
|
-
await
|
|
17
|
+
await expect(this.scheduledDraftCountonLHS).not.toBeVisible();
|
|
21
18
|
}
|
|
22
19
|
async assertscheduledDraftCountLHS(count) {
|
|
23
|
-
await
|
|
24
|
-
await
|
|
20
|
+
await expect(this.scheduledDraftCountonLHS).toBeVisible();
|
|
21
|
+
await expect(this.scheduledDraftCountonLHS).toHaveText(count);
|
|
25
22
|
}
|
|
26
23
|
/**
|
|
27
24
|
* Clicks on the sidebar channel link with the given name.
|
|
@@ -39,16 +36,13 @@ class ChannelsSidebarLeft {
|
|
|
39
36
|
async draftsVisible() {
|
|
40
37
|
const draftSidebarLink = this.container.getByText('Drafts', { exact: true });
|
|
41
38
|
await draftSidebarLink.waitFor();
|
|
42
|
-
await
|
|
39
|
+
await expect(draftSidebarLink).toBeVisible();
|
|
43
40
|
}
|
|
44
41
|
/**
|
|
45
42
|
* Verifies 'Drafts' as a sidebar link does not exist in LHS.
|
|
46
43
|
*/
|
|
47
44
|
async draftsNotVisible() {
|
|
48
45
|
const channel = this.container.getByText('Drafts', { exact: true });
|
|
49
|
-
await
|
|
46
|
+
await expect(channel).not.toBeVisible();
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
|
-
|
|
53
|
-
module.exports = ChannelsSidebarLeft;
|
|
54
|
-
//# sourceMappingURL=sidebar_left.js.map
|
|
@@ -1,13 +1,10 @@
|
|
|
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
|
-
|
|
8
1
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
9
2
|
// See LICENSE.txt for license information.
|
|
10
|
-
|
|
3
|
+
import { expect } from '@playwright/test';
|
|
4
|
+
import ChannelsPostCreate from './post_create';
|
|
5
|
+
import ChannelsPostEdit from './post_edit';
|
|
6
|
+
import ChannelsPost from './post';
|
|
7
|
+
export default class ChannelsSidebarRight {
|
|
11
8
|
container;
|
|
12
9
|
closeButton;
|
|
13
10
|
postCreate;
|
|
@@ -27,37 +24,37 @@ class ChannelsSidebarRight {
|
|
|
27
24
|
this.scheduledDraftSeeAllLink = container.locator('a:has-text("See all")');
|
|
28
25
|
this.scheduledDraftChannelInfoMessageText = container.locator('span:has-text("Message scheduled for")');
|
|
29
26
|
this.rhsPostBody = container.locator('.post-message__text');
|
|
30
|
-
this.postCreate = new
|
|
27
|
+
this.postCreate = new ChannelsPostCreate(container.getByTestId('comment-create'), true);
|
|
31
28
|
this.closeButton = container.locator('.sidebar--right__close');
|
|
32
29
|
this.editTextbox = container.locator('#edit_textbox');
|
|
33
|
-
this.postEdit = new
|
|
30
|
+
this.postEdit = new ChannelsPostEdit(container.locator('.post-edit__container'));
|
|
34
31
|
this.currentVersionEditedPosttext = (postID) => container.locator(`#rhsPostMessageText_${postID} p`);
|
|
35
32
|
this.restorePreviousPostVersionIcon = container.locator('button[aria-label="Select to restore an old message."]');
|
|
36
33
|
}
|
|
37
34
|
async toBeVisible() {
|
|
38
|
-
await
|
|
35
|
+
await expect(this.container).toBeVisible();
|
|
39
36
|
}
|
|
40
37
|
/**
|
|
41
38
|
* Returns the RHS post by post id
|
|
42
39
|
* @param postId Just the ID without the prefix
|
|
43
40
|
*/
|
|
44
41
|
async getPostById(postId) {
|
|
45
|
-
const post
|
|
46
|
-
await post
|
|
47
|
-
return new
|
|
42
|
+
const post = this.container.locator(`[id="rhsPost_${postId}"]`);
|
|
43
|
+
await post.waitFor();
|
|
44
|
+
return new ChannelsPost(post);
|
|
48
45
|
}
|
|
49
46
|
/**
|
|
50
47
|
* Return the last post in the RHS
|
|
51
48
|
*/
|
|
52
49
|
async getLastPost() {
|
|
53
|
-
const post
|
|
54
|
-
await post
|
|
55
|
-
return new
|
|
50
|
+
const post = this.container.getByTestId('rhsPostView').last();
|
|
51
|
+
await post.waitFor();
|
|
52
|
+
return new ChannelsPost(post);
|
|
56
53
|
}
|
|
57
54
|
async getFirstPost() {
|
|
58
|
-
const post
|
|
59
|
-
await post
|
|
60
|
-
return new
|
|
55
|
+
const post = this.container.getByTestId('rhsPostView').first();
|
|
56
|
+
await post.waitFor();
|
|
57
|
+
return new ChannelsPost(post);
|
|
61
58
|
}
|
|
62
59
|
/**
|
|
63
60
|
* Closes the RHS
|
|
@@ -65,23 +62,20 @@ class ChannelsSidebarRight {
|
|
|
65
62
|
async close() {
|
|
66
63
|
await this.closeButton.waitFor();
|
|
67
64
|
await this.closeButton.click();
|
|
68
|
-
await
|
|
65
|
+
await expect(this.container).not.toBeVisible();
|
|
69
66
|
}
|
|
70
67
|
async clickOnSeeAllscheduledDrafts() {
|
|
71
68
|
await this.scheduledDraftSeeAllLink.isVisible();
|
|
72
69
|
await this.scheduledDraftSeeAllLink.click();
|
|
73
70
|
}
|
|
74
71
|
async toContainText(text) {
|
|
75
|
-
await
|
|
72
|
+
await expect(this.container).toContainText(text);
|
|
76
73
|
}
|
|
77
74
|
async verifyCurrentVersionPostMessage(postID, postMessageContent) {
|
|
78
|
-
|
|
75
|
+
expect(await this.currentVersionEditedPosttext(postID).textContent()).toBe(postMessageContent);
|
|
79
76
|
}
|
|
80
77
|
async restorePreviousPostVersion() {
|
|
81
78
|
await this.restorePreviousPostVersionIcon.isVisible();
|
|
82
79
|
await this.restorePreviousPostVersionIcon.click();
|
|
83
80
|
}
|
|
84
81
|
}
|
|
85
|
-
|
|
86
|
-
module.exports = ChannelsSidebarRight;
|
|
87
|
-
//# sourceMappingURL=sidebar_right.js.map
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('@playwright/test');
|
|
4
|
-
|
|
5
1
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
6
2
|
// See LICENSE.txt for license information.
|
|
7
|
-
|
|
3
|
+
import { expect } from '@playwright/test';
|
|
4
|
+
export default class ThreadFooter {
|
|
8
5
|
container;
|
|
9
6
|
replyButton;
|
|
10
7
|
constructor(container) {
|
|
@@ -12,7 +9,7 @@ class ThreadFooter {
|
|
|
12
9
|
this.replyButton = container.locator('.ReplyButton');
|
|
13
10
|
}
|
|
14
11
|
async toBeVisible() {
|
|
15
|
-
await
|
|
12
|
+
await expect(this.container).toBeVisible();
|
|
16
13
|
}
|
|
17
14
|
/**
|
|
18
15
|
* Clicks on the reply button in the thread footer to open the thread in RHS.
|
|
@@ -22,6 +19,3 @@ class ThreadFooter {
|
|
|
22
19
|
await this.replyButton.click();
|
|
23
20
|
}
|
|
24
21
|
}
|
|
25
|
-
|
|
26
|
-
module.exports = ThreadFooter;
|
|
27
|
-
//# sourceMappingURL=thread_footer.js.map
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('@playwright/test');
|
|
4
|
-
|
|
5
1
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
6
2
|
// See LICENSE.txt for license information.
|
|
7
|
-
|
|
3
|
+
import { expect } from '@playwright/test';
|
|
4
|
+
export default class UserProfilePopover {
|
|
8
5
|
container;
|
|
9
6
|
constructor(container) {
|
|
10
7
|
this.container = container;
|
|
11
8
|
}
|
|
12
9
|
async toBeVisible() {
|
|
13
|
-
await
|
|
10
|
+
await expect(this.container).toBeVisible();
|
|
14
11
|
}
|
|
15
12
|
async close() {
|
|
16
13
|
await this.container.getByLabel('Close user profile popover').click();
|
|
17
14
|
}
|
|
18
15
|
}
|
|
19
|
-
|
|
20
|
-
module.exports = UserProfilePopover;
|
|
21
|
-
//# sourceMappingURL=user_profile_popover.js.map
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('@playwright/test');
|
|
4
|
-
|
|
5
1
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
6
2
|
// See LICENSE.txt for license information.
|
|
7
|
-
|
|
3
|
+
import { expect } from '@playwright/test';
|
|
4
|
+
export default class Footer {
|
|
8
5
|
container;
|
|
9
6
|
copyright;
|
|
10
7
|
aboutLink;
|
|
@@ -20,9 +17,6 @@ class Footer {
|
|
|
20
17
|
this.helpLink = container.locator('text=Help');
|
|
21
18
|
}
|
|
22
19
|
async toBeVisible() {
|
|
23
|
-
await
|
|
20
|
+
await expect(this.copyright).toBeVisible();
|
|
24
21
|
}
|
|
25
22
|
}
|
|
26
|
-
|
|
27
|
-
module.exports = Footer;
|
|
28
|
-
//# sourceMappingURL=footer.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Locator } from '@playwright/test';
|
|
2
2
|
export default class GlobalHeader {
|
|
3
3
|
readonly container: Locator;
|
|
4
|
+
readonly accountMenuButton: Locator;
|
|
4
5
|
readonly productSwitchMenu: Locator;
|
|
5
6
|
readonly recentMentionsButton: Locator;
|
|
6
7
|
readonly settingsButton: Locator;
|
|
@@ -1,46 +1,42 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('@playwright/test');
|
|
4
|
-
|
|
5
1
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
6
2
|
// See LICENSE.txt for license information.
|
|
7
|
-
|
|
3
|
+
import { expect } from '@playwright/test';
|
|
4
|
+
export default class GlobalHeader {
|
|
8
5
|
container;
|
|
6
|
+
accountMenuButton;
|
|
9
7
|
productSwitchMenu;
|
|
10
8
|
recentMentionsButton;
|
|
11
9
|
settingsButton;
|
|
12
10
|
searchBox;
|
|
13
11
|
constructor(container) {
|
|
14
12
|
this.container = container;
|
|
13
|
+
this.accountMenuButton = container.getByRole('button', { name: "'s account menu" });
|
|
15
14
|
this.productSwitchMenu = container.getByRole('button', { name: 'Product switch menu' });
|
|
16
15
|
this.recentMentionsButton = container.getByRole('button', { name: 'Recent mentions' });
|
|
17
16
|
this.settingsButton = container.getByRole('button', { name: 'Settings' });
|
|
18
17
|
this.searchBox = container.locator('#searchFormContainer');
|
|
19
18
|
}
|
|
20
19
|
async toBeVisible(name) {
|
|
21
|
-
await
|
|
20
|
+
await expect(this.container.getByRole('heading', { name })).toBeVisible();
|
|
22
21
|
}
|
|
23
22
|
async switchProduct(name) {
|
|
24
23
|
await this.productSwitchMenu.click();
|
|
25
24
|
await this.container.getByRole('link', { name }).click();
|
|
26
25
|
}
|
|
27
26
|
async openSettings() {
|
|
28
|
-
await
|
|
27
|
+
await expect(this.settingsButton).toBeVisible();
|
|
29
28
|
await this.settingsButton.click();
|
|
30
29
|
}
|
|
31
30
|
async openRecentMentions() {
|
|
32
|
-
await
|
|
31
|
+
await expect(this.recentMentionsButton).toBeVisible();
|
|
33
32
|
await this.recentMentionsButton.click();
|
|
34
33
|
}
|
|
35
34
|
async openSearch() {
|
|
36
|
-
await
|
|
35
|
+
await expect(this.searchBox).toBeVisible();
|
|
37
36
|
await this.searchBox.click();
|
|
38
37
|
}
|
|
39
38
|
async closeSearch() {
|
|
40
|
-
await
|
|
39
|
+
await expect(this.searchBox).toBeVisible();
|
|
41
40
|
await this.searchBox.getByTestId('searchBoxClose').click();
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
|
-
|
|
45
|
-
module.exports = GlobalHeader;
|
|
46
|
-
//# sourceMappingURL=global_header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global_header.js","sources":["../../../src/ui/components/global_header.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {Locator, expect} from '@playwright/test';\n\nexport default class GlobalHeader {\n readonly container: Locator;\n\n readonly productSwitchMenu;\n readonly recentMentionsButton;\n readonly settingsButton;\n readonly searchBox;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.productSwitchMenu = container.getByRole('button', {name: 'Product switch menu'});\n this.recentMentionsButton = container.getByRole('button', {name: 'Recent mentions'});\n this.settingsButton = container.getByRole('button', {name: 'Settings'});\n this.searchBox = container.locator('#searchFormContainer');\n }\n\n async toBeVisible(name: string) {\n await expect(this.container.getByRole('heading', {name})).toBeVisible();\n }\n\n async switchProduct(name: string) {\n await this.productSwitchMenu.click();\n await this.container.getByRole('link', {name}).click();\n }\n\n async openSettings() {\n await expect(this.settingsButton).toBeVisible();\n await this.settingsButton.click();\n }\n\n async openRecentMentions() {\n await expect(this.recentMentionsButton).toBeVisible();\n await this.recentMentionsButton.click();\n }\n\n async openSearch() {\n await expect(this.searchBox).toBeVisible();\n await this.searchBox.click();\n }\n\n async closeSearch() {\n await expect(this.searchBox).toBeVisible();\n await this.searchBox.getByTestId('searchBoxClose').click();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,YAAY,CAAA;AACpB,IAAA,SAAS;AAET,IAAA,iBAAiB;AACjB,IAAA,oBAAoB;AACpB,IAAA,cAAc;AACd,IAAA,SAAS;AAElB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;AAE1B,QAAA,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAC,IAAI,EAAE,qBAAqB,EAAC,CAAC;AACrF,QAAA,IAAI,CAAC,oBAAoB,GAAG,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAC,IAAI,EAAE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;;"}
|
|
1
|
+
{"version":3,"file":"global_header.js","sources":["../../../src/ui/components/global_header.ts"],"sourcesContent":["// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n// See LICENSE.txt for license information.\n\nimport {Locator, expect} from '@playwright/test';\n\nexport default class GlobalHeader {\n readonly container: Locator;\n\n readonly accountMenuButton;\n readonly productSwitchMenu;\n readonly recentMentionsButton;\n readonly settingsButton;\n readonly searchBox;\n\n constructor(container: Locator) {\n this.container = container;\n\n this.accountMenuButton = container.getByRole('button', {name: \"'s account menu\"});\n this.productSwitchMenu = container.getByRole('button', {name: 'Product switch menu'});\n this.recentMentionsButton = container.getByRole('button', {name: 'Recent mentions'});\n this.settingsButton = container.getByRole('button', {name: 'Settings'});\n this.searchBox = container.locator('#searchFormContainer');\n }\n\n async toBeVisible(name: string) {\n await expect(this.container.getByRole('heading', {name})).toBeVisible();\n }\n\n async switchProduct(name: string) {\n await this.productSwitchMenu.click();\n await this.container.getByRole('link', {name}).click();\n }\n\n async openSettings() {\n await expect(this.settingsButton).toBeVisible();\n await this.settingsButton.click();\n }\n\n async openRecentMentions() {\n await expect(this.recentMentionsButton).toBeVisible();\n await this.recentMentionsButton.click();\n }\n\n async openSearch() {\n await expect(this.searchBox).toBeVisible();\n await this.searchBox.click();\n }\n\n async closeSearch() {\n await expect(this.searchBox).toBeVisible();\n await this.searchBox.getByTestId('searchBoxClose').click();\n }\n}\n"],"names":["expect"],"mappings":";;;;AAAA;AACA;AAIc,MAAO,YAAY,CAAA;AACpB,IAAA,SAAS;AAET,IAAA,iBAAiB;AACjB,IAAA,iBAAiB;AACjB,IAAA,oBAAoB;AACpB,IAAA,cAAc;AACd,IAAA,SAAS;AAElB,IAAA,WAAA,CAAY,SAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,GAAG,SAAS;AAE1B,QAAA,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAC,IAAI,EAAE,iBAAiB,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AAC,SAAS,CAAC,KAAK,EAAE;;AAGhC,IAAA,MAAM,WAAW,GAAA;QACb,MAAMA,WAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE;QAC1C,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,KAAK,EAAE;;AAEjE;;;;"}
|
|
@@ -1,77 +1,75 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
require('@playwright/test');
|
|
4
|
-
var app_bar = require('./channels/app_bar.js');
|
|
5
|
-
require('node:path');
|
|
6
|
-
require('uuid');
|
|
7
|
-
require('../../file.js');
|
|
8
|
-
require('async-wait-until');
|
|
9
|
-
var center_view = require('./channels/center_view.js');
|
|
10
|
-
var sidebar_left = require('./channels/sidebar_left.js');
|
|
11
|
-
var sidebar_right = require('./channels/sidebar_right.js');
|
|
12
|
-
var delete_post_modal = require('./channels/delete_post_modal.js');
|
|
13
|
-
var find_channels_modal = require('./channels/find_channels_modal.js');
|
|
14
|
-
var settings_modal = require('./channels/settings/settings_modal.js');
|
|
15
|
-
var footer = require('./footer.js');
|
|
16
|
-
var global_header = require('./global_header.js');
|
|
17
|
-
var search_popover = require('./channels/search_popover.js');
|
|
18
|
-
var main_header = require('./main_header.js');
|
|
19
|
-
var post_dot_menu = require('./channels/post_dot_menu.js');
|
|
20
|
-
var post_reminder_menu = require('./channels/post_reminder_menu.js');
|
|
21
|
-
var emoji_gif_picker = require('./channels/emoji_gif_picker.js');
|
|
22
|
-
var generic_confirm_modal = require('./channels/generic_confirm_modal.js');
|
|
23
|
-
var message_priority = require('./channels/message_priority.js');
|
|
24
|
-
var scheduled_draft_menu = require('./channels/scheduled_draft_menu.js');
|
|
25
|
-
var scheduled_draft_modal = require('./channels/scheduled_draft_modal.js');
|
|
26
|
-
var user_profile_popover = require('./channels/user_profile_popover.js');
|
|
27
|
-
var sidebar = require('./system_console/sidebar.js');
|
|
28
|
-
var navbar = require('./system_console/navbar.js');
|
|
29
|
-
var system_users = require('./system_console/sections/system_users/system_users.js');
|
|
30
|
-
var filter_popover = require('./system_console/sections/system_users/filter_popover.js');
|
|
31
|
-
var filter_menu = require('./system_console/sections/system_users/filter_menu.js');
|
|
32
|
-
var column_toggle_menu = require('./system_console/sections/system_users/column_toggle_menu.js');
|
|
33
|
-
var feature_discovery = require('./system_console/sections/system_users/feature_discovery.js');
|
|
34
|
-
var mobile_security = require('./system_console/sections/system_users/mobile_security.js');
|
|
35
|
-
|
|
36
1
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
37
2
|
// See LICENSE.txt for license information.
|
|
3
|
+
import ChannelsHeader from './channels/header';
|
|
4
|
+
import ChannelsAppBar from './channels/app_bar';
|
|
5
|
+
import ChannelsPostCreate from './channels/post_create';
|
|
6
|
+
import ChannelsPost from './channels/post';
|
|
7
|
+
import ChannelsCenterView from './channels/center_view';
|
|
8
|
+
import ChannelsSidebarLeft from './channels/sidebar_left';
|
|
9
|
+
import ChannelsSidebarRight from './channels/sidebar_right';
|
|
10
|
+
import DeletePostModal from './channels/delete_post_modal';
|
|
11
|
+
import FindChannelsModal from './channels/find_channels_modal';
|
|
12
|
+
import SettingsModal from './channels/settings/settings_modal';
|
|
13
|
+
import Footer from './footer';
|
|
14
|
+
import GlobalHeader from './global_header';
|
|
15
|
+
import SearchPopover from './channels/search_popover';
|
|
16
|
+
import MainHeader from './main_header';
|
|
17
|
+
import PostDotMenu from './channels/post_dot_menu';
|
|
18
|
+
import PostReminderMenu from './channels/post_reminder_menu';
|
|
19
|
+
import PostMenu from './channels/post_menu';
|
|
20
|
+
import ThreadFooter from './channels/thread_footer';
|
|
21
|
+
import EmojiGifPicker from './channels/emoji_gif_picker';
|
|
22
|
+
import GenericConfirmModal from './channels/generic_confirm_modal';
|
|
23
|
+
import MessagePriority from './channels/message_priority';
|
|
24
|
+
import ScheduledDraftMenu from './channels/scheduled_draft_menu';
|
|
25
|
+
import ScheduledDraftModal from './channels/scheduled_draft_modal';
|
|
26
|
+
import UserProfilePopover from './channels/user_profile_popover';
|
|
27
|
+
import SystemConsoleSidebar from './system_console/sidebar';
|
|
28
|
+
import SystemConsoleNavbar from './system_console/navbar';
|
|
29
|
+
import SystemUsers from './system_console/sections/system_users/system_users';
|
|
30
|
+
import SystemUsersFilterPopover from './system_console/sections/system_users/filter_popover';
|
|
31
|
+
import SystemUsersFilterMenu from './system_console/sections/system_users/filter_menu';
|
|
32
|
+
import SystemUsersColumnToggleMenu from './system_console/sections/system_users/column_toggle_menu';
|
|
33
|
+
import ChannelsPostEdit from './channels/post_edit';
|
|
34
|
+
import DeletePostConfirmationDialog from './channels/delete_post_confirmation_dialog';
|
|
35
|
+
import RestorePostConfirmationDialog from './channels/restore_post_confirmation_dialog';
|
|
36
|
+
import SystemConsoleFeatureDiscovery from './system_console/sections/system_users/feature_discovery';
|
|
37
|
+
import SystemConsoleMobileSecurity from './system_console/sections/system_users/mobile_security';
|
|
38
38
|
const components = {
|
|
39
|
-
GlobalHeader
|
|
40
|
-
SearchPopover
|
|
41
|
-
ChannelsCenterView
|
|
42
|
-
ChannelsSidebarLeft
|
|
43
|
-
ChannelsSidebarRight
|
|
44
|
-
ChannelsAppBar
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
exports.components = components;
|
|
77
|
-
//# sourceMappingURL=index.js.map
|
|
39
|
+
GlobalHeader,
|
|
40
|
+
SearchPopover,
|
|
41
|
+
ChannelsCenterView,
|
|
42
|
+
ChannelsSidebarLeft,
|
|
43
|
+
ChannelsSidebarRight,
|
|
44
|
+
ChannelsAppBar,
|
|
45
|
+
ChannelsHeader,
|
|
46
|
+
ChannelsPostCreate,
|
|
47
|
+
ChannelsPostEdit,
|
|
48
|
+
ChannelsPost,
|
|
49
|
+
FindChannelsModal,
|
|
50
|
+
DeletePostModal,
|
|
51
|
+
SettingsModal,
|
|
52
|
+
PostDotMenu,
|
|
53
|
+
PostMenu,
|
|
54
|
+
ThreadFooter,
|
|
55
|
+
Footer,
|
|
56
|
+
MainHeader,
|
|
57
|
+
PostReminderMenu,
|
|
58
|
+
EmojiGifPicker,
|
|
59
|
+
GenericConfirmModal,
|
|
60
|
+
ScheduledDraftMenu,
|
|
61
|
+
ScheduledDraftModal,
|
|
62
|
+
SystemConsoleSidebar,
|
|
63
|
+
SystemConsoleNavbar,
|
|
64
|
+
SystemUsers,
|
|
65
|
+
SystemUsersFilterPopover,
|
|
66
|
+
SystemUsersFilterMenu,
|
|
67
|
+
SystemUsersColumnToggleMenu,
|
|
68
|
+
SystemConsoleFeatureDiscovery,
|
|
69
|
+
SystemConsoleMobileSecurity,
|
|
70
|
+
MessagePriority,
|
|
71
|
+
UserProfilePopover,
|
|
72
|
+
DeletePostConfirmationDialog,
|
|
73
|
+
RestorePostConfirmationDialog,
|
|
74
|
+
};
|
|
75
|
+
export { components, GlobalHeader, ChannelsCenterView, ChannelsSidebarLeft, ChannelsSidebarRight, ChannelsAppBar, ChannelsHeader, ChannelsPostCreate, ChannelsPostEdit, ChannelsPost, FindChannelsModal, DeletePostModal, PostDotMenu, PostMenu, ThreadFooter, MessagePriority, DeletePostConfirmationDialog, };
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('@playwright/test');
|
|
4
|
-
|
|
5
1
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
6
2
|
// See LICENSE.txt for license information.
|
|
7
|
-
|
|
3
|
+
import { expect } from '@playwright/test';
|
|
4
|
+
export default class MainHeader {
|
|
8
5
|
container;
|
|
9
6
|
logo;
|
|
10
7
|
backButton;
|
|
@@ -14,9 +11,6 @@ class MainHeader {
|
|
|
14
11
|
this.backButton = container.getByTestId('back_button');
|
|
15
12
|
}
|
|
16
13
|
async toBeVisible() {
|
|
17
|
-
await
|
|
14
|
+
await expect(this.container).toBeVisible();
|
|
18
15
|
}
|
|
19
16
|
}
|
|
20
|
-
|
|
21
|
-
module.exports = MainHeader;
|
|
22
|
-
//# sourceMappingURL=main_header.js.map
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('@playwright/test');
|
|
4
|
-
|
|
5
1
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
6
2
|
// See LICENSE.txt for license information.
|
|
7
|
-
|
|
3
|
+
import { expect } from '@playwright/test';
|
|
4
|
+
export default class SystemConsoleNavbar {
|
|
8
5
|
container;
|
|
9
6
|
constructor(container) {
|
|
10
7
|
this.container = container;
|
|
11
8
|
}
|
|
12
9
|
async toBeVisible() {
|
|
13
|
-
await
|
|
10
|
+
await expect(this.container).toBeVisible();
|
|
14
11
|
}
|
|
15
12
|
}
|
|
16
|
-
|
|
17
|
-
module.exports = SystemConsoleNavbar;
|
|
18
|
-
//# sourceMappingURL=navbar.js.map
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('@playwright/test');
|
|
4
|
-
|
|
5
1
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
6
2
|
// See LICENSE.txt for license information.
|
|
7
|
-
|
|
3
|
+
import { expect } from '@playwright/test';
|
|
4
|
+
export default class SystemUsersColumnToggleMenu {
|
|
8
5
|
container;
|
|
9
6
|
constructor(container) {
|
|
10
7
|
this.container = container;
|
|
11
8
|
}
|
|
12
9
|
async toBeVisible() {
|
|
13
|
-
await
|
|
10
|
+
await expect(this.container).toBeVisible();
|
|
14
11
|
}
|
|
15
12
|
/**
|
|
16
13
|
* Return the locator for the menu item with the given name.
|
|
@@ -39,9 +36,6 @@ class SystemUsersColumnToggleMenu {
|
|
|
39
36
|
*/
|
|
40
37
|
async close() {
|
|
41
38
|
await this.container.press('Escape');
|
|
42
|
-
await
|
|
39
|
+
await expect(this.container).not.toBeVisible();
|
|
43
40
|
}
|
|
44
41
|
}
|
|
45
|
-
|
|
46
|
-
module.exports = SystemUsersColumnToggleMenu;
|
|
47
|
-
//# sourceMappingURL=column_toggle_menu.js.map
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var test = require('@playwright/test');
|
|
4
|
-
|
|
5
1
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
6
2
|
// See LICENSE.txt for license information.
|
|
3
|
+
import { expect } from '@playwright/test';
|
|
7
4
|
/**
|
|
8
5
|
* System Console -> Feature Discovery
|
|
9
6
|
*/
|
|
10
|
-
class FeatureDiscovery {
|
|
7
|
+
export default class FeatureDiscovery {
|
|
11
8
|
container;
|
|
12
9
|
constructor(container) {
|
|
13
10
|
this.container = container;
|
|
14
11
|
}
|
|
15
12
|
async toBeVisible() {
|
|
16
|
-
await
|
|
13
|
+
await expect(this.container).toBeVisible();
|
|
17
14
|
}
|
|
18
15
|
async toHaveTitle(title) {
|
|
19
|
-
await
|
|
16
|
+
await expect(this.container.getByTestId('featureDiscovery_title')).toHaveText(title);
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
|
-
|
|
23
|
-
module.exports = FeatureDiscovery;
|
|
24
|
-
//# sourceMappingURL=feature_discovery.js.map
|