<commit_before>module.exports = {
  before: function (browser, done) {
    browser.globals.startServer(done);
  },

  after : function(browser, done) {
    browser.globals.stopServer(done);
  },

  'Failed Login' : function(browser) {
    browser
      .url('http://localhost:7890')
      .page.Login().authenticate('admin', 'wrong')
      .page.Login().alertContains('Incorrect password.')
      .page.Login().authenticate('admina', '<PASSWORD>')
      .page.Login().alertContains('Incorrect username.')
      .end();
  },

  'Successfully Login' : function(browser) {
    browser
      .url('http://localhost:7890')
      .page.Login().authenticate('admin', '<PASSWORD>')
      .page.Navbar().loggedUserIs('admin')
      .end();
  },

  'Logout': function(browser) {
    browser
      .url('http://localhost:7890')
      .page.Login().authenticate('admin', '<PASSWORD>')
      .page.Navbar().logout()
      .page.Login().isLoginPage()
      .end();
  }
};<commit_msg>A small refactoring.<commit_after>module.exports = {
  before: function (browser, done) {
    browser.globals.startServer(done);
  },

  after: function(browser, done) {
    browser.globals.stopServer(done);
  },

  beforeEach: function(browser) {
    browser
      .url('http://localhost:7890');
  },

  'Failed login': function(browser) {
    browser
      .page.Login().authenticate('admin', 'wrong')
      .page.Login().alertContains('Incorrect password.')
      .page.Login().authenticate('admina', '<PASSWORD>')
      .page.Login().alertContains('Incorrect username.')
      .end();
  },

  'Successfully login': function(browser) {
    browser
      .page.Login().authenticate('admin', '<PASSWORD>')
      .page.Navbar().loggedUserIs('admin')
      .end();
  },

  'Logout': function(browser) {
    browser
      .page.Login().authenticate('admin', '<PASSWORD>')
      .page.Navbar().logout()
      .page.Login().isLoginPage()
      .end();
  }
};
{'fraction_non_alphanumeric': 0.1934477379095164, 'fraction_numerical': 0.008320332813312533, 'mean_word_length': 3.1023454157782515, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '6063100', 'n_tokens_mistral': 634, 'n_tokens_neox': 606, 'n_words': 87}