Commit 0fd820f8 authored by Robert Knight's avatar Robert Knight

Move Angular components and tests to `src/sidebar/components`

This makes the dir name match the type of object these modules export.
parent 11abab35
...@@ -136,26 +136,26 @@ module.exports = angular.module('h', [ ...@@ -136,26 +136,26 @@ module.exports = angular.module('h', [
.directive('hypothesisApp', require('./directive/app')) .directive('hypothesisApp', require('./directive/app'))
// UI components // UI components
.component('annotation', require('./directive/annotation').component) .component('annotation', require('./components/annotation').component)
.component('annotationShareDialog', require('./directive/annotation-share-dialog')) .component('annotationShareDialog', require('./components/annotation-share-dialog'))
.component('annotationThread', require('./directive/annotation-thread')) .component('annotationThread', require('./components/annotation-thread'))
.component('dropdownMenuBtn', require('./directive/dropdown-menu-btn')) .component('dropdownMenuBtn', require('./components/dropdown-menu-btn'))
.component('helpLink', require('./directive/help-link')) .component('helpLink', require('./components/help-link'))
.component('helpPanel', require('./directive/help-panel')) .component('helpPanel', require('./components/help-panel'))
.component('loggedoutMessage', require('./directive/loggedout-message')) .component('loggedoutMessage', require('./components/loggedout-message'))
.component('loginControl', require('./directive/login-control')) .component('loginControl', require('./components/login-control'))
.component('loginForm', require('./directive/login-form').component) .component('loginForm', require('./components/login-form').component)
.component('publishAnnotationBtn', require('./directive/publish-annotation-btn')) .component('publishAnnotationBtn', require('./components/publish-annotation-btn'))
.component('searchInput', require('./directive/search-input')) .component('searchInput', require('./components/search-input'))
.component('searchStatusBar', require('./directive/search-status-bar')) .component('searchStatusBar', require('./components/search-status-bar'))
.component('selectionTabs', require('./directive/selection-tabs')) .component('selectionTabs', require('./components/selection-tabs'))
.component('sidebarTutorial', require('./directive/sidebar-tutorial').component) .component('sidebarTutorial', require('./components/sidebar-tutorial').component)
.component('shareDialog', require('./directive/share-dialog')) .component('shareDialog', require('./components/share-dialog'))
.component('sortDropdown', require('./directive/sort-dropdown')) .component('sortDropdown', require('./components/sort-dropdown'))
.component('svgIcon', require('./directive/svg-icon')) .component('svgIcon', require('./components/svg-icon'))
.component('tagEditor', require('./directive/tag-editor')) .component('tagEditor', require('./components/tag-editor'))
.component('threadList', require('./directive/thread-list')) .component('threadList', require('./components/thread-list'))
.component('timestamp', require('./directive/timestamp')) .component('timestamp', require('./components/timestamp'))
// These should use `component()` but will require some changes. // These should use `component()` but will require some changes.
.directive('groupList', require('./directive/group-list').directive) .directive('groupList', require('./directive/group-list').directive)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var angular = require('angular'); var angular = require('angular');
var util = require('./util'); var util = require('../../directive/test/util');
describe('annotationShareDialog', function () { describe('annotationShareDialog', function () {
var element; var element;
......
...@@ -7,7 +7,7 @@ var proxyquire = require('proxyquire'); ...@@ -7,7 +7,7 @@ var proxyquire = require('proxyquire');
var events = require('../../events'); var events = require('../../events');
var fixtures = require('../../test/annotation-fixtures'); var fixtures = require('../../test/annotation-fixtures');
var testUtil = require('../../../shared/test/util'); var testUtil = require('../../../shared/test/util');
var util = require('./util'); var util = require('../../directive/test/util');
var inject = angular.mock.inject; var inject = angular.mock.inject;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
var angular = require('angular'); var angular = require('angular');
var annotationThread = require('../annotation-thread'); var annotationThread = require('../annotation-thread');
var util = require('./util'); var util = require('../../directive/test/util');
function PageObject(element) { function PageObject(element) {
this.annotations = function () { this.annotations = function () {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var angular = require('angular'); var angular = require('angular');
var util = require('./util'); var util = require('../../directive/test/util');
function PageObject(element) { function PageObject(element) {
this.unknownLoginText = function () { this.unknownLoginText = function () {
......
...@@ -27,7 +27,7 @@ describe 'loginForm.Controller', -> ...@@ -27,7 +27,7 @@ describe 'loginForm.Controller', ->
before -> before ->
angular.module('h', []) angular.module('h', [])
.controller('loginFormController', require('../directive/login-form').Controller) .controller('loginFormController', require('../login-form').Controller)
beforeEach module('h') beforeEach module('h')
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var angular = require('angular'); var angular = require('angular');
var util = require('./util'); var util = require('../../directive/test/util');
var fakeStorage = {}; var fakeStorage = {};
var fakeLocalStorage = { var fakeLocalStorage = {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var angular = require('angular'); var angular = require('angular');
var util = require('./util'); var util = require('../../directive/test/util');
describe('searchInput', function () { describe('searchInput', function () {
var fakeHttp; var fakeHttp;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var angular = require('angular'); var angular = require('angular');
var util = require('./util'); var util = require('../../directive/test/util');
describe('searchStatusBar', function () { describe('searchStatusBar', function () {
before(function () { before(function () {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var angular = require('angular'); var angular = require('angular');
var util = require('./util'); var util = require('../../directive/test/util');
describe('selectionTabs', function () { describe('selectionTabs', function () {
before(function () { before(function () {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var angular = require('angular'); var angular = require('angular');
var util = require('./util'); var util = require('../../directive/test/util');
describe('shareDialog', function () { describe('shareDialog', function () {
var fakeAnnotationUI; var fakeAnnotationUI;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var angular = require('angular'); var angular = require('angular');
var util = require('./util'); var util = require('../../directive/test/util');
describe('sortDropdown', function () { describe('sortDropdown', function () {
before(function () { before(function () {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var angular = require('angular'); var angular = require('angular');
var util = require('./util'); var util = require('../../directive/test/util');
describe('svgIcon', function () { describe('svgIcon', function () {
before(function () { before(function () {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
var angular = require('angular'); var angular = require('angular');
var util = require('./util'); var util = require('../../directive/test/util');
describe('tagEditor', function () { describe('tagEditor', function () {
var fakeTags; var fakeTags;
......
...@@ -8,7 +8,7 @@ var immutable = require('seamless-immutable'); ...@@ -8,7 +8,7 @@ var immutable = require('seamless-immutable');
var events = require('../../events'); var events = require('../../events');
var threadList = require('../thread-list'); var threadList = require('../thread-list');
var util = require('./util'); var util = require('../../directive/test/util');
var annotFixtures = immutable({ var annotFixtures = immutable({
annotation: {$tag: 't1', id: '1', text: 'text'}, annotation: {$tag: 't1', id: '1', text: 'text'},
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
var angular = require('angular'); var angular = require('angular');
var escapeStringRegexp = require('escape-string-regexp'); var escapeStringRegexp = require('escape-string-regexp');
var util = require('./util'); var util = require('../../directive/test/util');
describe('timestamp', function () { describe('timestamp', function () {
var clock; var clock;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment