This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* ワークスペースの横帯のタブを開くための道具(issue #1360 段 1)。
|
||||
*
|
||||
* アプリ・カレンダー・自動実行・設定の 4 つは「その他」の中へ畳んだので、押す前に
|
||||
* その入口を開く必要がある。目印(`space-tab-apps` など)は畳む前と同じなので、
|
||||
* ここを通せば呼ぶ側は今までどおり id だけを指定すればよい。
|
||||
*
|
||||
* チャットとファイルは横帯に出たままなので、この道具は要らない。
|
||||
*/
|
||||
import { expect, type Page } from '@playwright/test';
|
||||
|
||||
/** 「その他」の中に畳んである画面。 */
|
||||
export type OverflowSpaceTab = 'apps' | 'calendar' | 'schedules' | 'settings';
|
||||
|
||||
/**
|
||||
* 畳んである画面を開く。「その他」を押してからメニューの項目を押す。
|
||||
* 押したあとメニューは閉じる(項目を選ぶと閉じる作り)。
|
||||
*/
|
||||
export async function openSpaceTab(page: Page, tab: OverflowSpaceTab): Promise<void> {
|
||||
const more = page.getByTestId('space-tab-more');
|
||||
await expect(more).toBeVisible();
|
||||
await more.click();
|
||||
const item = page.getByTestId(`space-tab-${tab}`);
|
||||
await expect(item).toBeVisible();
|
||||
await item.click();
|
||||
await expect(page.getByTestId('space-tab-more-menu')).toHaveCount(0);
|
||||
}
|
||||
Reference in New Issue
Block a user