-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring playwright scripts to point to designated wallet (#1899)
Co-authored-by: Zsolt Szabo <[email protected]> Co-authored-by: William Allen <[email protected]>
- Loading branch information
1 parent
4e4b982
commit 45202f1
Showing
23 changed files
with
172 additions
and
127 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { ElectronApplication, Page, _electron as electron } from 'playwright'; | ||
import { test } from '@playwright/test'; | ||
import { LoginPage } from '../data_object_model/passphrase_login'; | ||
|
||
let electronApp: ElectronApplication; | ||
let page: Page; | ||
|
||
test.beforeAll(async () => { | ||
electronApp = await electron.launch({ args: ['./build/electron/main.js'] }); | ||
page = await electronApp.firstWindow(); | ||
}); | ||
|
||
test.afterAll(async () => { | ||
await page.close(); | ||
}); | ||
|
||
//Works and Passes | ||
test('Confirm can Create and Delete a Plot. ', async () => { | ||
//Pre-requisites to get user back to Wallet selection page | ||
await page.locator('button:has-text("Close")').click(); | ||
|
||
//Given I navigate to a Wallet | ||
await new LoginPage(page).getPlayWrightWallet(); | ||
|
||
//And I click on the Plots Icon | ||
await page.getByTestId('DashboardSideBar-plots').click(); | ||
|
||
//And I click on ADD A PLOT | ||
await page.getByRole('button', { name: '+ Add a Plot' }).click(); | ||
|
||
//When I add a Plot to a Plot NFT | ||
await page.getByRole('button', { name: 'Chia Proof of Space 1.0.11' }).click(); | ||
await page.getByRole('option', { name: 'Chia Proof of Space 1.0.11' }).click(); | ||
await page.getByRole('button', { name: '101.4GiB (k=32, temporary space: 239GiB)' }).click(); | ||
await page.getByRole('option', { name: '208.8GiB (k=33, temporary space: 521GiB)' }).click(); | ||
|
||
//Then I can Discard Plot Creation | ||
await page.locator('[data-testid="ArrowBackIosNewIcon"]').click(); | ||
await page.getByRole('button', { name: 'Discard' }).click(); | ||
}); |
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,57 @@ | ||
// import { ElectronApplication, Page, _electron as electron } from 'playwright'; | ||
// import { test} from '@playwright/test'; | ||
|
||
// let electronApp: ElectronApplication; | ||
// let page: Page; | ||
|
||
// test.beforeAll(async () => { | ||
// electronApp = await electron.launch({ args: ['./build/electron/main.js'] }); | ||
// page = await electronApp.firstWindow(); | ||
// }); | ||
|
||
// test.afterAll(async () => { | ||
// await page.close(); | ||
// }); | ||
|
||
// //BROWERS FEATURE WILL BE CHANGING. WILL IMPEMENT THIS AFTER!! | ||
// test('Confirm can Create and Delete a Plot. ', async () => { | ||
// //Pre-requisites to get user back to Wallet selection page | ||
// await page.locator('button:has-text("Close")').click(); | ||
|
||
// //Given I navigate to a Wallet | ||
// await page.locator('h6:has-text("playwright")').click(); | ||
|
||
// //And I click on the Plots Icon | ||
// await page.getByTestId('DashboardSideBar-plots').click(); | ||
|
||
// //And I click on ADD A PLOT | ||
// await page.getByRole('button', { name: '+ Add a Plot' }).click(); | ||
|
||
// //When I add a Plot Size | ||
// await page.getByRole('button', { name: 'Chia Proof of Space 1.0.11' }).click(); | ||
// await page.getByRole('option', { name: 'Chia Proof of Space 1.0.11' }).click(); | ||
|
||
// //And I set the location | ||
// await page.getByRole('button', { name: 'Browse' }).first().click(); | ||
// await page.on('dialog', (dialog) => dialog.accept()); | ||
|
||
// //await page.getByRole('button', { name: 'Close' }).click(); | ||
// //await page.getByRole('button', { name: '🧜 Jahi 1st Wallet 1922132445 more' }).click(); | ||
|
||
// // await page.getByLabel('Temporary folder location *').click(); | ||
// // await page.getByLabel('Final folder location *').click(); | ||
// // await page.locator('div').filter({ hasText: 'Final folder location * Selected' }).getByRole('button', { name: 'Selected' }).click(); | ||
// // await page.locator('#mui-component-select-p2SingletonPuzzleHash').click(); | ||
// // await page.getByRole('option', { name: 'Maroon Narwhal' }).click(); | ||
// // await page.getByRole('button', { name: 'Create' }).click(); | ||
// // await page.getByRole('row', { name: 'K-32, 101.348 GiB 0x8fa56b619e3b6d05c83412f839289dc1d90c4f92ab46ce98fd1b5b4309ab656bae6c92ab8b9769efbf1d31825c3eb647 txch17j7llengm98vtsdr03x0nz92l73hhszz58celd34vc68y69th5xsjg8f6d /Users/jahifaw/Downloads/plot-k32-2023-02-22-14-24-292325f6852d3b371917b32701e832fba2a333cedf73ce3b8845faff94b34983.plot Not Available more' }).getByRole('button', { name: 'more' }).click(); | ||
// // await page.getByRole('menuitem', { name: 'Delete' }).click(); | ||
// // await page.getByRole('button', { name: 'Delete' }).click(); | ||
|
||
// // await page.locator('#mui-component-select-p2SingletonPuzzleHash').click(); | ||
// // await page.getByRole('option', { name: 'Orange Peafowl' }).click(); | ||
|
||
// await page.locator('div').filter({ hasText: 'Add a Plot' }).getByRole('button').click(); | ||
// await page.getByText('You have made changes. Do you want to discard them?').click(); | ||
// await page.getByRole('button', { name: 'Discard' }).click(); | ||
// }); |
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
Oops, something went wrong.