Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Checking in failing test which captures STR for #5911
Browse files Browse the repository at this point in the history
Auditors: @bbondy

Test Plan:
1. Run `npm run uitest -- --grep="when following URLs"`
2. See the test fail
3. Made a sad face
  • Loading branch information
bsclifton committed Nov 29, 2016
1 parent 34783b0 commit 3f514d8
Showing 1 changed file with 55 additions and 31 deletions.
86 changes: 55 additions & 31 deletions test/components/navigationBarTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,44 +894,68 @@ describe('navigationBar tests', function () {
})

describe('with url input value', function () {
Brave.beforeAll(this)

before(function * () {
this.page1 = Brave.server.url('page1.html')
describe('with regards to the webview', function () {
Brave.beforeAll(this)

before(function * () {
this.page1 = Brave.server.url('page1.html')

yield setup(this.app.client)
// wait for the urlInput to be fully initialized
yield this.app.client.waitForExist(urlInput)
yield this.app.client.keys(this.page1)
// hit enter
yield this.app.client.keys(Brave.keys.ENTER)
})

yield setup(this.app.client)
// wait for the urlInput to be fully initialized
yield this.app.client.waitForExist(urlInput)
yield this.app.client.keys(this.page1)
// hit enter
yield this.app.client.keys(Brave.keys.ENTER)
})
it('webview has focus', function * () {
yield this.app.client.waitForElementFocus(activeWebview)
})

it('webview has focus', function * () {
yield this.app.client.waitForElementFocus(activeWebview)
})
it('webview loads url', function * () {
var page1 = this.page1
yield this.app.client.waitUntil(function () {
return this.getAttribute(activeWebview, 'src').then((src) => src === page1)
})
})

it('webview loads url', function * () {
var page1 = this.page1
yield this.app.client.waitUntil(function () {
return this.getAttribute(activeWebview, 'src').then((src) => src === page1)
it('urlbar shows webview url when focused', function * () {
var page1 = this.page1
yield blur(this.app.client)
yield this.app.client.waitUntil(function () {
return this.isExisting(urlInput).then((exists) => exists === false)
})
yield this.app.client
.ipcSend('shortcut-focus-url')
yield this.app.client.waitUntil(function () {
return this.getValue(urlInput).then((val) => val === page1)
})
yield this.app.client.keys('abc')
yield this.app.client.waitUntil(function () {
return this.getValue(urlInput).then((val) => val === 'abc')
})
})
})

it('urlbar shows webview url when focused', function * () {
var page1 = this.page1
yield blur(this.app.client)
yield this.app.client.waitUntil(function () {
return this.isExisting(urlInput).then((exists) => exists === false)
})
yield this.app.client
.ipcSend('shortcut-focus-url')
yield this.app.client.waitUntil(function () {
return this.getValue(urlInput).then((val) => val === page1)
describe('when following URLs', function () {
Brave.beforeEach(this)

beforeEach(function * () {
yield setup(this.app.client)
yield this.app.client.waitForExist(urlInput)
})
yield this.app.client.keys('abc')
yield this.app.client.waitUntil(function () {
return this.getValue(urlInput).then((val) => val === 'abc')

// NOTE: this currently fails
// issue is captured with https://github.com/brave/browser-laptop/issues/5911
it('goes to the page (instead of search for the URL)', function * () {
const url = 'https://e.turbotax.intuit.com/pub/cc?_ri_=3vv-8-e.'
yield this.app.client.keys(url)
yield this.app.client.keys(Brave.keys.ENTER)
yield this.app.client.waitUntil(function () {
return this.getValue(urlInput).then((val) => {
return val === url
})
})
})
})
})
Expand Down

0 comments on commit 3f514d8

Please sign in to comment.