-
Notifications
You must be signed in to change notification settings - Fork 973
UrlBar and suggestion improvements #5046
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
/* global describe, it, beforeEach */ | ||
|
||
const Brave = require('../lib/brave') | ||
const {activeWebview, urlInput} = require('../lib/selectors') | ||
const assert = require('assert') | ||
const {urlInput, urlBarSuggestions} = require('../lib/selectors') | ||
|
||
describe('urlBar', function () { | ||
function * setup (client) { | ||
|
@@ -89,18 +88,16 @@ describe('urlBar', function () { | |
}) | ||
}) | ||
|
||
it('it does not change input after focus until keydown', function * () { | ||
it('does not show suggestions on focus', function * () { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think you want to type some letters before focusing, otherwise it wouldn't show suggestions anyway There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I am so sleepy. Fixed, thanks |
||
yield this.app.client | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please change this test to test that focus doesn't bring up any suggestions, thanks |
||
.keys('https://brave.com/ ') | ||
.keys('\uE007') | ||
.waitForElementFocus(activeWebview) | ||
.keys('brave') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just to be sure this actually brings up suggestions, please add
here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
.waitUntil(function () { | ||
return this.isExisting(urlBarSuggestions).then((exists) => exists === true) | ||
}) | ||
.ipcSend('shortcut-focus-url') | ||
.getValue(urlInput).then((val) => assert(val === 'https://brave.com/')) | ||
.keys('\uE015') | ||
.waitForElementFocus(urlInput) | ||
.waitUntil(function () { | ||
return this.getValue(urlInput).then((val) => { | ||
return val === 'https://brave.com/test' | ||
}) | ||
return this.isExisting(urlBarSuggestions).then((exists) => exists === false) | ||
}) | ||
}) | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this also include most other modifier keys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added two more. If you think I missed some, please let me know I will add :)