forked from GaloyMoney/blink-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some unsucessful attempt at Detox. it doesn't start. will revisit later.
- Loading branch information
1 parent
357bc9f
commit a7b360c
Showing
9 changed files
with
982 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"testRunner": "jest", | ||
"runnerConfig": "e2e/config.json", | ||
"configurations": { | ||
"ios": { | ||
"type": "ios.simulator", | ||
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/Bitcoin Beach.app", | ||
"build": "xcodebuild -workspace ios/GaloyApp.xcworkspace -scheme GaloyApp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build", | ||
"device": { | ||
"type": "iPhone 11" | ||
} | ||
}, | ||
"android": { | ||
"type": "android.emulator", | ||
"binaryPath": "SPECIFY_PATH_TO_YOUR_APP_BINARY", | ||
"device": { | ||
"avdName": "Pixel_2_API_29" | ||
} | ||
} | ||
} | ||
} | ||
|
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,33 @@ | ||
describe('PostList', () => { | ||
beforeEach(async () => { | ||
await device.reloadReactNative(); | ||
}); | ||
|
||
it('render a tappable list of posts', async () => { | ||
// await expect(element(by.id('post-list'))).toBeVisible(); | ||
// await waitFor(element(by.id('post-row-0'))) | ||
// .toBeVisible() | ||
// .withTimeout(2000); | ||
// await element(by.id('post-row-0')).tap(); | ||
// await expect(element(by.id('post-title'))).toBeVisible(); | ||
}); | ||
|
||
it('should have get started', async () => { | ||
expect(true).toBeTruthy() | ||
// console.log("get started start") | ||
// await expect(element(by.id('getStarted'))).toBeVisible(); | ||
// console.log("get start middle") | ||
// const imagePath = await device.takeScreenshot('opened general section'); | ||
|
||
}); | ||
|
||
// it('should show hello screen after tap', async () => { | ||
// await element(by.id('hello_button')).tap(); | ||
// await expect(element(by.text('Hello!!!'))).toBeVisible(); | ||
// }); | ||
|
||
// it('should show world screen after tap', async () => { | ||
// await element(by.id('world_button')).tap(); | ||
// await expect(element(by.text('World!!!'))).toBeVisible(); | ||
// }); | ||
}); |
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,8 @@ | ||
{ | ||
"testEnvironment": "./environment", | ||
"testRunner": "jest-circus/runner", | ||
"testTimeout": 120000, | ||
"testRegex": "\\.e2e\\.js$", | ||
"reporters": ["detox/runners/jest/streamlineReporter"], | ||
"verbose": true | ||
} |
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,23 @@ | ||
const { | ||
DetoxCircusEnvironment, | ||
SpecReporter, | ||
WorkerAssignReporter, | ||
} = require('detox/runners/jest-circus'); | ||
|
||
class CustomDetoxEnvironment extends DetoxCircusEnvironment { | ||
constructor(config) { | ||
super(config); | ||
|
||
// Can be safely removed, if you are content with the default value (=300000ms) | ||
this.initTimeout = 300000; | ||
|
||
// This takes care of generating status logs on a per-spec basis. By default, Jest only reports at file-level. | ||
// This is strictly optional. | ||
this.registerListeners({ | ||
SpecReporter, | ||
WorkerAssignReporter, | ||
}); | ||
} | ||
} | ||
|
||
module.exports = CustomDetoxEnvironment; |
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.