<commit_before>import {browser, element, by, By, $, $$, ExpectedConditions} from 'protractor';
var constants = require('../../testConstants');

export class BellowsLoginPage {
  get = function get() {
    browser.get(browser.baseUrl + '/auth/login');
  }

  form = element(by.id('login-loginForm'));
  infoMessages = element.all(by.className('alert-info'));
  errors = element.all(by.css('.alert-danger'));
  username = element(by.id('username'));
  password = element(by.id('password'));
  forgotPasswordLink = element(by.id('forgot_password'));
  submit     = element(by.id('login-submit'));

  login = function login(username : string, password : string) {
    browser.get(browser.baseUrl + '/auth/logout');

    this.get();
    this.username.sendKeys(username);
    this.password.sendKeys(password);
    this.submit.click();
  }

  loginAsAdmin = function loginAsAdmin() {
    this.login(constants.adminEmail, constants.adminPassword);
  }

  loginAsManager = function loginAsManager() {
    this.login(constants.managerEmail, constants.managerPassword);
  }

  loginAsUser = function loginAsUser() {
    this.login(constants.memberEmail, constants.memberPassword);
  }

  loginAsMember = this.loginAsUser;

  loginAsSecondUser = function loginAsSecondUser() {
    this.login(constants.member2Email, constants.member2Password);
  }

  loginAsSecondMember = this.loginAsSecondUser;

  loginAsObserver = function loginAsObserver() {
    this.login(constants.observerEmail, constants.observerPassword);
  }

  logout = function logout() {
    browser.get(browser.baseUrl + '/auth/logout');
  }
}

module.exports = new BellowsLoginPage();<commit_msg>Fixed conversion for loginPage<commit_after>import {browser, element, by, By, $, $$, ExpectedConditions} from 'protractor';
const constants = require('../../testConstants');

export class BellowsLoginPage {
  get() {
    browser.get(browser.baseUrl + '/auth/login');
  }

  form = element(by.id('login-loginForm'));
  infoMessages = element.all(by.className('alert-info'));
  errors = element.all(by.css('.alert-danger'));
  username = element(by.id('username'));
  password = element(by.id('password'));
  forgotPasswordLink = element(by.id('forgot_password'));
  submit     = element(by.id('login-submit'));

  login(username : string, password : string) {
    browser.get(browser.baseUrl + '/auth/logout');

    this.get();
    this.username.sendKeys(username);
    this.password.sendKeys(password);
    this.submit.click();
  }

  loginAsAdmin() {
    this.login(constants.adminEmail, constants.adminPassword);
  }

  loginAsManager() {
    this.login(constants.managerEmail, constants.managerPassword);
  }

  loginAsUser() {
    this.login(constants.memberEmail, constants.memberPassword);
  }

  loginAsMember = this.loginAsUser;

  loginAsSecondUser() {
    this.login(constants.member2Email, constants.member2Password);
  }

  loginAsSecondMember = this.loginAsSecondUser;

  loginAsObserver() {
    this.login(constants.observerEmail, constants.observerPassword);
  }

  logout() {
    browser.get(browser.baseUrl + '/auth/logout');
  }
}

module.exports = new BellowsLoginPage();
{'fraction_non_alphanumeric': 0.14968152866242038, 'fraction_numerical': 0.0012738853503184713, 'mean_word_length': 4.47212543554007, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3380952', 'n_tokens_mistral': 963, 'n_tokens_neox': 948, 'n_words': 150}