diff --git a/e2e-tests/specs/sample.js b/e2e-tests/specs/sample.js new file mode 100644 index 000000000..eb44facb3 --- /dev/null +++ b/e2e-tests/specs/sample.js @@ -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!'); + }); +});