-
+
+
{viewCertificateButton}
} else {
connectionInfo =
-
+
}
return
}
}
@@ -161,4 +234,46 @@ SiteInfo.propTypes = {
onHide: React.PropTypes.func
}
+const styles = StyleSheet.create({
+ flexJustifyEnd: {
+ display: 'flex',
+ justifyContent: 'flex-end'
+ },
+
+ secureIcon__wrapper: {
+ display: 'flex',
+ alignItems: 'center'
+ },
+ secureIcon__fa: {
+ position: 'absolute'
+ },
+ secureIcon__extendedValidation: {
+ color: '#008000'
+ },
+ secureIcon__label: {
+ position: 'relative',
+ left: globalStyles.spacing.dialogInsideMargin
+ },
+
+ viewCertificateButton__wrapper: {
+ marginTop: globalStyles.spacing.dialogInsideMargin
+ },
+
+ connectionInfo__wrapper: {
+ display: 'flex',
+ flexFlow: 'column nowrap',
+ margin: `${globalStyles.spacing.dialogInsideMargin} 0 0 ${globalStyles.spacing.dialogInsideMargin}`
+ },
+
+ siteInfo__wrapper: {
+ maxHeight: '300px',
+ maxWidth: '400px',
+ width: 'auto'
+ },
+ siteInfo__wrapper__large: {
+ // temporary workaround
+ maxWidth: '500px'
+ }
+})
+
module.exports = SiteInfo
diff --git a/less/dialogs.less b/less/dialogs.less
index 33b73351ebb..75bf3959f97 100644
--- a/less/dialogs.less
+++ b/less/dialogs.less
@@ -83,7 +83,3 @@
}
}
}
-.connectionInfo {
- max-width: 400px;
- padding: 10px;
-}
diff --git a/less/forms.less b/less/forms.less
index 288a1e7e96e..a89450a6506 100644
--- a/less/forms.less
+++ b/less/forms.less
@@ -18,34 +18,6 @@ select {
top: @dialogTopOffset;
}
-.siteInfo {
- >ul {
- .flyoutDialog;
- text-align: left;
- width: auto;
-
- li {
- list-style-type: none;
- padding: 10px 0;
-
- .fa {
- padding-right: 10px;
- }
- &.extendedValidation {
- color: green;
- }
-
- ul {
- max-height: 300px;
- overflow-y: auto;
- margin-top: -20px;
- padding: 0 10px;
- max-width: 400px;
- }
- }
- }
-}
-
.clearBrowsingDataPanel {
.clearBrowsingData {
.flyoutDialog;
diff --git a/test/lib/selectors.js b/test/lib/selectors.js
index 20b55aa5160..90f800ebc9b 100644
--- a/test/lib/selectors.js
+++ b/test/lib/selectors.js
@@ -91,10 +91,10 @@ module.exports = {
paymentsWelcomePage: '[data-test-id="paymentsMessage"]',
autofillAddressPanel: '.autofillAddressPanel',
autofillCreditCardPanel: '.autofillCreditCardPanel',
- allowRunInsecureContentButton: '.allowRunInsecureContentButton',
- dismissAllowRunInsecureContentButton: '.dismissAllowRunInsecureContentButton',
- denyRunInsecureContentButton: '.denyRunInsecureContentButton',
- dismissDenyRunInsecureContentButton: '.dismissDenyRunInsecureContentButton',
+ allowRunInsecureContentButton: '[data-test-id="allowRunInsecureContentButton"]',
+ dismissAllowRunInsecureContentButton: '[data-test-id="dismissAllowRunInsecureContentButton"]',
+ denyRunInsecureContentButton: '[data-test-id="denyRunInsecureContentButton"]',
+ dismissDenyRunInsecureContentButton: '[data-test-id="dismissDenyRunInsecureContentButton"]',
tabsToolbar: '.tabsToolbar',
hamburgerMenu: '.menuButton',
contextMenu: '.contextMenu',
diff --git a/test/navbar-components/navigationBarTest.js b/test/navbar-components/navigationBarTest.js
index bfa58b2c47b..209f3862d6c 100644
--- a/test/navbar-components/navigationBarTest.js
+++ b/test/navbar-components/navigationBarTest.js
@@ -382,7 +382,7 @@ describe('navigationBar tests', function () {
))
.windowByUrl(Brave.browserWindowUrl)
.click(urlbarIcon)
- .waitForVisible('[data-l10n-id="insecureConnection"]')
+ .waitForVisible('[data-test-id="insecureConnection"]')
.keys(Brave.keys.ESCAPE)
})
it('Shows phishing URL warning', function * () {
@@ -400,7 +400,7 @@ describe('navigationBar tests', function () {
classes.includes('fa-exclamation-triangle') && classes.includes('insecure-color')
))
.windowByUrl(Brave.browserWindowUrl)
- .waitForVisible('[data-l10n-id="phishingConnectionInfo"]')
+ .waitForVisible('[data-test-id="phishingConnectionInfo"]')
.keys(Brave.keys.ESCAPE)
})
it('Shows insecure URL icon in title mode', function * () {
@@ -431,7 +431,7 @@ describe('navigationBar tests', function () {
))
.windowByUrl(Brave.browserWindowUrl)
.click(urlbarIcon)
- .waitForVisible('[data-l10n-id="secureConnection"]')
+ .waitForVisible('[data-test-id="secureConnection"]')
.keys(Brave.keys.ESCAPE)
})
it('Shows secure URL icon in title mode', function * () {
@@ -472,7 +472,7 @@ describe('navigationBar tests', function () {
)
)
.click(urlbarIcon)
- .waitForVisible('[data-l10n-id="partiallySecureConnection"]')
+ .waitForVisible('[data-test-id="partiallySecureConnection"]')
})
it('shows insecure icon on a site with a sha-1 cert', function * () {
const page1Url = 'https://sha1-2017.badssl.com/'
@@ -539,10 +539,10 @@ describe('navigationBar tests', function () {
.windowByUrl(Brave.browserWindowUrl)
.waitForExist(urlbarIcon + '.fa-lock')
.click(urlbarIcon)
- .waitForVisible('.runInsecureContentWarning')
+ .waitForVisible('[data-test-id="runInsecureContentWarning"]')
.waitForVisible(dismissAllowRunInsecureContentButton)
.waitForVisible(allowRunInsecureContentButton)
- .waitForVisible('[data-l10n-id="secureConnection"]')
+ .waitForVisible('[data-test-id="secureConnection"]')
.click(dismissAllowRunInsecureContentButton)
// TODO(bridiver) there is a race condition here because we are waiting for a non-change
// and we need some way to verify that the page does not reload and allow insecure content
@@ -568,8 +568,8 @@ describe('navigationBar tests', function () {
.windowByUrl(Brave.browserWindowUrl)
.waitForExist(urlbarIcon + '.fa-lock')
.click(urlbarIcon)
- .waitForVisible('[data-l10n-id="secureConnection"]')
- .waitForVisible('.runInsecureContentWarning')
+ .waitForVisible('[data-test-id="secureConnection"]')
+ .waitForVisible('[data-test-id="runInsecureContentWarning"]')
.waitForVisible(dismissAllowRunInsecureContentButton)
.waitForVisible(allowRunInsecureContentButton)
.click(allowRunInsecureContentButton)
@@ -582,8 +582,8 @@ describe('navigationBar tests', function () {
.windowByUrl(Brave.browserWindowUrl)
.waitForExist(urlbarIcon)
.click(urlbarIcon)
- .waitForVisible('[data-l10n-id="insecureConnection"]')
- .waitForVisible('.denyRunInsecureContentWarning')
+ .waitForVisible('[data-test-id="insecureConnection"]')
+ .waitForVisible('[data-test-id="denyRunInsecureContentWarning"]')
.waitForVisible(dismissDenyRunInsecureContentButton)
.waitForVisible(denyRunInsecureContentButton)
.click(denyRunInsecureContentButton)
@@ -610,8 +610,8 @@ describe('navigationBar tests', function () {
.windowByUrl(Brave.browserWindowUrl)
.waitForExist(urlbarIcon + '.fa-lock')
.click(urlbarIcon)
- .waitForVisible('[data-l10n-id="secureConnection"]')
- .waitForVisible('.runInsecureContentWarning')
+ .waitForVisible('[data-test-id="secureConnection"]')
+ .waitForVisible('[data-test-id="runInsecureContentWarning"]')
.waitForVisible(dismissAllowRunInsecureContentButton)
.waitForVisible(allowRunInsecureContentButton)
.click(allowRunInsecureContentButton)
@@ -684,8 +684,8 @@ describe('navigationBar tests', function () {
.windowByUrl(Brave.browserWindowUrl)
.waitForExist(urlbarIcon + '.fa-lock')
.click(urlbarIcon)
- .waitForVisible('[data-l10n-id="secureConnection"]')
- .waitForVisible('.runInsecureContentWarning')
+ .waitForVisible('[data-test-id="secureConnection"]')
+ .waitForVisible('[data-test-id="runInsecureContentWarning"]')
.waitForVisible(dismissAllowRunInsecureContentButton)
.waitForVisible(allowRunInsecureContentButton)
.click(allowRunInsecureContentButton)