Skip to content

Commit

Permalink
temp switch emulator
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Naranjo committed Sep 9, 2018
1 parent 3f6bb30 commit 971fb09
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
52 changes: 26 additions & 26 deletions detox/test/e2e/06.device.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,37 @@ describe('Device', () => {
// await expect(element(by.text('Hello!!!'))).toBeVisible();
// });

// it('launchApp({newInstance: true}) + sendToHome() + launchApp() - should bring up previous instance', async () => {
// await device.launchApp({newInstance: true});
// await element(by.text('Sanity')).tap();
// await element(by.text('Say Hello')).tap();
// await device.sendToHome();
// await device.launchApp();
it('launchApp({newInstance: true}) + sendToHome() + launchApp() - should bring up previous instance', async () => {
await device.launchApp({newInstance: true});
await element(by.text('Sanity')).tap();
await element(by.text('Say Hello')).tap();
await device.sendToHome();
await device.launchApp();

// await expect(element(by.text('Hello!!!'))).toBeVisible();
// });
await expect(element(by.text('Hello!!!'))).toBeVisible();
});

it('launchApp in a different language', async () => {
let languageAndLocale = {
language: "es-MX",
locale: "es-MX"
};
// it('launchApp in a different language', async () => {
// let languageAndLocale = {
// language: "es-MX",
// locale: "es-MX"
// };

await device.launchApp({newInstance: true, languageAndLocale});
await element(by.text('Language')).tap();
await expect(element(by.text(`Current locale: ${languageAndLocale.locale}`))).toBeVisible();
await expect(element(by.text(`Current language: ${languageAndLocale.language}`))).toBeVisible();
// await device.launchApp({newInstance: true, languageAndLocale});
// await element(by.text('Language')).tap();
// await expect(element(by.text(`Current locale: ${languageAndLocale.locale}`))).toBeVisible();
// await expect(element(by.text(`Current language: ${languageAndLocale.language}`))).toBeVisible();

languageAndLocale = {
language: "en-US",
locale: "en-US"
};
// languageAndLocale = {
// language: "en-US",
// locale: "en-US"
// };

await device.launchApp({newInstance: true, languageAndLocale});
await element(by.text('Language')).tap();
await expect(element(by.text(`Current locale: ${languageAndLocale.locale}`))).toBeVisible();
await expect(element(by.text(`Current language: ${languageAndLocale.language}`))).toBeVisible();
});
// await device.launchApp({newInstance: true, languageAndLocale});
// await element(by.text('Language')).tap();
// await expect(element(by.text(`Current locale: ${languageAndLocale.locale}`))).toBeVisible();
// await expect(element(by.text(`Current language: ${languageAndLocale.language}`))).toBeVisible();
// });

// it('resetContentAndSettings() + install() + relaunch() - should tap successfully', async () => {
// await device.resetContentAndSettings();
Expand Down
2 changes: 1 addition & 1 deletion detox/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"binaryPath": "android/app/build/outputs/apk/fromBin/release/app-fromBin-release.apk",
"build": "cd android && ./gradlew assembleFromBinRelease assembleFromBinReleaseAndroidTest -DtestBuildType=release && cd ..",
"type": "android.emulator",
"name": "Nexus_5X_API_26"
"name": "Pixel_2_XL_API_27"
},
"android.emu.debug.fromSource": {
"binaryPath": "android/app/build/outputs/apk/fromSource/debug/app-fromSource-debug.apk",
Expand Down

0 comments on commit 971fb09

Please sign in to comment.