Skip to content

Commit

Permalink
Merge pull request #188 from GoogleCloudDataproc/ojarjur/playwright-t…
Browse files Browse the repository at this point in the history
…imeout

Fix the Kokoro integration tests
  • Loading branch information
ojarjur authored Oct 23, 2024
2 parents 62d0b4c + dadb7d4 commit db8fff0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions ui-tests/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const baseConfig = require('@jupyterlab/galata/lib/playwright-config');

module.exports = {
...baseConfig,
timeout: 120000,
webServer: {
command: 'jlpm start --allow-root',
url: 'http://localhost:8888/lab',
Expand Down
15 changes: 11 additions & 4 deletions ui-tests/tests/bigquery_dataset_explorer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,20 @@ test('bigquery-dataset-explorer', async ({ page, request }) => {
.getByRole('tab', { name: 'Dataset Explorer - BigQuery' })
.click();

// Wait for the Dataset projects to populate.
await page.waitForSelector('div[role="treeitem"][aria-level="1"]');
await page.waitForSelector('div[role="treeitem"].caret-icon.down');

await page.locator('div[role="treeitem"].caret-icon.down').nth(1).click();
await page.locator('div[role="treeitem"][aria-level="1"]').first().click();
await page.locator('div[role="treeitem"].caret-icon.down').nth(1).click();
// Expand the first dataset project. This should always be the `bigquery-public-data` one.
await page.locator('div[role="treeitem"].caret-icon.down').nth(0).click();

await page.locator('div[role="treeitem"][aria-level="2"]').first().click();
// Wait for the first dataset to be displayed, and then expand it.
await page.waitForSelector('div[role="treeitem"][aria-level="2"]');
await page.waitForSelector('div[role="treeitem"].caret-icon.down');
await page.locator('div[role="treeitem"].caret-icon.down').nth(0).click();

// Click on the first table displayed.
await page.locator('div[role="treeitem"][aria-level="3"]').first().click();
await page.getByText('Schema', { exact: true }).click();
await page.getByText('Preview', { exact: true }).click();
} else {
Expand Down

0 comments on commit db8fff0

Please sign in to comment.