<commit_before>// For authoring Nightwatch tests, see
// https://nightwatchjs.org/guide

module.exports = {
  before: function (browser) {
    browser.globals.waitForConditionTimeout = 15000;
  },
  'create wallet tests': browser => {
    // start browser
    browser
      .init()
      .url('https://localhost:8080')
      .waitForElementVisible('#app')
      .assert.title('MyEtherWallet | MEW')
      // click out overlay

      .waitForElementVisible('css selector', '.v-overlay')
      .click('css selector', '.v-overlay')
      // actual test starts here
      // wait and find create wallet button

      .waitForElementVisible('css selector', '.homeLandingCreateWallet')
      .click('css selector', '.homeLandingCreateWallet')
      // successfully navigated to create wallet
      .assert.urlContains('/wallet/create')
      .waitForElementVisible('css selector', '.createWalletSoftware')
      // .getLocationInView('css selector', '.createWalletSoftware')
      .click('css selector', '.createWalletSoftware')
      // select and fill in password
      .assert.urlContains('wallet/create/software?type=overview')
      .waitForElementVisible(
        'css selector',
        '.createWalletSoftwareOverviewKeystore'
      )
      .click('css selector', '.createWalletSoftwareOverviewKeystore')
      .waitForElementVisible('.createWalletKeystorePasswordInput')
      .setValue(
        '.createWalletKeystorePasswordInput * input',
        'mewcreatewalletkeystore1234'
      )
      .waitForElementVisible('.createWalletKeystoreConfirmPWInput')
      .setValue(
        '.createWalletKeystoreConfirmPWInput * input',
        'mewcreatewalletkeystore1234'
      )
      // expect button to be green<commit_msg>fix: 🐛 selector issue, now works regardless of screensize<commit_after>// For authoring Nightwatch tests, see
// https://nightwatchjs.org/guide

module.exports = {
  before: function (browser) {
    browser.globals.waitForConditionTimeout = 15000;
  },
  'create wallet tests': browser => {
    // start browser
    browser
      .init()
      .url('https://localhost:8080')
      .waitForElementVisible('#app')
      .assert.title('MyEtherWallet | MEW')
      // click out overlay

      .waitForElementVisible('css selector', '.v-overlay')
      .click('css selector', '.v-overlay')
      // actual test starts here
      // wait and find create wallet button

      .waitForElementVisible('css selector', '.homeLandingCreateWallet')
      .click('css selector', '.homeLandingCreateWallet')
      // successfully navigated to create wallet
      .assert.urlContains('/wallet/create')
      .waitForElementVisible('css selector', '.createWalletSoftware');
    // .getLocationInView('css selector', '.createWalletSoftware')
    // .click('css selector', '.createWalletSoftware')
    browser.execute(function () {
      document.querySelector('.createWalletSoftware').click();
    });
    // select and fill in password
    browser.assert
      .urlContains('wallet/create/software?type=overview')
      .waitForElementVisible(
        'css selector',
        '.createWalletSoftwareOverviewKeystore'
      )
      .click('css selector', '.createWalletSoftwareOverviewKeystore')
      .waitForElementVisible('.createWalletKeystorePasswordInput')
      .setValue(
        '.createWalletKeystorePasswordInput * input',
        'mewcreatewalletkeystore1234'
      )
      .waitForElementVisible('.createWalletKeystoreConfirmPWInput')
      .setValue(
        '.createWalletKeystoreConfirmPWInput * input',
        'mewcreatewalletkeystore1234'
      )
      // expect button to be green
{'fraction_non_alphanumeric': 0.12101026922009436, 'fraction_numerical': 0.009436580627255066, 'mean_word_length': 3.1141552511415527, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '6872449', 'n_tokens_mistral': 1003, 'n_tokens_neox': 961, 'n_words': 196}