From 6c70b16b770d4846d2beeb770e9df6bed517796b Mon Sep 17 00:00:00 2001 From: Jiji14 Date: Thu, 9 Nov 2023 12:05:55 -0800 Subject: [PATCH] Change sample test to check if wdio successfully connects to simulator --- e2e-tests/specs/sample.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/e2e-tests/specs/sample.js b/e2e-tests/specs/sample.js index eb44facb3..e1f9f6211 100644 --- a/e2e-tests/specs/sample.js +++ b/e2e-tests/specs/sample.js @@ -1,14 +1,9 @@ -const { expect, browser, $ } = require('@wdio/globals'); +const { expect, $ } = require('@wdio/globals'); -describe('My Login application', () => { - it('should login with valid credentials', async () => { - await browser.url(`https://the-internet.herokuapp.com/login`); - - await $('#username').setValue('tomsmith'); - await $('#password').setValue('SuperSecretPassword!'); - await $('button[type="submit"]').click(); - - await expect($('#flash')).toBeExisting(); - await expect($('#flash')).toHaveTextContaining('You logged into a secure area!'); +describe('Connect test', () => { + it('should call app successfully', async () => { + // todo : add selectorAndroid + const selectorIOS = await $('UIATarget.localTarget().frontMostApp().mainWindow()'); + expect(selectorIOS).toBeDisplayed(); }); });