diff options
author | Tayane Fernandes <tayane.rmf@gmail.com> | 2017-02-09 13:33:30 -0200 |
---|---|---|
committer | Tayane Fernandes <tayane.rmf@gmail.com> | 2017-02-09 13:33:30 -0200 |
commit | 2bfd4b8da51310da0e11d87f64f57990d93d79e0 (patch) | |
tree | b23562755af9703bf1b0d2b2b1c0682839542f0d | |
parent | b2676a1f407ecf05cb0b511e563d21b4e2a0ee61 (diff) |
[#922] Rename backup account flow
To differentiate between the account recovery flow and the set backup email
flow, we renamed all resources and url to reflect this. with @anikarni
-rw-r--r-- | service/pixelated/resources/backup_account_resource.py (renamed from service/pixelated/resources/account_recovery_resource.py) | 10 | ||||
-rw-r--r-- | service/pixelated/resources/root_resource.py | 4 | ||||
-rw-r--r-- | service/test/unit/resources/test_backup_account_resource.py (renamed from service/test/unit/resources/test_account_recovery_resource.py) | 8 | ||||
-rw-r--r-- | web-ui/config/copy-webpack.js | 2 | ||||
-rw-r--r-- | web-ui/src/backup_account/backup_account.html (renamed from web-ui/src/account_recovery/account_recovery.html) | 4 | ||||
-rw-r--r-- | web-ui/src/backup_account/backup_account.js (renamed from web-ui/src/account_recovery/account_recovery.js) | 0 | ||||
-rw-r--r-- | web-ui/src/backup_account/page.js (renamed from web-ui/src/account_recovery/page.js) | 0 | ||||
-rw-r--r-- | web-ui/src/backup_account/page.scss (renamed from web-ui/src/account_recovery/page.scss) | 0 | ||||
-rw-r--r-- | web-ui/test/unit/backup_account/page.spec.js (renamed from web-ui/test/unit/account_recovery/page.spec.js) | 2 | ||||
-rw-r--r-- | web-ui/webpack.config.js | 2 | ||||
-rw-r--r-- | web-ui/webpack.production.config.js | 2 |
11 files changed, 17 insertions, 17 deletions
diff --git a/service/pixelated/resources/account_recovery_resource.py b/service/pixelated/resources/backup_account_resource.py index a69cac9a..5d9cb032 100644 --- a/service/pixelated/resources/account_recovery_resource.py +++ b/service/pixelated/resources/backup_account_resource.py @@ -24,14 +24,14 @@ from twisted.web.http import OK from twisted.web.template import Element, XMLFile, renderElement -class AccountRecoveryPage(Element): - loader = XMLFile(FilePath(os.path.join(get_static_folder(), 'account_recovery.html'))) +class BackupAccountPage(Element): + loader = XMLFile(FilePath(os.path.join(get_static_folder(), 'backup_account.html'))) def __init__(self): - super(AccountRecoveryPage, self).__init__() + super(BackupAccountPage, self).__init__() -class AccountRecoveryResource(BaseResource): +class BackupAccountResource(BaseResource): isLeaf = True def __init__(self, services_factory): @@ -42,5 +42,5 @@ class AccountRecoveryResource(BaseResource): return self._render_template(request) def _render_template(self, request): - site = AccountRecoveryPage() + site = BackupAccountPage() return renderElement(request, site) diff --git a/service/pixelated/resources/root_resource.py b/service/pixelated/resources/root_resource.py index a97bd049..206cb3be 100644 --- a/service/pixelated/resources/root_resource.py +++ b/service/pixelated/resources/root_resource.py @@ -23,7 +23,7 @@ from pixelated.resources import BaseResource, UnAuthorizedResource, UnavailableR from pixelated.resources import get_startup_folder, get_static_folder from pixelated.resources.attachments_resource import AttachmentsResource from pixelated.resources.sandbox_resource import SandboxResource -from pixelated.resources.account_recovery_resource import AccountRecoveryResource +from pixelated.resources.backup_account_resource import BackupAccountResource from pixelated.resources.contacts_resource import ContactsResource from pixelated.resources.features_resource import FeaturesResource from pixelated.resources.feedback_resource import FeedbackResource @@ -89,7 +89,7 @@ class RootResource(BaseResource): return csrf_input and csrf_input == xsrf_token def initialize(self, provider=None, disclaimer_banner=None, authenticator=None): - self._child_resources.add('recovery', AccountRecoveryResource(self._services_factory)) + self._child_resources.add('backup-account', BackupAccountResource(self._services_factory)) self._child_resources.add('sandbox', SandboxResource(self._static_folder)) self._child_resources.add('assets', File(self._static_folder)) self._child_resources.add('keys', KeysResource(self._services_factory)) diff --git a/service/test/unit/resources/test_account_recovery_resource.py b/service/test/unit/resources/test_backup_account_resource.py index 01ffaed2..21ae5aab 100644 --- a/service/test/unit/resources/test_account_recovery_resource.py +++ b/service/test/unit/resources/test_backup_account_resource.py @@ -20,18 +20,18 @@ from mock import MagicMock, patch from twisted.trial import unittest from twisted.web.test.requesthelper import DummyRequest -from pixelated.resources.account_recovery_resource import AccountRecoveryResource +from pixelated.resources.backup_account_resource import BackupAccountResource from test.unit.resources import DummySite -class TestAccountRecoveryResource(unittest.TestCase): +class TestBackupAccountResource(unittest.TestCase): def setUp(self): self.services_factory = MagicMock() - self.resource = AccountRecoveryResource(self.services_factory) + self.resource = BackupAccountResource(self.services_factory) self.web = DummySite(self.resource) def test_get(self): - request = DummyRequest(['/recovery']) + request = DummyRequest(['/backup-account']) request.method = 'GET' d = self.web.get(request) diff --git a/web-ui/config/copy-webpack.js b/web-ui/config/copy-webpack.js index 8e9f9dd3..1f7f743a 100644 --- a/web-ui/config/copy-webpack.js +++ b/web-ui/config/copy-webpack.js @@ -4,7 +4,7 @@ module.exports = new CopyWebpackPlugin([ { context: 'app/', from: '404.html' }, { context: 'app/', from: 'index.html' }, { context: 'app/', from: 'sandbox.html' }, - { context: 'src/account_recovery/', from: 'account_recovery.html' }, + { context: 'src/backup_account/', from: 'backup_account.html' }, { context: 'app/', from: 'css/*' }, { context: 'app/', from: 'fonts/*' }, { context: 'app/', from: 'locales/**/*' }, diff --git a/web-ui/src/account_recovery/account_recovery.html b/web-ui/src/backup_account/backup_account.html index bd451ebc..997c76f8 100644 --- a/web-ui/src/account_recovery/account_recovery.html +++ b/web-ui/src/backup_account/backup_account.html @@ -3,10 +3,10 @@ <head> <meta charset="utf-8"/> <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0"/> - <title>Pixelated Account Recovery</title> + <title>Pixelated Backup Account</title> </head> <body> <div id="root"/> - <script type="text/javascript" src="/assets/account_recovery.js"></script> + <script type="text/javascript" src="/assets/backup_account.js"></script> </body> </html> diff --git a/web-ui/src/account_recovery/account_recovery.js b/web-ui/src/backup_account/backup_account.js index d4e0f4e8..d4e0f4e8 100644 --- a/web-ui/src/account_recovery/account_recovery.js +++ b/web-ui/src/backup_account/backup_account.js diff --git a/web-ui/src/account_recovery/page.js b/web-ui/src/backup_account/page.js index 2ae26d12..2ae26d12 100644 --- a/web-ui/src/account_recovery/page.js +++ b/web-ui/src/backup_account/page.js diff --git a/web-ui/src/account_recovery/page.scss b/web-ui/src/backup_account/page.scss index a344b957..a344b957 100644 --- a/web-ui/src/account_recovery/page.scss +++ b/web-ui/src/backup_account/page.scss diff --git a/web-ui/test/unit/account_recovery/page.spec.js b/web-ui/test/unit/backup_account/page.spec.js index 6046c5d5..66d2dc78 100644 --- a/web-ui/test/unit/account_recovery/page.spec.js +++ b/web-ui/test/unit/backup_account/page.spec.js @@ -1,7 +1,7 @@ import { shallow } from 'enzyme'; import expect from 'expect'; import React from 'react'; -import { Page } from 'src/account_recovery/page'; +import { Page } from 'src/backup_account/page'; describe('Page', () => { let page; diff --git a/web-ui/webpack.config.js b/web-ui/webpack.config.js index 8a54af21..8680c928 100644 --- a/web-ui/webpack.config.js +++ b/web-ui/webpack.config.js @@ -7,7 +7,7 @@ var aliases = require('./config/alias-webpack'); module.exports = { entry: { app: './app/js/index.js', - account_recovery: './src/account_recovery/account_recovery.js', + backup_account: './src/backup_account/backup_account.js', sandbox: './app/js/sandbox.js' }, node: { fs: 'empty' }, diff --git a/web-ui/webpack.production.config.js b/web-ui/webpack.production.config.js index 3684997b..e8d3cf9d 100644 --- a/web-ui/webpack.production.config.js +++ b/web-ui/webpack.production.config.js @@ -7,7 +7,7 @@ var aliases = require('./config/alias-webpack'); module.exports = { entry: { app: './app/js/index.js', - account_recovery: './src/account_recovery/account_recovery.js', + backup_account: './src/backup_account/backup_account.js', sandbox: './app/js/sandbox.js' }, node: { fs: 'empty' }, |