From 22ea874576cadc5c85d488b5548ab4ffabea679c Mon Sep 17 00:00:00 2001 From: Jijeong Lee Date: Thu, 9 Nov 2023 11:04:13 -0800 Subject: [PATCH] add sample test file --- e2e-tests/specs/sample.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 e2e-tests/specs/sample.js 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!'); + }); +});