<commit_before>const storeHelper = require('../../tests/helper/store_helper');

const sampleUrls = [
  'https://www.youtube.com/watch?v=P91pvMdoZ80',
  'https://www.youtube.com/watch?v=8yJZ22UZYVs',
  'https://www.youtube.com/watch?v=vn7vfza-6fQ',
  'https://www.youtube.com/watch?v=UWn-EpzxsE0',
  'https://www.youtube.com/watch?v=HLfZs-B_U6M'
];

let app;

const E2E_WAIT_TIME = Number(process.env.E2E_WAIT_TIME) || 5000;

module.exports = {
  before() {
    storeHelper.clearStore();
    storeHelper.makeStub();
    /* eslint-disable global-require */
    app = require('../../src/app');
    /* eslint-disable global-require */
  },

  after() {
    storeHelper.clearStore();
    app.close();
  },

  basicTest(browser) {
    const page = browser.page.index();

    page.navigate().waitForElementVisible('body', 1000).assert.containsText('body', 'jukebox');

    // add musics
    page
      .setValue('@trackUrlField', sampleUrls.join(','))
      .submitForm('@trackSubmitButton')
      .waitForElementPresent('a.playlist-content:nth-child(5)', 10000)
      .assert.elementPresent('@playButton')
      .assert.hasPlaylistLength(5);

    browser.pause(E2E_WAIT_TIME);

    // play music
    page
      .moveToElement('@playerBlock', 10, 10)
      .click('@playButton')
      .waitForElementPresent('@pauseButton', 5000)
      .assert.elementPresent('@pauseButton')
      .assert.hasPlaylistLength(5)
      .assert.currentTrackNumEquals(1);

    browser.pause(E2E_WAIT_TIME);

    // next music<commit_msg>rm assert title text in e2e<commit_after>const storeHelper = require('../../tests/helper/store_helper');

const sampleUrls = [
  'https://www.youtube.com/watch?v=P91pvMdoZ80',
  'https://www.youtube.com/watch?v=8yJZ22UZYVs',
  'https://www.youtube.com/watch?v=vn7vfza-6fQ',
  'https://www.youtube.com/watch?v=UWn-EpzxsE0',
  'https://www.youtube.com/watch?v=HLfZs-B_U6M'
];

let app;

const E2E_WAIT_TIME = Number(process.env.E2E_WAIT_TIME) || 5000;

module.exports = {
  before() {
    storeHelper.clearStore();
    storeHelper.makeStub();
    /* eslint-disable global-require */
    app = require('../../src/app');
    /* eslint-disable global-require */
  },

  after() {
    storeHelper.clearStore();
    app.close();
  },

  basicTest(browser) {
    const page = browser.page.index();

    page.navigate().waitForElementVisible('body', 1000);

    // add musics
    page
      .setValue('@trackUrlField', sampleUrls.join(','))
      .submitForm('@trackSubmitButton')
      .waitForElementPresent('a.playlist-content:nth-child(5)', 10000)
      .assert.elementPresent('@playButton')
      .assert.hasPlaylistLength(5);

    browser.pause(E2E_WAIT_TIME);

    // play music
    page
      .moveToElement('@playerBlock', 10, 10)
      .click('@playButton')
      .waitForElementPresent('@pauseButton', 5000)
      .assert.elementPresent('@pauseButton')
      .assert.hasPlaylistLength(5)
      .assert.currentTrackNumEquals(1);

    browser.pause(E2E_WAIT_TIME);

    // next music
{'fraction_non_alphanumeric': 0.17285188900033432, 'fraction_numerical': 0.02708124373119358, 'mean_word_length': 3.4194977843426884, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 10, 'lorem ipsum': 0, 'www.': 10, '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': '4084713', 'n_tokens_mistral': 1112, 'n_tokens_neox': 1043, 'n_words': 127}