Skip to content

Commit

Permalink
add sample test file
Browse files Browse the repository at this point in the history
  • Loading branch information
jiji14 committed Nov 9, 2023
1 parent 6a64e6d commit 22ea874
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions e2e-tests/specs/sample.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const { expect, browser, $ } = 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!');
});
});

0 comments on commit 22ea874

Please sign in to comment.