forked from pagopa/io-app
-
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.
chore: [IAI-91] Execute e2e tests with release build on CI (pagopa#3496)
* add metro config to support custom extensions override * extract originSchemasWhiteList and create e2e mock * update cirleci config in order to execute the e2e test with release config * test on CI * add jest-circus * test retries * test workers * restore only on master config * update docs
- Loading branch information
1 parent
22c948e
commit 32d0ca1
Showing
17 changed files
with
128 additions
and
90 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"testRunner": "jest", | ||
"runnerConfig": "jest-e2e.config.js", | ||
"apps": { | ||
"ios.release": { | ||
"type": "ios.app", | ||
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/ItaliaApp.app", | ||
"build": "xcodebuild -workspace ios/ItaliaApp.xcworkspace -scheme ItaliaApp -configuration Release -sdk iphonesimulator -derivedDataPath ios/build" | ||
}, | ||
"ios.debug": { | ||
"type": "ios.app", | ||
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/ItaliaApp.app", | ||
"build": "xcodebuild -workspace ios/ItaliaApp.xcworkspace -scheme ItaliaApp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build" | ||
} | ||
}, | ||
"devices": { | ||
"simulator": { | ||
"type": "ios.simulator", | ||
"device": { | ||
"type": "iPhone 12 Pro Max" | ||
} | ||
} | ||
}, | ||
"configurations": { | ||
"ios.sim.release": { | ||
"device": "simulator", | ||
"app": "ios.release" | ||
}, | ||
"ios.sim.debug": { | ||
"device": "simulator", | ||
"app": "ios.debug" | ||
} | ||
} | ||
} |
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,23 @@ | ||
const { | ||
DetoxCircusEnvironment, | ||
SpecReporter, | ||
WorkerAssignReporter, | ||
} = require('detox/runners/jest-circus'); | ||
|
||
class CustomDetoxEnvironment extends DetoxCircusEnvironment { | ||
constructor(config, context) { | ||
super(config, context); | ||
|
||
// 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const { setLocale } = require("../ts/i18n"); | ||
const { launchAppConfig } = require("../ts/__e2e__/config"); | ||
|
||
beforeAll(async () => { | ||
// custom setup | ||
console.log("Initializing Detox"); | ||
await device.launchApp(launchAppConfig); | ||
// enforce IT locale because that's how the API are configured | ||
setLocale("it"); | ||
}); |
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 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
2 changes: 0 additions & 2 deletions
2
ts/features/wallet/onboarding/__e2e__/creditCardOnboarding.e2e.ts
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,2 @@ | ||
// if the app is running in e2e env, add "http" to allow the dev-server usage | ||
export const originSchemasWhiteList = ["https://*", "intent://*", "http://*"]; |
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 @@ | ||
import { isDevEnv } from "../../utils/environment"; | ||
|
||
// if the app is running in dev env, add "http" to allow the dev-server usage | ||
export const originSchemasWhiteList = [ | ||
"https://*", | ||
"intent://*", | ||
...(isDevEnv ? ["http://*"] : []) | ||
]; |
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