Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
address CR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
beyang committed Jun 5, 2019
1 parent 5fda239 commit 2f6a5f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions web/src/e2e/index.e2e.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from 'path'
import puppeteer from 'puppeteer'
import { saveScreenshotsUponFailuresAndClosePage } from '../../../shared/src/util/screenshotReporter'
import { retry } from '../util/e2e-test-utils'
import { baseURL, Driver, gitHubToken, newDriverForTest, percySnapshot } from './util'
import { baseURL, createDriverForTest, Driver, gitHubToken, percySnapshot } from './util'

// 1 minute test timeout. This must be greater than the default Puppeteer
// command timeout of 30s in order to get the stack trace to point to the
Expand Down Expand Up @@ -52,7 +52,7 @@ describe('e2e test suite', function(this: any): void {
// Start browser.
beforeAll(
async () => {
driver = await newDriverForTest()
driver = await createDriverForTest()
await init()
},
// Cloning the repositories takes ~1 minute, so give initialization 2
Expand Down
8 changes: 4 additions & 4 deletions web/src/e2e/regression.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as path from 'path'
import { saveScreenshotsUponFailuresAndClosePage } from '../../../shared/src/util/screenshotReporter'
import { baseURL, Driver, gitHubToken, newDriverForTest } from './util'
import { baseURL, createDriverForTest, Driver, gitHubToken } from './util'

// 1 minute test timeout. This must be greater than the default Puppeteer
// command timeout of 30s in order to get the stack trace to point to the
Expand All @@ -26,7 +26,7 @@ describe('e2e test suite', function(this: any): void {
// Start browser.
beforeAll(
async () => {
driver = await newDriverForTest()
driver = await createDriverForTest()
await init()
},
// Cloning the repositories takes ~1 minute, so give initialization 2
Expand Down Expand Up @@ -156,10 +156,10 @@ describe('e2e test suite', function(this: any): void {
5 * 1000
)
test(
'Perform global text search for "error", expect a few results.',
'Perform global text search for "error type:", expect a few results.',
async () => {
await driver.page.goto(baseURL + '/search?q=%22error+type:%22')
await driver.page.waitForFunction(() => document.querySelectorAll('.e2e-search-result').length > 10)
await driver.page.waitForFunction(() => document.querySelectorAll('.e2e-search-result').length > 5)
},
5 * 1000
)
Expand Down
2 changes: 1 addition & 1 deletion web/src/e2e/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export class Driver {
}
}

export async function newDriverForTest(): Promise<Driver> {
export async function createDriverForTest(): Promise<Driver> {
let args: string[] = []
if (process.getuid() === 0) {
// TODO don't run as root in CI
Expand Down

0 comments on commit 2f6a5f8

Please sign in to comment.