This repository has been archived by the owner on Dec 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 974
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
104 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
<!DOCTYPE html> | ||
<!-- This Source Code Form is subject to the terms of the Mozilla Public | ||
- License, v. 2.0. If a copy of the MPL was not distributed with this | ||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. --> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="availableLanguages" content=""> | ||
<meta name="defaultLanguage" content="en-US"> | ||
<link rel="shortcut icon" type="image/x-icon" href="data:image/x-icon;,"> | ||
<title data-l10n-id="aboutWelcome"></title> | ||
<script src="ext/l20n.min.js"></script> | ||
<script src="gen/aboutPages.entry.js" async></script> | ||
<link rel="localization" href="locales/{locale}/app.properties"> | ||
<link rel="stylesheet" href="content/styles/defaultStyles.css"> | ||
</head> | ||
<body> | ||
<div id="appContainer"/> | ||
</body> | ||
</html> |
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,18 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
html, body { | ||
font-family: "Helvetica Neue", Arial, sans-serif; | ||
font-weight: 400; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
html, body, #appContainer, #appContainer > div { | ||
height: 100%; | ||
} | ||
|
||
body { | ||
font-size: 100%; | ||
} |
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,23 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
|
||
const React = require('react') | ||
const {StyleSheet, css} = require('aphrodite/no-important') | ||
|
||
class AboutWelcome extends React.Component { | ||
render () { | ||
return <iframe data-test-id='welcomeIframe' | ||
className={css(styles.welcomeIframe)} src='https://brave.com/welcome.html' /> | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
welcomeIframe: { | ||
width: '100%', | ||
height: '100%', | ||
border: 0 | ||
} | ||
}) | ||
|
||
module.exports = <AboutWelcome /> |
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,35 @@ | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
/* global describe, before, after, it */ | ||
|
||
const mockery = require('mockery') | ||
const {shallow} = require('enzyme') | ||
const assert = require('assert') | ||
let AboutWelcome | ||
require('../braveUnit') | ||
|
||
describe('AboutWelcome component', function () { | ||
before(function () { | ||
mockery.enable({ | ||
warnOnReplace: false, | ||
warnOnUnregistered: false, | ||
useCleanCache: true | ||
}) | ||
AboutWelcome = require('../../../app/renderer/about/welcome') | ||
mockery.registerMock('../../../less/about/common.less', {}) | ||
}) | ||
|
||
after(function () { | ||
mockery.disable() | ||
}) | ||
|
||
describe('Rendering', function () { | ||
it('renders an iframe', function () { | ||
const wrapper = shallow( | ||
AboutWelcome | ||
) | ||
assert.equal(wrapper.find('[data-test-id="welcomeIframe"]').length, 1) | ||
}) | ||
}) | ||
}) |