summaryrefslogtreecommitdiff
path: root/web-ui/test
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/test')
-rw-r--r--web-ui/test/jasmine.json9
-rw-r--r--web-ui/test/spec/account_recovery/page.spec.js12
-rw-r--r--web-ui/test/test-main.js2
-rw-r--r--web-ui/test/unit/account_recovery/page.spec.js25
4 files changed, 26 insertions, 22 deletions
diff --git a/web-ui/test/jasmine.json b/web-ui/test/jasmine.json
deleted file mode 100644
index 969304b6..00000000
--- a/web-ui/test/jasmine.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "spec_dir": "test/spec/account_recovery/",
- "spec_files": [
- "**/*[sS]pec.js"
- ],
- "helpers": [
- "helpers/**/*.js"
- ]
-}
diff --git a/web-ui/test/spec/account_recovery/page.spec.js b/web-ui/test/spec/account_recovery/page.spec.js
deleted file mode 100644
index 3e19f244..00000000
--- a/web-ui/test/spec/account_recovery/page.spec.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import {shallow} from 'enzyme'
-import expect from 'expect'
-import React from 'react'
-import { Page } from '../../../app/js/account_recovery/page'
-
-describe('Page', () => {
- it('renders backup email page title', () => {
- const mockT = key => key;
- const page = shallow(<Page t={mockT}/>);
- expect(page.find('h1').text()).toEqual('backup-account.title');
- });
-});
diff --git a/web-ui/test/test-main.js b/web-ui/test/test-main.js
index b7dc430f..4396993f 100644
--- a/web-ui/test/test-main.js
+++ b/web-ui/test/test-main.js
@@ -1,7 +1,7 @@
var tests = Object.keys(window.__karma__.files).filter(function (file) {
'use strict';
- return !(/account_recovery/.test(file)) && (/\.spec\.js$/.test(file));
+ return (/\.spec\.js$/.test(file));
});
beforeEach(function() {
diff --git a/web-ui/test/unit/account_recovery/page.spec.js b/web-ui/test/unit/account_recovery/page.spec.js
new file mode 100644
index 00000000..590d1de8
--- /dev/null
+++ b/web-ui/test/unit/account_recovery/page.spec.js
@@ -0,0 +1,25 @@
+import { shallow } from 'enzyme'
+import expect from 'expect'
+import React from 'react'
+import { Page } from 'src/account_recovery/page'
+
+describe('Page', () => {
+ let mockT, page
+
+ beforeEach(() => {
+ mockT = (key) => (key)
+ page = shallow(<Page t={mockT}/>)
+ })
+
+ it('renders backup email page title', () => {
+ expect(page.find('h1').text()).toEqual('backup-account.title')
+ })
+
+ it('renders backup account email input field', () => {
+ expect(page.find('InputField').props().name).toEqual('email')
+ })
+
+ it('renders backup account submit button', () => {
+ expect(page.find('SubmitButton').props().buttonText).toEqual('backup-account.button')
+ })
+})