forked from brave/browser-laptop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves brave#8889 Auditors: @bsclifton Test Plan: - Visit any site - Disable shields - Lion head is grayed out
- Loading branch information
Showing
3 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* global describe, it, beforeEach */ | ||
|
||
const Brave = require('../lib/brave') | ||
const {urlInput, braveMenu, braveryPanel, braveryPanelContainer} = require('../lib/selectors') | ||
|
||
describe('navigator component tests', function () { | ||
function * setup (client) { | ||
yield client | ||
.waitForUrl(Brave.newTabUrl) | ||
.waitForBrowserWindow() | ||
.waitForVisible(urlInput) | ||
} | ||
|
||
describe('lion badge', function () { | ||
Brave.beforeEach(this) | ||
beforeEach(function * () { | ||
yield setup(this.app.client) | ||
}) | ||
|
||
it('is grayed out if shield is disabled', function * () { | ||
yield this.app.client | ||
.tabByIndex(0) | ||
.loadUrl('https://clifton.io/') | ||
.windowByUrl(Brave.browserWindowUrl) | ||
.waitForElementCount('[data-test2-id="shield-down-false"]', 1) | ||
.openBraveMenu(braveMenu, braveryPanel) | ||
.waitForElementCount('[data-test-id="shields-toggle"][data-switch-status="true"]', 1) | ||
.click('[data-test-id="shields-toggle"] .switchBackground') | ||
.waitForElementCount('[data-test-id="shields-toggle"][data-switch-status="false"]', 1) | ||
.click(braveryPanelContainer) | ||
.waitForElementCount('[data-test2-id="shield-down-true"]', 1) | ||
}) | ||
}) | ||
}) |