Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var url = 'http://junction.dev.skygate.pl/';
- describe('Check main page', function () {
- // it('should have right title', function () {
- // return browser
- // .url(url)
- // .getTitle().should.eventually.be.equal('Junction');
- // });
- // it('should display error message', function () {
- // return browser
- // .waitForExist("#login")
- // .click('#login')
- // .waitForExist(".notification-wrapper")
- // });
- // it("should have proper error text", function () {
- // return browser
- // getText('.notification-wrapper', function (err, spans) {
- // expect(spans).to.equal('Please enter your email\n×');
- // });
- // });
- // });
- // You have to register firslty
- // describe('Successful login with Junction valid email and password', function () {
- // // To be successfully logged in you need to enter valid email and valid password.
- // // 1. You have to be registered to the application first.
- //
- // it('Should be redirected to my courses view', function () {
- // return browser
- // .url(url)
- // .waitForVisible("#username")
- // .addValue('#username', 'agata.wisniewska.skygate+admin@gmail.com')
- // .addValue('#loginCtrl #password', 'test1')
- // .waitForVisible('#login')
- // .click('#login')
- // .waitForVisible('.profile-toggle');
- // });
- // });
- //
- // describe('Unsuccessful login to application using correct email and incorrect password', function () {
- // // Make a mistake in one data.
- // // You have to be registered to the app first
- // it('Should display error message', function () {
- // return browser
- // .url(url)
- // .addValue('#username', 'agata.wisniewska.skygate+admin@gmail.com')
- // .addValue('#password', 'test0')
- // .click('#login')
- // .waitForExist(".notification-wrapper")
- // });
- //
- // it("should have proper error text", function () {
- // return browser
- // .getText('.notification-wrapper', function (err, spans) {
- // expect(spans).to.equal('email or/and password is incorrect\nx');
- // });
- // });
- // });
- //
- // describe('Unsucceful login to application using incorrect email and correct password', function () {
- // // Make a mistake in email address -> you can miss a dot, miss @/ or enter not existing email.
- // // You have to own your account on junction
- // it('Should display error message', function () {
- // return browser
- // .url(url)
- // .addValue('#username', 'agata.wisniewska@gmail.com')
- // .addValue('#password', 'test1')
- // .click('#login')
- // .waitForExist(".notification-wrapper")
- // });
- //
- // it("should have proper error text", function () {
- // return browser
- // .getText('.notification-wrapper', function (err, spans) {
- // expect(spans).to.equal('user does not exist\nx');
- // });
- // });
- // });
- //
- describe('Unsuccessful login to application using invalid both email address and password', function () {
- // Test the behaviour of app while entering both wrong email address and wrong password
- // You have to be registered
- it('Should display error message', function () {
- return browser
- .url(url)
- .waitForVisible("#username")
- .addValue('#username', 'agata.wisniewska@gmail.com')
- .addValue('#loginCtrl #password', 'test1')
- .click('#login')
- .waitForVisible(".notification-wrapper");
- });
- it("should have proper error text", function () {
- return browser
- .getText('[compile="notification.message"]', function (err, spans) {
- expect(spans).to.equal('user does not exist\nx');
- });
- });
- });
- //
- // describe('Unsuccessful login to application keeping password field blank', function () {
- // // Fill only one field / password or email, and the other keep blank.
- // // You have to be registered to app first.
- // it('Should display error message', function () {
- // return browser
- // .url(url)
- // .addValue('#username', 'agata.wisniewska@gmail.com')
- // .click('#login')
- // .waitForExist(".notification-wrapper")
- // });
- //
- // it("should have proper error text", function () {
- // return browser
- // .getText('.notification-wrapper', function (err, spans) {
- // expect(spans).to.equal('Please enter your password\nx');
- // });
- // });
- // });
- //
- // describe('Unsuccessful login to application keeeping email field blank', function () {
- // // Fill only one field / password or email, and the other keep blank.
- // // You have to be registered to app first.
- // it('Should display error message', function () {
- // return browser
- // .url(url)
- // .addValue('#password', 'test1')
- // .click('#login')
- // .waitForExist(".notification-wrapper")
- // });
- //
- // it("should have proper error text", function () {
- // return browser
- // .getText('.notification-wrapper', function (err, spans) {
- // expect(spans).to.equal('Please enter your email\nx');
- // });
- // });
- // });
- //
- // describe('Log in with Google', function () {
- // // 1. You have to have your own google account2. You have to choose this option by clicking on button "sign in with google"
- // // Choose an option to sign in with google
- // // 1. You have to own your personal google account2. Fill the fields email and password with correct data
- // it('Should be redirected to Google page', function () {
- // return browser.click('#googlelogin')
- // .waitForVisible('#Email')
- // .getTitle().should.eventually.be.equal("Logowanie – Konta Google")
- // });
- //
- // it('should be successfully log in', function () {
- // return browser
- // .addValue('#Email','agata.wisniewska.skygate@gmail.com')
- // .click('#next')
- // .waitForVisible('#Passwd')
- // .addValue('#Passwd', 'Test_123')
- // .click('#signIn')
- // .waitForVisible('#submit_approve_access')
- // .click('#submit_approve_access')
- // });
- // });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement