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

Commit

Permalink
misc test fixes
Browse files Browse the repository at this point in the history
auditors @bbondy
  • Loading branch information
bridiver committed Aug 16, 2016
1 parent 75f6163 commit 4df9dfe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 28 deletions.
9 changes: 1 addition & 8 deletions test/components/braveryPanelTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ describe('Bravery Panel', function () {
yield this.app.client
.tabByIndex(0)
.loadUrl(page1Url)
.url(page1Url)
.windowByUrl(Brave.browserWindowUrl)
.waitForVisible(braveMenu)
})
Expand All @@ -49,7 +48,6 @@ describe('Bravery Panel', function () {
yield this.app.client
.tabByIndex(0)
.loadUrl(url)
.url(url)
yield openBraveMenu(this.app.client)
yield this.app.client
.waitUntil(function () {
Expand All @@ -62,7 +60,6 @@ describe('Bravery Panel', function () {
yield this.app.client
.tabByIndex(0)
.loadUrl(url)
.url(url)
yield openBraveMenu(this.app.client)
yield this.app.client
.waitUntil(function () {
Expand All @@ -75,7 +72,6 @@ describe('Bravery Panel', function () {
yield this.app.client
.tabByIndex(0)
.loadUrl(url)
.url(url)
yield openBraveMenu(this.app.client)
yield this.app.client
.waitUntil(function () {
Expand All @@ -88,7 +84,6 @@ describe('Bravery Panel', function () {
yield this.app.client
.tabByIndex(0)
.loadUrl(url)
.url(url)
.waitUntil(function () {
return this.getText('body')
.then((body) => body === 'test1 test2')
Expand All @@ -115,7 +110,7 @@ describe('Bravery Panel', function () {
yield this.app.client
.click(noScriptSwitch)
.tabByIndex(0)
.url(url)
.loadUrl(url)
.waitUntil(function () {
// getText returns empty in this case
return this.getElementSize('noscript')
Expand All @@ -127,7 +122,6 @@ describe('Bravery Panel', function () {
yield this.app.client
.tabByIndex(0)
.loadUrl(url)
.url(url)
yield openBraveMenu(this.app.client)
yield this.app.client
.click(fpSwitch)
Expand All @@ -141,7 +135,6 @@ describe('Bravery Panel', function () {
yield this.app.client
.tabByIndex(0)
.loadUrl(url)
.url(url)
.waitUntil(function () {
return this.getText('body')
.then((text) => text === 'fingerprinting test')
Expand Down
10 changes: 3 additions & 7 deletions test/components/urlBarTest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* global describe, it, before, beforeEach */
/* global describe, it, beforeEach */

const Brave = require('../lib/brave')
const {urlInput} = require('../lib/selectors')
Expand All @@ -14,9 +14,9 @@ describe('urlBar', function () {
}

describe('autocomplete', function () {
Brave.beforeAll(this)
Brave.beforeEach(this)

before(function * () {
beforeEach(function * () {
yield setup(this.app.client)
yield this.app.client.waitForExist(urlInput)
yield this.app.client.waitForElementFocus(urlInput)
Expand All @@ -29,10 +29,6 @@ describe('urlBar', function () {
.addSite({ location: 'https://www.youtube.com' })
})

beforeEach(function * () {
yield this.app.client.setValue(urlInput, '')
})

it('autocompletes without protocol', function * () {
// now type something
yield this.app.client
Expand Down
14 changes: 1 addition & 13 deletions test/components/windowTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,6 @@ describe('application window', function () {
})
})

// Fails intermittently
it.skip('loads and is visible', function * () {
yield this.app.client
.windowParentByUrl(this.page1)
.waitUntilWindowLoaded()
.waitForVisible(activeWebview)
})

it('has a min width of 480 and height of 300', function * () {
yield this.app.client
.windowParentByUrl(this.page1)
Expand All @@ -239,18 +231,14 @@ describe('application window', function () {
})
})

// requires https://github.com/brave/browser-electron/issues/98
describe('without features', function () {
Brave.beforeAll(this)

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

yield this.app.client
.windowByIndex(0)
.waitUntilWindowLoaded()
.waitForVisible(activeWebview)
.tabByIndex(0)
.waitForUrl(Brave.newTabUrl)
.url(Brave.server.url('window_open.html'))
.execute(function (page1) {
global.triggerFunction = function () {
Expand Down

0 comments on commit 4df9dfe

Please sign in to comment.