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

Checking in failing test which captures STR for URL bar issue #5912

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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