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