Skip to content

Commit

Permalink
Change sample test to check if wdio successfully connects to simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
jiji14 committed Nov 9, 2023
1 parent 22ea874 commit 6c70b16
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions e2e-tests/specs/sample.js
Original file line number Diff line number Diff line change
@@ -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();
});
});

0 comments on commit 6c70b16

Please sign in to comment.