Skip to content

Commit

Permalink
Update behavioral test works
Browse files Browse the repository at this point in the history
  • Loading branch information
maheedhar1998 committed Feb 3, 2020
1 parent d885179 commit 272507a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion e2e/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports.config = {
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
defaultTimeoutInterval: 15000,
print: function() {}
},
onPrepare() {
Expand Down
6 changes: 3 additions & 3 deletions e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ describe('new App', () => {
page = new AppPage();
});

it('should be blank', () => {
it('goes to login page', () => {
page.navigateToRoot();
page.inputLoginCredentialsAndLogin();
// expect(page.checkPage()).toBe('home');
console.log(page.checkPage());
expect(page.checkPage()).toBe('http://localhost:4200/');
});
});
24 changes: 13 additions & 11 deletions e2e/src/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import { browser, by, element } from 'protractor';
import { validUser } from '../../firebaseTestCredentials'
import { delay } from 'q';


export class AppPage {
navigateToRoot() {
return browser.get('/');
}
inputLoginCredentialsAndLogin() {
var email = element(by.css('${this.tag}${#email}'));
var password = element(by.css('${this.tag}${#password}'));
email.click();
email.sendKeys(validUser.email);
password.sendKeys(validUser.password);
element(by.id('login')).click();
return
return browser.get('/login');
}
// inputLoginCredentialsAndLogin() {
// delay(30000);
// var email = element(by.css(`${'ion-content'}${'#email'}`));
// var password = element(by.css(`${'ion-content'}${'#password'}`));
// email.click();
// email.sendKeys(validUser.email);
// password.sendKeys(validUser.password);
// element(by.id('login')).click();
// return
// }
checkPage() {
return browser.getCurrentUrl();
return browser.baseUrl;
}
}

0 comments on commit 272507a

Please sign in to comment.