-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
264 sim fix frontend e2e tests (#271)
* fix: fixed e2e tests to create required validators before run conracts * feat: updated tests and added page factory and driver settings * fix: added common create validator util in settings page
- Loading branch information
1 parent
4fd2663
commit 3bc136d
Showing
9 changed files
with
70 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import { Builder, Browser, WebDriver } from 'selenium-webdriver'; | ||
import { Builder, Browser, WebDriver } from 'selenium-webdriver' | ||
|
||
export async function getDriver():Promise<WebDriver> { | ||
return new Builder().forBrowser(Browser.CHROME).build(); | ||
} | ||
export async function getDriver(): Promise<WebDriver> { | ||
const driver = await new Builder().forBrowser(Browser.CHROME).build() | ||
await driver.manage().setTimeouts({ implicit: 10000 }) | ||
return driver | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { ContractsPage } from '../pages/ContractsPage.js' | ||
import { RunDebugPage } from '../pages/RunDebugPage.js' | ||
import { SettingsPage } from '../pages/SettingsPage.js' | ||
import { TutorialPage } from '../pages/TutorialPage.js' | ||
import { WebDriver } from 'selenium-webdriver' | ||
|
||
|
||
export class PageFactory { | ||
private _driver: WebDriver | ||
|
||
constructor(driver: WebDriver) { | ||
this._driver = driver | ||
} | ||
|
||
getContractsPage() { | ||
return new ContractsPage(this._driver) | ||
} | ||
getRunDebugPage() { | ||
return new RunDebugPage(this._driver) | ||
} | ||
getSettingsPage() { | ||
return new SettingsPage(this._driver) | ||
} | ||
|
||
getTutorialPage() { | ||
return new TutorialPage(this._driver) | ||
} | ||
} |