2024-01-31 14:35:41 +03:00
|
|
|
/** @file Test the user menu. */
|
|
|
|
import * as test from '@playwright/test'
|
|
|
|
|
|
|
|
import * as actions from './actions'
|
|
|
|
|
2024-06-20 19:19:01 +03:00
|
|
|
test.test('user menu', ({ page }) =>
|
2024-07-16 12:55:45 +03:00
|
|
|
actions
|
|
|
|
.mockAllAndLogin({ page })
|
|
|
|
.openUserMenu()
|
2024-07-26 09:34:51 +03:00
|
|
|
.do(async (thePage) => {
|
2024-07-16 12:55:45 +03:00
|
|
|
await test.expect(actions.locateUserMenu(thePage)).toBeVisible()
|
2024-07-26 09:34:51 +03:00
|
|
|
}),
|
2024-06-20 19:19:01 +03:00
|
|
|
)
|
2024-01-31 14:35:41 +03:00
|
|
|
|
2024-06-20 19:19:01 +03:00
|
|
|
test.test('download app', ({ page }) =>
|
2024-07-16 12:55:45 +03:00
|
|
|
actions
|
|
|
|
.mockAllAndLogin({ page })
|
|
|
|
.openUserMenu()
|
2024-07-26 09:34:51 +03:00
|
|
|
.userMenu.downloadApp(async (download) => {
|
2024-07-16 12:55:45 +03:00
|
|
|
await download.cancel()
|
|
|
|
test.expect(download.url()).toMatch(/^https:[/][/]objects.githubusercontent.com/)
|
2024-07-26 09:34:51 +03:00
|
|
|
}),
|
2024-06-20 19:19:01 +03:00
|
|
|
)
|