/* global describe, it, beforeEach */

const Brave = require('../lib/brave')
const {urlInput, homepageInput} = require('../lib/selectors')

const prefsUrl = 'about:preferences'

function * setup (client) {
  yield client
    .waitForUrl(Brave.newTabUrl)
    .waitForBrowserWindow()
    .waitForVisible(urlInput)
}

describe('General Panel', function () {
  describe('homepage', function () {
    Brave.beforeEach(this)
    beforeEach(function * () {
      yield setup(this.app.client)
    })

    it('homepage displays punycode', function * () {
      yield this.app.client
        .tabByIndex(0)
        .loadUrl(prefsUrl)
        .waitForVisible(homepageInput)
        .click(homepageInput)
        .keys('а')
        .waitUntil(function () {
          return this.getValue(homepageInput).then((val) => {
            return val === 'https://www.brave.xn--com-7cd'
          })
        })
    })
  })
})

/* global describe, it, beforeEach */

const Brave = require('../lib/brave')
const {urlInput, homepageInput} = require('../lib/selectors')

const prefsUrl = 'about:preferences'

function * setup (client) {
  yield client
    .waitForUrl(Brave.newTabUrl)
    .waitForBrowserWindow()
    .waitForVisible(urlInput)
}

describe('General Panel', function () {
  describe('homepage', function () {
    Brave.beforeEach(this)
    beforeEach(function * () {
      yield setup(this.app.client)
    })

    it.skip('homepage displays punycode', function * () {
      yield this.app.client
        .tabByIndex(0)
        .loadUrl(prefsUrl)
        .waitForVisible(homepageInput)
        .click(homepageInput)
        .keys('а')
        .waitUntil(function () {
          return this.getValue(homepageInput).then((val) => {
            return val === 'https://www.brave.xn--com-7cd'
          })
        })
    })
  })
})

Disable punycode until it will work on Travis
Disable punycode until it will work on Travis

It was added to this list:
https://github.com/brave/browser-laptop/issues/5389

Auditors: da39a3ee5e6b4b0d3255bfef95601890afd80709@diracdeltas
