-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
105 additions
and
45 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,42 @@ | ||
import { browser } from '@wdio/globals'; | ||
import { FlashResults } from '../../lib/gui/app/components/flash-results/flash-results'; | ||
|
||
describe('Electron Testing', () => { | ||
it('should print application title', async () => { | ||
console.log('Hello', await browser.getTitle(), 'application!'); | ||
}); | ||
|
||
it('should "flash from file"', async () => { | ||
const flashFromFileButton = $('button[data-testid="flash-from-file"]') | ||
await flashFromFileButton.waitForDisplayed({timeout: 10000}) | ||
const flashFromFileButton = $('button[data-testid="flash-from-file"]'); | ||
await flashFromFileButton.waitForDisplayed({ timeout: 10000 }); | ||
// const isDisplayed = await flashFromFileButton.isDisplayed(); | ||
await flashFromFileButton.click(); | ||
|
||
const selectTargetButton = $('button[data-testid="select-target-button"]') | ||
await selectTargetButton.waitForClickable({timeout: 30000}) | ||
const selectTargetButton = $('button[data-testid="select-target-button"]'); | ||
await selectTargetButton.waitForClickable({ timeout: 30000 }); | ||
await selectTargetButton.click(); | ||
|
||
// TODO: Select target using ENV variable for the drive | ||
const targetVirtualDrive = $('=/dev/disk8') | ||
await targetVirtualDrive.waitForDisplayed({timeout: 10000}) | ||
await targetVirtualDrive.click(); | ||
// TODO: Select target using ENV variable for the drive | ||
const targetVirtualDrive = $('=/dev/disk8'); | ||
await targetVirtualDrive.waitForDisplayed({ timeout: 10000 }); | ||
await targetVirtualDrive.click(); | ||
|
||
const validateTargetButton = $('button[data-testid="validate-target-button"]') | ||
await validateTargetButton.waitForClickable({timeout: 10000}) | ||
const validateTargetButton = $( | ||
'button[data-testid="validate-target-button"]', | ||
); | ||
await validateTargetButton.waitForClickable({ timeout: 10000 }); | ||
await validateTargetButton.click(); | ||
const flashNowButton= $('button[data-testid="flash-now-button"]') | ||
await flashNowButton.waitForClickable({timeout: 10000}) | ||
|
||
const flashNowButton = $('button[data-testid="flash-now-button"]'); | ||
await flashNowButton.waitForClickable({ timeout: 10000 }); | ||
await flashNowButton.click(); | ||
|
||
// FIXME: not able to find the flashResults :( | ||
const flashResults = $('span[data-testid="flash-results"]') | ||
await flashResults.waitForDisplayed({timeout: 20000}) | ||
expect(flashResults.getText()).toBe('Flash Completed!') | ||
// we're good; | ||
// now we should check the content of the image but we can do that outside wdio | ||
// FIXME: not able to find the flashResults :( | ||
const flashResults = $('span[data-testid="flash-results"]'); | ||
await flashResults.waitForDisplayed({ timeout: 20000 }); | ||
|
||
expect(flashResults.getText()).toBe('Flash Completed!'); | ||
|
||
// we're good; | ||
// now we should check the content of the image but we can do that outside wdio | ||
}); | ||
}); |
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