Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
Run detox against production build for ios
Browse files Browse the repository at this point in the history
Use iphone 11 for iphone tests
Do rotate test for tablet only
  • Loading branch information
tbergquist-godaddy authored and RobinCsl committed Jan 8, 2020
1 parent c631408 commit fb97df2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions e2e/hotels/hotelDetails/imageGallery.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ describe('Hotel details - Image Gallery', () => {
});

it('should display the same image after device rotation', async () => {
// This test might fail depending on your emulator. If you run on an emulator
// that has width >= 668 after rotating, the test will fail
// TODO: Figure out how to run on tablet only
await device.setOrientation('landscape');
await expect(element(by.id('photosStripeImage-1'))).toBeVisible();
await device.setOrientation('portrait');
await expect(element(by.id('photosStripeImage-1'))).toBeVisible();
// This test is tablet only, rotate is deactivated by native mobile app
if (device.name.includes('iPad Air 2')) {
await device.setOrientation('landscape');
await expect(element(by.id('photosStripeImage-1'))).toBeVisible();
await device.setOrientation('portrait');
await expect(element(by.id('photosStripeImage-1'))).toBeVisible();
}
});

it('should be possible to swipe right to see first image in the modal again', async () => {
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"deploy-translations": "yarn monorepo-babel-node packages/localization/src/scripts/Deployer.js",
"untranslated-strings": "yarn monorepo-babel-node packages/localization/src/scripts/UntranslatedStrings.js",
"e2e-aphone": "yarn detox build -c android.emu.debug && yarn detox test -c android.emu.debug",
"e2e-iphone": "yarn detox build -c ios.sim.debug && yarn detox test -c ios.sim.debug",
"e2e-ipad": "yarn detox build -c ios.sim.tablet.debug && yarn detox test -c ios.sim.tablet.debug",
"e2e-iphone": "yarn detox build -c ios.sim.release && yarn detox test -c ios.sim.release",
"e2e-ipad": "yarn detox build -c ios.sim.tablet.release && yarn detox test -c ios.sim.tablet.release",
"typecheck": "adeira-flow-bin",
"graphql": "kiwicom-fetch-schema",
"ios": "yarn react-native run-ios",
Expand Down Expand Up @@ -74,17 +74,17 @@
},
"detox": {
"configurations": {
"ios.sim.debug": {
"ios.sim.release": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/reactNativeApp.app",
"build": "xcodebuild -workspace ios/reactNativeApp.xcworkspace -scheme reactNativeApp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"build": "xcodebuild -workspace ios/reactNativeApp.xcworkspace -scheme reactNativeApp -configuration Release -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"device": {
"type": "iPhone 6"
"type": "iPhone 11"
}
},
"ios.sim.tablet.debug": {
"ios.sim.tablet.release": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/reactNativeApp.app",
"build": "xcodebuild -workspace ios/reactNativeApp.xcworkspace -scheme reactNativeApp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"build": "xcodebuild -workspace ios/reactNativeApp.xcworkspace -scheme reactNativeApp -configuration Release -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"device": {
"type": "iPad Air 2"
Expand Down

0 comments on commit fb97df2

Please sign in to comment.