Created
February 17, 2020 15:53
-
-
Save shamique/e469c48b25ebd0559c8aec563b9ac4a1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var expect = require('chai').expect; | |
describe('Simple App testing', () => { | |
// Adding time out to make sure the app is load prior to test is run | |
beforeEach(() => { | |
$("~app-root").waitForDisplayed(11000, false) | |
}); | |
it('Valid Login Test', async => { | |
$('~username').setValue("shamique"); | |
$('~password').setValue("123456"); | |
$("~login").click(); | |
$("~loginstatus").waitForDisplayed(11000); | |
const status = $("~loginstatus").getText(); | |
expect(status).to.equal('success'); | |
}); | |
it('Invalid Login Test', async => { | |
$('~username').setValue("shamique"); | |
$('~password').setValue("12345"); | |
$("~login").click(); | |
$("~loginstatus").waitForDisplayed(11000); | |
const status = $("~loginstatus").getText(); | |
expect(status).to.equal('fail'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment