{"size": 2876, "ext": "js", "max_stars_repo_path": "test/e2e/specs/app.js", "max_stars_repo_name": "NitikNarang77/uiGradients", "max_stars_repo_stars_event_min_datetime": "2016-10-14T17:35:22.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T15:55:13.000Z", "max_issues_repo_path": "test/e2e/specs/app.js", "max_issues_repo_name": "NitikNarang77/uiGradients", "max_issues_repo_issues_event_min_datetime": "2020-03-04T21:51:56.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T20:59:11.000Z", "max_forks_repo_path": "test/e2e/specs/app.js", "max_forks_repo_name": "NitikNarang77/uiGradients", "max_forks_repo_forks_event_min_datetime": "2016-10-15T04:33:42.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-28T06:45:23.000Z"}
{"max_stars_count": 3423, "max_issues_count": 371, "max_forks_count": 1235, "avg_line_length": 42.9253731343, "max_line_length": 170, "alphanum_fraction": 0.6484700974}
module.exports = {
  'App load test': function test(browser) {
    const devServer = browser.globals.devServerURL;
    browser
      .url(devServer)
      .waitForElementVisible('#app', 5000)
      .assert.elementPresent('.header')
      .assert.elementPresent('.actionbar')
      .assert.elementPresent('.display')
      .assert.elementPresent('.nav')
      .end();
  },

  'Gradient navigation test': function test(browser) {
    const devServer = browser.globals.devServerURL;
    browser
      .url(`${devServer}/#Cherry`)
      .waitForElementVisible('#app', 5000)
      .pause(3000) // wait for preloader to fade
      .assert.containsText('.display__gradientname p', 'Cherry')
      .click('#nav--next')
      .assert.containsText('.display__gradientname p', 'Pinky')
      .click('#nav--prev')
      .click('#nav--prev')
      .assert.containsText('.display__gradientname p', 'Mojito')
      .end();
  },

  'Copy css code test': function test(browser) {
    const devServer = browser.globals.devServerURL;
    browser
      .url(`${devServer}/#Cherry`)
      .waitForElementVisible('#app', 5000)
      .pause(3000) // wait for preloader to fade
      .click('#js-code')
      .assert.elementPresent('.modal__container')
      .assert.elementPresent('.codeblock')
      .click('#js-copy')
      .assert.elementPresent('.modal__success')
      .assert.elementNotPresent('.codeblock')
      .pause(2000) // wait for copy message to fade out
      .assert.elementNotPresent('.modal__success')
      .assert.elementPresent('.codeblock')
      .click('.modal__mask')
      .assert.hidden('.modal__container')
      .end();
  },

  'Gradient Rotation test': function test(browser) {
    const devServer = browser.globals.devServerURL;
    browser
      .url(`${devServer}/#CanYouFeelTheLoveTonight`)
      .waitForElementVisible('#app', 5000)
      .pause(3000) // wait for preloader to fade
      .assert.attributeContains('.display', 'style', 'background: linear-gradient(to right, rgb(69, 104, 220), rgb(176, 106, 179));', 'Assert gradient rotation to right')
      .click('#js-direction')
      .assert.attributeContains('.display', 'style', 'background: linear-gradient(rgb(69, 104, 220), rgb(176, 106, 179));', 'Assert gradient rotation to bottom')
      .click('#js-direction')
      .assert.attributeContains('.display', 'style', 'background: linear-gradient(to left, rgb(69, 104, 220), rgb(176, 106, 179));', 'Assert gradient rotation to left')
      .click('#js-direction')
      .assert.attributeContains('.display', 'style', 'background: linear-gradient(to top, rgb(69, 104, 220), rgb(176, 106, 179));', 'Assert gradient rotation to top')
      .click('#js-direction')
      .assert.attributeContains('.display', 'style', 'background: linear-gradient(to right, rgb(69, 104, 220), rgb(176, 106, 179));', 'Assert gradient rotation to right')
      .end();
  },
};
