<commit_before>'use strict';

exports.config = {
  seleniumAddress: 'http://localhost:4444/wd/hub',
  specs: [
    'app/account.js',
    'app/action.js',
    'app/app.js',
    'app/config.js',
    'app/connection.js',
    'app/log.js',
    'app/rate.js',
    'app/routes.js',
    'app/schema.js',
    'app/scope.js',
    'app/statistic.js',
    'app/user.js',
    'app/import.js'
  ],
  baseUrl: 'http://127.0.0.1:8008/fusio/index.htm',
  capabilities: {
    browserName: 'firefox',
    version: '47'
  },
  onPrepare: function() {
    // login
    browser.driver.get('http://127.0.0.1:8008/fusio/index.htm#/login');

    element(by.model('credentials.username')).sendKeys('Developer');
    element(by.model('credentials.password')).sendKeys('<PASSWORD>');
    element(by.css('button[type=submit]')).click().then(function(){
      console.log('Button clicked');
    });

    element(by.css('body')).getAttribute('innerHTML').then(function(value){
      console.log(value);
    });
    
    return browser.driver.wait(function() {
      return browser.driver.getCurrentUrl().then(function(url) {
        console.log(url);
        return /#\/dashboard/.test(url);
      });
    }, 10000);
  }
};<commit_msg>wait for element to be clickable<commit_after>'use strict';

exports.config = {
  seleniumAddress: 'http://localhost:4444/wd/hub',
  specs: [
    'app/account.js',
    'app/action.js',
    'app/app.js',
    'app/config.js',
    'app/connection.js',
    'app/log.js',
    'app/rate.js',
    'app/routes.js',
    'app/schema.js',
    'app/scope.js',
    'app/statistic.js',
    'app/user.js',
    'app/import.js'
  ],
  baseUrl: 'http://127.0.0.1:8008/fusio/index.htm',
  capabilities: {
    browserName: 'firefox',
    version: '47'
  },
  onPrepare: function() {
    // login
    browser.driver.get('http://127.0.0.1:8008/fusio/index.htm#/login');

    element(by.model('credentials.username')).sendKeys('Developer');
    element(by.model('credentials.password')).sendKeys('<PASSWORD>');

    var EC = protractor.ExpectedConditions;
    var submitButton = element(by.css('button[type=submit]'));

    browser.wait(EC.elementToBeClickable(submitButton), 5000);
    submitButton.click();

    element(by.css('body')).getAttribute('innerHTML').then(function(value){
      console.log(value);
    });

    return browser.driver.wait(function() {
      return browser.driver.getCurrentUrl().then(function(url) {
        console.log(url);
        return /#\/dashboard/.test(url);
      });
    }, 10000);
  }
};
{'fraction_non_alphanumeric': 0.20398406374501993, 'fraction_numerical': 0.026294820717131476, 'mean_word_length': 3.0762987012987013, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6688448', 'n_tokens_mistral': 933, 'n_tokens_neox': 895, 'n_words': 101}