Last active
September 12, 2017 02:31
-
-
Save hyperh/8406e93678935b8bd1c57212938dbccc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import wd from 'wd'; | |
| jasmine.DEFAULT_TIMEOUT_INTERVAL = 60000; | |
| const PORT = 4723; | |
| const config = { | |
| platformName: 'Android', | |
| deviceName: 'Android Emulator', | |
| app: './android/app/build/outputs/apk/app-debug.apk' // relative to root of project | |
| }; | |
| const driver = wd.promiseChainRemote('localhost', PORT); | |
| beforeAll(async () => { | |
| await driver.init(config); | |
| await driver.sleep(2000); // wait for app to load | |
| }) | |
| test('appium renders', async () => { | |
| expect(await driver.hasElementByAccessibilityId('testview')).toBe(true); | |
| expect(await driver.hasElementByAccessibilityId('notthere')).toBe(false); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment