test: try to scroll to bottom e2e
This commit is contained in:
parent
7ce0625047
commit
2d80d6962b
@ -320,7 +320,6 @@ jobs:
|
|||||||
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
|
# TURBO_TOKEN: '${{ secrets.TURBO_TOKEN }}'
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: always()
|
|
||||||
with:
|
with:
|
||||||
name: playwright-report
|
name: playwright-report
|
||||||
path: electron/playwright-report/
|
path: electron/playwright-report/
|
||||||
|
|||||||
@ -16,6 +16,7 @@ test.beforeAll(async () => {
|
|||||||
test('explores hub', async ({ hubPage }) => {
|
test('explores hub', async ({ hubPage }) => {
|
||||||
await hubPage.navigateByMenu()
|
await hubPage.navigateByMenu()
|
||||||
await hubPage.verifyContainerVisible()
|
await hubPage.verifyContainerVisible()
|
||||||
|
await hubPage.scrollToBottom()
|
||||||
const useModelBtn = page.getByTestId(/^use-model-btn-.*/).first()
|
const useModelBtn = page.getByTestId(/^use-model-btn-.*/).first()
|
||||||
|
|
||||||
await expect(useModelBtn).toBeVisible({
|
await expect(useModelBtn).toBeVisible({
|
||||||
|
|||||||
@ -8,9 +8,8 @@ export class BasePage {
|
|||||||
constructor(
|
constructor(
|
||||||
protected readonly page: Page,
|
protected readonly page: Page,
|
||||||
readonly action: CommonActions,
|
readonly action: CommonActions,
|
||||||
protected containerId: string,
|
protected containerId: string
|
||||||
) {
|
) {}
|
||||||
}
|
|
||||||
|
|
||||||
public getValue(key: string) {
|
public getValue(key: string) {
|
||||||
return this.action.getValue(key)
|
return this.action.getValue(key)
|
||||||
@ -37,6 +36,12 @@ export class BasePage {
|
|||||||
expect(container.isVisible()).toBeTruthy()
|
expect(container.isVisible()).toBeTruthy()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async scrollToBottom() {
|
||||||
|
await this.page.evaluate(() => {
|
||||||
|
window.scrollTo(0, document.body.scrollHeight)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
async waitUpdateLoader() {
|
async waitUpdateLoader() {
|
||||||
await this.isElementVisible('img[alt="Jan - Logo"]')
|
await this.isElementVisible('img[alt="Jan - Logo"]')
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user