mirror of
https://github.com/hanzoai/team.git
synced 2026-09-30 01:57:35 +00:00
https://mattermost.atlassian.net/browse/MM-56672 https://mattermost.atlassian.net/browse/MM-56666 https://mattermost.atlassian.net/browse/MM-56673
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {expect, Locator} from '@playwright/test';
|
|
|
|
export default class SystemConsoleSidebar {
|
|
readonly container: Locator;
|
|
|
|
readonly searchInput: Locator;
|
|
|
|
constructor(container: Locator) {
|
|
this.container = container;
|
|
|
|
this.searchInput = container.getByPlaceholder('Find settings');
|
|
}
|
|
|
|
async toBeVisible() {
|
|
await expect(this.container).toBeVisible();
|
|
await expect(this.searchInput).toBeVisible();
|
|
}
|
|
|
|
/**
|
|
* Clicks on the sidebar section link with the given name. Pass the exact name of the section.
|
|
* @param sectionName
|
|
*/
|
|
async goToItem(sectionName: string) {
|
|
const section = this.container.getByText(sectionName, {exact: true});
|
|
await section.waitFor();
|
|
await section.click();
|
|
}
|
|
|
|
/**
|
|
* Searches for the given item in the sidebar search input.
|
|
* @param itemName
|
|
*/
|
|
async searchForItem(itemName: string) {
|
|
await this.searchInput.fill(itemName);
|
|
}
|
|
}
|
|
|
|
export {SystemConsoleSidebar};
|