From 41156cec7cfcc39d80bd366bec0c480dd9b80f11 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Thu, 21 Jul 2016 12:07:28 -0700 Subject: [PATCH 01/28] [Build] Normalize reporting for QA tasks https://developer.nasa.gov/ResourceProspector/warp/issues/191 --- gulpfile.js | 5 +++++ karma.conf.js | 6 +++--- package.json | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index fab0f056e0..ff994c6a2c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -42,6 +42,7 @@ var gulp = require('gulp'), main: 'main.js', dist: 'dist', assets: 'dist/assets', + reports: 'dist/reports', scss: ['./platform/**/*.scss', './example/**/*.scss'], scripts: [ 'main.js', 'platform/**/*.js', 'src/**/*.js' ], specs: [ 'platform/**/*Spec.js', 'src/**/*Spec.js' ], @@ -112,6 +113,10 @@ gulp.task('lint', function () { .pipe(jshint({ jasmine: true })); return merge(scriptLint, specLint) + .pipe(jshint.reporter('gulp-jshint-html-reporter', { + filename: paths.reports + '/lint/jshint-report.html', + createMissingFolders : true + })) .pipe(jshint.reporter('default')) .pipe(jshint.reporter('fail')); }); diff --git a/karma.conf.js b/karma.conf.js index 17889dfe43..e682ec6d86 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -81,7 +81,7 @@ module.exports = function(config) { coverageReporter: { dir: process.env.CIRCLE_ARTIFACTS ? process.env.CIRCLE_ARTIFACTS + '/coverage' : - "dist/coverage", + "dist/reports/coverage", check: { global: { lines: 80 @@ -91,13 +91,13 @@ module.exports = function(config) { // HTML test reporting. htmlReporter: { - outputDir: "target/tests", + outputDir: "dist/reports/tests", preserveDescribeNesting: true, foldAll: false }, junitReporter: { - outputDir: process.env.CIRCLE_TEST_REPORTS || 'target/junit' + outputDir: process.env.CIRCLE_TEST_REPORTS || 'dist/reports/junit' }, // Continuous Integration mode. diff --git a/package.json b/package.json index dadce1d35c..028d7310e1 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "gulp": "^3.9.0", "gulp-jscs": "^3.0.2", "gulp-jshint": "^2.0.0", + "gulp-jshint-html-reporter": "^0.1.3", "gulp-rename": "^1.2.2", "gulp-replace-task": "^0.11.0", "gulp-requirejs-optimize": "^0.3.1", From 4e5887d9ecdda7e46cc3243b214fa4e1d8c99504 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Mon, 15 Aug 2016 15:14:17 -0700 Subject: [PATCH 02/28] [Tree] Check for change before scope.$apply TreeView's observers will be called when the selected domain object changes, which can occur for one of two reasons: 1. Because a new value was set externally, from mct-tree. 2. Because a new value was selected, by the user. In the latter case a $apply is needed, but in the former it is not (and causes an error.) However, when that case occurs, the value in scope will be up to date already (it was a watch that triggered the call to treeView.value) so no assignment or $apply is necessary. Fixes #1114. --- .../general/src/directives/MCTTree.js | 6 ++-- .../general/test/directives/MCTTreeSpec.js | 36 ++++++++++++++++++- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/platform/commonUI/general/src/directives/MCTTree.js b/platform/commonUI/general/src/directives/MCTTree.js index 987b733ba6..3b08691125 100644 --- a/platform/commonUI/general/src/directives/MCTTree.js +++ b/platform/commonUI/general/src/directives/MCTTree.js @@ -28,8 +28,10 @@ define([ function link(scope, element) { var treeView = new TreeView(gestureService), unobserve = treeView.observe(function (domainObject) { - scope.mctModel = domainObject; - scope.$apply(); + if (scope.mctModel !== domainObject) { + scope.mctModel = domainObject; + scope.$apply(); + } }); element.append(angular.element(treeView.elements())); diff --git a/platform/commonUI/general/test/directives/MCTTreeSpec.js b/platform/commonUI/general/test/directives/MCTTreeSpec.js index 0cc64949c2..bd8e17117a 100644 --- a/platform/commonUI/general/test/directives/MCTTreeSpec.js +++ b/platform/commonUI/general/test/directives/MCTTreeSpec.js @@ -29,6 +29,18 @@ define([ mockExpr, mctTree; + function makeMockDomainObject(id) { + var mockDomainObject = jasmine.createSpyObj('domainObject-' + id, [ + 'getId', + 'getModel', + 'getCapability', + 'hasCapability' + ]); + mockDomainObject.getId.andReturn(id); + mockDomainObject.getModel.andReturn({}); + return mockDomainObject; + } + beforeEach(function () { mockGestureService = jasmine.createSpyObj( 'gestureService', @@ -56,7 +68,8 @@ define([ testAttrs; beforeEach(function () { - mockScope = jasmine.createSpyObj('$scope', ['$watch', '$on']); + mockScope = + jasmine.createSpyObj('$scope', ['$watch', '$on', '$apply']); mockElement = jasmine.createSpyObj('element', ['append']); testAttrs = { mctModel: "some-expression" }; mockScope.$parent = @@ -88,6 +101,27 @@ define([ jasmine.any(Function) ); }); + + // https://github.com/nasa/openmct/issues/1114 + it("does not trigger $apply during $watches", function () { + mockScope.mctObject = makeMockDomainObject('root'); + mockScope.mctMode = makeMockDomainObject('selection'); + mockScope.$watch.calls.forEach(function (call) { + call.args[1](mockScope[call.args[0]]); + }); + expect(mockScope.$apply).not.toHaveBeenCalled(); + }); + it("does trigger $apply from other value changes", function () { + // White-boxy; we know this is the setter for the tree's value + var treeValueFn = mockScope.$watch.calls[0].args[1]; + + mockScope.mctObject = makeMockDomainObject('root'); + mockScope.mctMode = makeMockDomainObject('selection'); + + treeValueFn(makeMockDomainObject('other')); + + expect(mockScope.$apply).toHaveBeenCalled(); + }); }); }); From 10d2794bb7c8d93ba73aa94106bb5b2c55a066b2 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 19 Aug 2016 13:26:11 -0700 Subject: [PATCH 03/28] [Locator] Don't reset root unnecessarily ...as this will trigger a refresh of the mct-representation for the tree, which will in turn create a new mct-tree instance, resulting in any expanded/collapsed state being lost. Fixes #1008. --- .../edit/src/creation/LocatorController.js | 2 +- .../test/creation/LocatorControllerSpec.js | 39 ++++++++++++------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/platform/commonUI/edit/src/creation/LocatorController.js b/platform/commonUI/edit/src/creation/LocatorController.js index 54e5659784..fc0ab6396c 100644 --- a/platform/commonUI/edit/src/creation/LocatorController.js +++ b/platform/commonUI/edit/src/creation/LocatorController.js @@ -50,7 +50,7 @@ define( $scope.rootObject = (context && context.getRoot()) || $scope.rootObject; }, 0); - } else if (!contextRoot) { + } else if (!contextRoot && !$scope.rootObject) { //If no context root is available, default to the root // object $scope.rootObject = undefined; diff --git a/platform/commonUI/edit/test/creation/LocatorControllerSpec.js b/platform/commonUI/edit/test/creation/LocatorControllerSpec.js index ce18b2d1b8..6837ed2a38 100644 --- a/platform/commonUI/edit/test/creation/LocatorControllerSpec.js +++ b/platform/commonUI/edit/test/creation/LocatorControllerSpec.js @@ -138,23 +138,34 @@ define( }); }); describe("when no context is available", function () { - var defaultRoot = "DEFAULT_ROOT"; - - beforeEach(function () { - mockContext.getRoot.andReturn(undefined); - getObjectsPromise.then.andCallFake(function (callback) { - callback({'ROOT': defaultRoot}); - }); - controller = new LocatorController(mockScope, mockTimeout, mockObjectService); - }); - - it("provides a default context where none is available", function () { - mockScope.$watch.mostRecentCall.args[1](mockDomainObject); - mockTimeout.mostRecentCall.args[0](); - expect(mockScope.rootObject).toBe(defaultRoot); + var defaultRoot = "DEFAULT_ROOT"; + beforeEach(function () { + mockContext.getRoot.andReturn(undefined); + getObjectsPromise.then.andCallFake(function (callback) { + callback({'ROOT': defaultRoot}); }); + controller = new LocatorController(mockScope, mockTimeout, mockObjectService); }); + + it("provides a default context where none is available", function () { + mockScope.$watch.mostRecentCall.args[1](mockDomainObject); + mockTimeout.mostRecentCall.args[0](); + expect(mockScope.rootObject).toBe(defaultRoot); + }); + + it("does not issue redundant requests for the root object", function () { + mockScope.$watch.mostRecentCall.args[1](mockDomainObject); + mockTimeout.mostRecentCall.args[0](); + mockScope.$watch.mostRecentCall.args[1](undefined); + mockTimeout.mostRecentCall.args[0](); + mockScope.$watch.mostRecentCall.args[1](mockDomainObject); + mockTimeout.mostRecentCall.args[0](); + expect(mockObjectService.getObjects.calls.length) + .toEqual(1); + }); + + }); }); } ); From fdbe31cb762f673fb90c829e2e6bae7ae65403c5 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 19 Aug 2016 14:26:03 -0700 Subject: [PATCH 04/28] [Locator] Remove redundant assignment https://github.com/nasa/openmct/pull/1132/files/10d2794bb7c8d93ba73aa94106bb5b2c55a066b2#r75547548 --- platform/commonUI/edit/src/creation/LocatorController.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/platform/commonUI/edit/src/creation/LocatorController.js b/platform/commonUI/edit/src/creation/LocatorController.js index fc0ab6396c..53bfc3feb1 100644 --- a/platform/commonUI/edit/src/creation/LocatorController.js +++ b/platform/commonUI/edit/src/creation/LocatorController.js @@ -51,9 +51,6 @@ define( (context && context.getRoot()) || $scope.rootObject; }, 0); } else if (!contextRoot && !$scope.rootObject) { - //If no context root is available, default to the root - // object - $scope.rootObject = undefined; // Update the displayed tree on a timeout to avoid // an infinite digest exception. objectService.getObjects(['ROOT']) From e29efbbcdf0735b6e5d13c4555e0110b1a988dce Mon Sep 17 00:00:00 2001 From: Kevin Van Kessel Date: Mon, 22 Aug 2016 12:52:34 -0700 Subject: [PATCH 05/28] [Search] 'All' selected upon no filters. Fixes #1117 Upon deselecting every filter, the search returns nothing. This serves no useful purpose as discussed in #1117. Now deselecting every filter automatically selects 'All'. --- .../search/src/controllers/SearchMenuController.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/platform/search/src/controllers/SearchMenuController.js b/platform/search/src/controllers/SearchMenuController.js index ae53338795..f6018b732c 100644 --- a/platform/search/src/controllers/SearchMenuController.js +++ b/platform/search/src/controllers/SearchMenuController.js @@ -80,7 +80,7 @@ define(function () { // If there's still nothing in the filters string, there are no // filters selected if ($scope.ngModel.filtersString === '') { - $scope.ngModel.filtersString = 'NONE'; + $scope.ngModel.checkAll = true; } } @@ -95,12 +95,11 @@ define(function () { $scope.ngModel.checked[type] = false; }); - // Change the filters string depending on checkAll status - if ($scope.ngModel.checkAll) { - // This setting will make the filters display hidden - $scope.ngModel.filtersString = ''; - } else { - $scope.ngModel.filtersString = 'NONE'; + // This setting will make the filters display hidden + $scope.ngModel.filtersString = ''; + // Do not let checkAll become unchecked when it is the only checked filter + if (!$scope.ngModel.checkAll) { + $scope.ngModel.checkAll = true; } // Re-filter results From 702ebbd557ac4bc8c773ef3decf32a70262d8645 Mon Sep 17 00:00:00 2001 From: Kevin Van Kessel Date: Mon, 22 Aug 2016 13:19:47 -0700 Subject: [PATCH 06/28] [Search] Update test for #1117 fix. Changed test to work properly with #1117 fix. Checks if checkAll gets checked when no options are checked. Checks if changing checkAll updates the filter string to '' --- .../search/test/controllers/SearchMenuControllerSpec.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/search/test/controllers/SearchMenuControllerSpec.js b/platform/search/test/controllers/SearchMenuControllerSpec.js index dcee87fd47..be4443d4cf 100644 --- a/platform/search/test/controllers/SearchMenuControllerSpec.js +++ b/platform/search/test/controllers/SearchMenuControllerSpec.js @@ -83,7 +83,7 @@ define( mockScope.ngModel.checkAll = false; controller.checkAll(); - expect(mockScope.ngModel.filtersString).toEqual('NONE'); + expect(mockScope.ngModel.filtersString).toEqual(''); }); it("checking checkAll option resets other options", function () { @@ -97,7 +97,7 @@ define( }); }); - it("tells the user when no options are checked", function () { + it("checks checkAll when no options are checked", function () { Object.keys(mockScope.ngModel.checked).forEach(function (type) { mockScope.ngModel.checked[type] = false; }); @@ -105,7 +105,8 @@ define( controller.updateOptions(); - expect(mockScope.ngModel.filtersString).toEqual('NONE'); + expect(mockScope.ngModel.filtersString).toEqual(''); + expect(mockScope.ngModel.checkAll).toEqual(true); }); it("tells the user when options are checked", function () { From b02de171f13bde6352b52c611e088550368a7238 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 26 Aug 2016 12:39:24 -0700 Subject: [PATCH 07/28] [Testing] Remove protractor hierarchy Remove protractor test hierarchy; until work is completed on #348, this is not useful and will be impractical to maintain. --- protractor/README | 69 ------- protractor/UI/DragDrop.js | 129 ------------ protractor/UI/Fullscreen.js | 50 ----- protractor/UI/InfoBubble.js | 43 ---- protractor/UI/NewWindow.js | 90 -------- protractor/UI/RightClick.js | 84 -------- protractor/bin/clean.js | 15 -- protractor/bin/ctrl.sh | 90 -------- protractor/bin/run.js | 12 -- protractor/bin/start.js | 40 ---- protractor/bin/stop.js | 44 ---- protractor/common/Buttons.js | 41 ---- protractor/common/CreateItem.js | 194 ------------------ protractor/common/EditItem.js | 66 ------ protractor/common/Launch.js | 29 --- protractor/common/RightMenu.js | 116 ----------- protractor/common/drag.js | 70 ------- protractor/conf.js | 67 ------ protractor/create/CreateActivity.js | 57 ----- protractor/create/CreateActivityMode.js | 58 ------ protractor/create/CreateButton.js | 40 ---- protractor/create/CreateClock.js | 109 ---------- protractor/create/CreateDisplay.js | 58 ------ protractor/create/CreateFolder.js | 59 ------ protractor/create/CreateSineWave.js | 59 ------ protractor/create/CreateTelemetry.js | 59 ------ protractor/create/CreateTimeline.js | 81 -------- protractor/create/CreateTimer.js | 74 ------- protractor/create/CreateWebPage.js | 59 ------ protractor/ctrl.sh | 60 ------ protractor/delete/DeleteActivity.js | 38 ---- protractor/delete/DeleteActivityMode.js | 38 ---- protractor/delete/DeleteClock.js | 38 ---- protractor/delete/DeleteDisplay.js | 38 ---- protractor/delete/DeleteFolder.js | 38 ---- protractor/delete/DeleteTelemetry.js | 38 ---- protractor/delete/DeleteTimeline.js | 38 ---- protractor/delete/DeleteTimer.js | 38 ---- protractor/delete/DeleteWebPage.js | 37 ---- protractor/package.json | 20 -- protractor/stressTest/StressTest.js | 78 ------- protractor/stressTest/StressTestBubble.js | 59 ------ .../stressTest/StressTestCreateButton.js | 56 ----- protractor/stressTest/StressTestMenu.js | 55 ----- protractor/stressTest/StressTestNewPage.js | 61 ------ protractor/stressTest/StressTestRightClick.js | 59 ------ 46 files changed, 2751 deletions(-) delete mode 100644 protractor/README delete mode 100644 protractor/UI/DragDrop.js delete mode 100644 protractor/UI/Fullscreen.js delete mode 100644 protractor/UI/InfoBubble.js delete mode 100644 protractor/UI/NewWindow.js delete mode 100644 protractor/UI/RightClick.js delete mode 100755 protractor/bin/clean.js delete mode 100755 protractor/bin/ctrl.sh delete mode 100755 protractor/bin/run.js delete mode 100755 protractor/bin/start.js delete mode 100755 protractor/bin/stop.js delete mode 100644 protractor/common/Buttons.js delete mode 100644 protractor/common/CreateItem.js delete mode 100644 protractor/common/EditItem.js delete mode 100644 protractor/common/Launch.js delete mode 100644 protractor/common/RightMenu.js delete mode 100644 protractor/common/drag.js delete mode 100644 protractor/conf.js delete mode 100644 protractor/create/CreateActivity.js delete mode 100644 protractor/create/CreateActivityMode.js delete mode 100644 protractor/create/CreateButton.js delete mode 100644 protractor/create/CreateClock.js delete mode 100644 protractor/create/CreateDisplay.js delete mode 100644 protractor/create/CreateFolder.js delete mode 100644 protractor/create/CreateSineWave.js delete mode 100644 protractor/create/CreateTelemetry.js delete mode 100644 protractor/create/CreateTimeline.js delete mode 100644 protractor/create/CreateTimer.js delete mode 100644 protractor/create/CreateWebPage.js delete mode 100755 protractor/ctrl.sh delete mode 100644 protractor/delete/DeleteActivity.js delete mode 100644 protractor/delete/DeleteActivityMode.js delete mode 100644 protractor/delete/DeleteClock.js delete mode 100644 protractor/delete/DeleteDisplay.js delete mode 100644 protractor/delete/DeleteFolder.js delete mode 100644 protractor/delete/DeleteTelemetry.js delete mode 100644 protractor/delete/DeleteTimeline.js delete mode 100644 protractor/delete/DeleteTimer.js delete mode 100644 protractor/delete/DeleteWebPage.js delete mode 100644 protractor/package.json delete mode 100644 protractor/stressTest/StressTest.js delete mode 100644 protractor/stressTest/StressTestBubble.js delete mode 100644 protractor/stressTest/StressTestCreateButton.js delete mode 100644 protractor/stressTest/StressTestMenu.js delete mode 100644 protractor/stressTest/StressTestNewPage.js delete mode 100644 protractor/stressTest/StressTestRightClick.js diff --git a/protractor/README b/protractor/README deleted file mode 100644 index 5734e5702d..0000000000 --- a/protractor/README +++ /dev/null @@ -1,69 +0,0 @@ -E2e Protractor Tests. - -1. Instructions: - - 1. 3 Control Scripts located in bin/. - run.js : node script used to start tests - start.js: node script used to setup test(starts node,localstorage and webdriver) - stop.js : node script, kills the 3 process started in start.js. - clean.js: node script used to remove the node_module directory.(clean up directory). - - 2. Use npm(Node Package Mangager) to Run Scripts. - a. cd protractor; - b. npm install; - c. To Run: - -npm start : will start processes need by protractor - -npm stop : will stop the processes need by protractor - -npm run-script run : will execute Protractor Script - -npm run-script all : will execute "start", "run", and "stop" script - -2. Directory Hierachy: - - -protractor: base directory - -common: contains prototype javascript functions that all other tests use. - -Buttons: common prototype functions related to enter fullscreen - -CreateItem: common prototype functions related to creating an item - -drag: common functions to test drag and drop. - -editItem: common functions used to test edit functionality. - -Launch: common script used to navigate the specified website. - -RightMenu: common functions for right click menu(remove). - -create - -e2e tests that creates the specified object. - -delete - -e2e tests that removes the specified object - -logs - -ctrl.sh redirects console output of MMAP, webdriver and elastic search and pipes them to log files. - -UI - -Contains tests that test the UI(drag drop, fullscreen, info bubble) - -conf.js: - -protractor config file. Explained below - -stressTest: - Tests that are used to test for memory leaks. You can use the new tab option on WARP and then open the - timeline in the new tab during the browser.sleep(). Once the test is do the browser will pause and you - can look a the timeline results in the new tab. - - NOTE: Cannot open chrome dev tools on same tab as the test are run on. Protractor uses the dev tools to - exectute the tests. - - -StressTest will create and delete folders. - -StressTestBubble.js: creates manny bubbles. - (Delay variable in InfoGesture.js was changed to 0) -3. Conf.js - Conf.js is used by protractor to setup and execute the tests. - -allScriptsTimeout: gives more time for protractor to synchronize with the page. - -jasmineNodeOpts: Protractor uses jasmine for the tests and jasmine has a default time out 30 seconds - per "it" test. Changed to maximume allowed time 360000 ms - -seleniumAddress: Protractor uses a Selenium server as a "proxy" between the test scripts and the browser - driver. A stand a lone version comes with protractor and to run use "webdriver-manager" - default address is: http://localhost:4444/wd/hub. - -specs[]: Is an array of files. Each File should have a "describe, it" test to be executed by protractor. - -capabilities: Tells protractor what browser to use and any browser arguments. - -4. bundle.json - bundle.json is used by npm to determine dependencies and location of script files. - -Dependencies: - "protractor": Contains protractor and webdriver package. - "psnode": Window/Unix Command, used for list/kill process.(ps aux) - "shelljs": Window/Unix Common JS Commands. eg rm,ls,exec - "sleep": Window/Unix Commands used to sleep the script - "string": Window/Unix Commands for string manipulation. \ No newline at end of file diff --git a/protractor/UI/DragDrop.js b/protractor/UI/DragDrop.js deleted file mode 100644 index 0e87f974bf..0000000000 --- a/protractor/UI/DragDrop.js +++ /dev/null @@ -1,129 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var fullScreenFile = require("../common/Buttons"); -var createItem = require("../common/CreateItem") -var itemEdit = require("../common/EditItem"); -var rightMenu = require("../common/RightMenu"); -var Drag = require("../common/drag"); - -describe('Test Drag and Drop', function() { - var fullScreenClass = new fullScreenFile(); - var createClass = new createItem(); - var editItemClass = new itemEdit(); - var rightMenuClass = new rightMenu(); - var dragDrop = new Drag(); - - beforeEach(require('../common/Launch')); - - it('should create a folder', function(){ - var ITEM_NAME = "Folder"; - var ITEM_TYPE = "folder"; - var ITEM_MENU_GLYPH = 'F\nFolder'; - var ITEM_GRID_SELECT = 'P\nF\nFolder\n0 Items'; - - browser.wait(function() { - return createClass.createButton().click(); - }).then(function (){ - var folder = createClass.selectNewItem(ITEM_TYPE); - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(1000); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - createClass.fillFolderForum(ITEM_NAME, ITEM_TYPE).click(); - browser.sleep(1000); - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - browser.sleep(1000); - }); - }); - it('should create a timer',function (){ - var ITEM_NAME = "Timer"; - var ITEM_TYPE = "timer"; - var ITEM_MENU_GLYPH = 'õ\nTimer'; - var ITEM_GRID_SELECT = 'P\nõ\nTimer'; - - browser.wait(function() { - return createClass.createButton().click(); - }).then(function (){ - var folder = createClass.selectNewItem(ITEM_TYPE) - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(1000); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - createClass.fillFolderForum(ITEM_NAME, ITEM_TYPE).click(); - browser.sleep(1500); - }).then(function (){ - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - browser.sleep(1000); - }); - - }); - it('should drag timer into folder', function(){ - var ITEM_SIDE_SELECT = ">\nF\nFolder" - var name = "õ\nTimer"; - - rightMenuClass.select(ITEM_SIDE_SELECT, true).click(); - browser.sleep(2000); - var object = element.all(by.css('.ng-isolate-scope.ng-pristine.ng-valid')).filter(function (ele){ - return ele.getText().then(function(text) { - return text === name; - }); - }); - var clock = object.get(1); - var panel = element(by.css('.items-holder.grid.abs.ng-scope')); - - //drag - expect(panel.isPresent()).toBe(true) - expect(clock.isPresent()).toBe(true) - browser.executeScript(dragDrop.DragDrop,clock.getWebElement(),panel.getWebElement()) - browser.sleep(3000); - //check - var dragObject = element.all(by.repeater('childObject in composition')).filter(function (ele) { - return ele.getText().then(function(text) { - return text === "P\nõ\nTimer" - }) - }) - }); - it('should delete the Folder Item', function(){ - var ITEM_SIDE_SELECT = ">\nF\nFolder" - browser.wait(function() { - return element.all(by.css('.ui-symbol.view-control.ng-binding.ng-scope')).isDisplayed(); - }); - rightMenuClass.delete(ITEM_SIDE_SELECT); - browser.sleep(1000); - }); - it('should delete the Timer Item', function(){ - var ITEM_SIDE_SELECT = "õ\nTimer"; - browser.wait(function() { - return element.all(by.css('.ui-symbol.view-control.ng-binding.ng-scope')).isDisplayed(); - }); - rightMenuClass.delete(ITEM_SIDE_SELECT); - browser.sleep(1000); - }); -}); diff --git a/protractor/UI/Fullscreen.js b/protractor/UI/Fullscreen.js deleted file mode 100644 index 577cf4bef4..0000000000 --- a/protractor/UI/Fullscreen.js +++ /dev/null @@ -1,50 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -//TODO Add filter for duplications/ -var fullScreenFile = require("../common/Buttons"); - -describe('Enable Fullscreen', function() { - var fullScreenClass = new fullScreenFile(); - - beforeEach(require('../common/Launch')); - - beforeEach(function() { - browser.wait(function(){ - return element(by.css('[title="Enter full screen mode"]')).isPresent(); - }, 7000); - browser.sleep(1000); - }); - - it('should find fullscreen button', function(){ - expect(element(by.css('[title="Enter full screen mode"]')).isDisplayed()).toBeTruthy(); - - });it('should enter fullscreen when fullscreen button is pressed', function(){ - function getFullScreen(){ - return document.webkitIsFullScreen; - } - var fullscreen = browser.executeScript(getFullScreen) - expect(fullscreen).toBeFalsy(); - fullScreenClass.fullScreen() - fullscreen = browser.executeScript(getFullScreen) - expect(fullscreen).toBeTruthy(); - }); -}); diff --git a/protractor/UI/InfoBubble.js b/protractor/UI/InfoBubble.js deleted file mode 100644 index 07a77d9b41..0000000000 --- a/protractor/UI/InfoBubble.js +++ /dev/null @@ -1,43 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var fullScreenFile = require("../common/Buttons"); -var createItem = require("../common/CreateItem") -var itemEdit = require("../common/EditItem"); -var rightMenu = require("../common/RightMenu"); -var Drag = require("../common/drag"); - -describe('Info Bubble', function() { - var fullScreenClass = new fullScreenFile(); - var createClass = new createItem(); - var editItemClass = new itemEdit(); - var rightMenuClass = new rightMenu(); - var dragDrop = new Drag(); - - beforeEach(require('../common/Launch')); - - it('should detect info bubble', function(){ - var myitem = (element.all(by.repeater('child in composition'))).get(0); - browser.actions().mouseMove(myitem).perform(); - browser.sleep(4000); - expect(element(by.css('.t-infobubble.s-infobubble.l-infobubble-wrapper')).isDisplayed()).toBe(true); - }); -}); diff --git a/protractor/UI/NewWindow.js b/protractor/UI/NewWindow.js deleted file mode 100644 index 8f166ca55b..0000000000 --- a/protractor/UI/NewWindow.js +++ /dev/null @@ -1,90 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var fullScreenFile = require("../common/Buttons"); -var createClassFile = require("../common/CreateItem") -var itemEdit = require("../common/EditItem"); -var rightMenu = require("../common/RightMenu.js"); - -describe('New Window', function() { - var fullScreenClass = new fullScreenFile(); - var createClass = new createClassFile(); - var editItemClass = new itemEdit(); - var rightMenuClass = new rightMenu(); - - var ITEM_NAME = "Folder"; - var ITEM_TYPE = "folder"; - var ITEM_MENU_GLYPH = 'F\nFolder'; - var ITEM_GRID_SELECT = 'P\nF\nFolder\n0 Items'; - var ITEM_SIDE_SELECT = ">\nF\nFolder" - - beforeEach(require('../common/Launch')); - - it('should create an object and open it in new window', function(){ - function replaceString(string){ - //used to remove timestamp on the output so files can be compared - return string.replace(new RegExp("([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]","g"),"z"); - } - browser.wait(function() { - return createClass.createButton().click(); - }).then(function (){ - var folder = createClass.selectNewItem(ITEM_TYPE); - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(1000); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - createClass.fillFolderForum(ITEM_NAME, ITEM_TYPE).click(); - browser.sleep(1000); - }).then(function (){ - //open file in new page - var before = browser.driver.getPageSource(); - before = browser.executeScript(replaceString, before) - - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - browser.sleep(1000); - fullScreenClass.newWidnow().click(); - - var after = browser.driver.getPageSource(); - after = browser.executeScript(replaceString, after) - - browser.getAllWindowHandles().then(function (handles) { - browser.driver.switchTo().window(handles[1]); - browser.sleep(1000); - expect(before).toEqual(after); - browser.sleep(1000); - browser.driver.close(); - browser.driver.switchTo().window(handles[0]); - }); - }); - }); - it('should delete the object in the new window', function(){ - browser.wait(function() { - return element.all(by.css('.ui-symbol.view-control.ng-binding.ng-scope')).isDisplayed(); - }); - rightMenuClass.delete(ITEM_SIDE_SELECT); - browser.sleep(1000); - }); - -}); diff --git a/protractor/UI/RightClick.js b/protractor/UI/RightClick.js deleted file mode 100644 index 07a52f2d9b..0000000000 --- a/protractor/UI/RightClick.js +++ /dev/null @@ -1,84 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var right_click = require("../common/RightMenu.js"); -var Create = require("../common/CreateItem") -var itemEdit = require("../common/EditItem"); - -describe('The Right Menu', function() { - var clickClass = new right_click(); - var createClass = new Create(); - var editItemClass = new itemEdit(); - var ITEM_NAME = "Folder"; - var ITEM_TYPE = "folder"; - var ITEM_MENU_GLYPH = 'F\nFolder'; - var ITEM_GRID_SELECT = 'P\nF\nFolder\n0 Items'; - - beforeEach(require('../common/Launch')); - - it('should Dissapear After Delete', function(){ - browser.wait(function() { - createClass.createButton().click(); - return true; - }).then(function (){ - var folder = createClass.selectNewItem(ITEM_TYPE); - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(1000); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - createClass.fillFolderForum(ITEM_NAME, ITEM_TYPE).click(); - browser.sleep(1000); - }).then(function (){ - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - browser.sleep(1000); - }).then(function () { - var MyItem = ">\nF\nMy Items" - element.all(by.repeater('child in composition')).filter(function (ele){ - return ele.getText().then(function(text) { - return text === MyItem; - }); - }).all(by.css('.ui-symbol.view-control.ng-binding.ng-scope')).click(); - var object = element.all(by.repeater('child in composition')).filter(function (ele){ - return ele.getText().then(function(text) { - return text === ">\nF\nFolder"; - }); - }); - browser.sleep(1000) - browser.actions().mouseMove(object.get(0)).perform(); - browser.actions().click(protractor.Button.RIGHT).perform(); - browser.sleep(1000) - var menu = element.all(by.css('.ng-binding')).filter(function (ele){ - return ele.getText().then(function (text) { - return text == "Z\nRemove"; - }) - }) - menu.click(); - browser.sleep(1000) - - expect(menu.isDisplayed()).toBe(false); - }) - }); - -}); diff --git a/protractor/bin/clean.js b/protractor/bin/clean.js deleted file mode 100755 index 82e776901f..0000000000 --- a/protractor/bin/clean.js +++ /dev/null @@ -1,15 +0,0 @@ -#! /usr/bin/env node -var shell = require("shelljs/global"); - -var startdir = process.cwd(); -var command = "npm unlink"; - -console.log("Cleaning Directory") -exec(command, function(code, output) { - if(code != 0){ - console.log('Exit code:', code); - console.log('Program output:', output); - } -}); -console.log("rm -rf node_modules") -rm('-rf', __dirname + "/../node_modules") diff --git a/protractor/bin/ctrl.sh b/protractor/bin/ctrl.sh deleted file mode 100755 index faf385d2ad..0000000000 --- a/protractor/bin/ctrl.sh +++ /dev/null @@ -1,90 +0,0 @@ -#! /bin/bash -ARGUMENT=$1; - -if [ $# != 1 ]; then - echo "Expected 1 Aurgument. Received " $# 1>&2; - exit 1 -fi -#Start webdrive and http-server -if [ $ARGUMENT == start ]; then - echo "Creating Log Directory ..." - mkdir logs; - - cd .. - node app.js -p 1984 -x platform/persistence/elastic -i example/persistence > protractor/logs/nodeApp.log 2>&1 & - sleep 3; - if grep -iq "Error" protractor/logs/nodeApp.log; then - if grep -iq "minimist" protractor/logs/nodeApp.log; then - echo " Node Failed Because Minimist is not installed" - echo " Installng Minimist ..." - npm install minimist express > protractor/logs/minimist.log 2>&1 & - wait $! - if [ $? != 0 ]; then - echo " Error: minimist" - echo " Check Log file" - echo - else - echo " Started: Minimist" - echo - node app.js -p 1984 -x platform/persistence/elastic -i example/persistence > protractor/logs/nodeApp.log 2>&1 & - if grep -iq "Error" protractor/logs/nodeApp.log; then - echo " Error: node app failed" - echo " Check Log file" - echo - else - echo " Started: node app.js" - echo - fi - fi - else - echo " Error: node app failed" - echo " Check Log file" - echo - fi - else - echo " Started: node app.js" - echo - fi - echo "Starting webdriver ..." - - cd protractor; - webdriver-manager start > logs/webdriver.log 2>&1 & - sleep 3; - if grep -iq "Exception" logs/webdriver.log; then - echo " Error: webdriver-manager" - echo " Check Log file" - echo - else - echo " Started: webdriver-manager" - fi - echo "Starting Elastic Search..." - - elasticsearch > logs/elasticSearch.log 2>&1 & - sleep 3; - if grep -iq "Exception" logs/elasticSearch.log; then - echo " Error: ElasticSearch" - echo " Check Log file" - echo - else - echo " Started: ElasticSearch" - fi -#Runs Protractor tests -elif [ $ARGUMENT == run ]; then - protractor ./conf.js -#Kill Process -elif [ $ARGUMENT == stop ]; then - echo "Removing logs" - rm -rf logs - echo "Stopping Node" - kill $(ps aux | grep "[n]ode app.js"| awk '{print $2}'); - - echo "Stopping webdriver ..." - kill $(ps aux | grep "[p]rotractor" | awk '{print $2}'); - kill $(ps aux | grep "[w]ebdriver-manager" | awk '{print $2}'); - sleep 1; - echo "Stopping Elastic..." - kill $(ps aux | grep "[e]lastic" | awk '{print $2}'); - sleep 1; -else - echo "Unkown: Command" $1; -fi diff --git a/protractor/bin/run.js b/protractor/bin/run.js deleted file mode 100755 index 316caa11d0..0000000000 --- a/protractor/bin/run.js +++ /dev/null @@ -1,12 +0,0 @@ -#! /usr/bin/env node -var shell = require("shelljs/global"); -var sleep = require('sleep'); - -var command = __dirname + "/../node_modules/protractor/bin/protractor " +__dirname + "/../conf.js"; -console.log("Executing Protractor Test") -exec(command, function(code, output) { - if(code != 0){ - console.log('Exit code:', code); - console.log('Program output:', output); - } -}); \ No newline at end of file diff --git a/protractor/bin/start.js b/protractor/bin/start.js deleted file mode 100755 index 21aacc7efe..0000000000 --- a/protractor/bin/start.js +++ /dev/null @@ -1,40 +0,0 @@ -#! /usr/bin/env node -var shell,sleep; -try { - shell = require("shelljs/global"); - sleep = require('sleep'); -}catch (e){ - console.log("Dependencies Error"); - console.log("Run npm install"); - throw (e); -} -///Users/jsanderf/git/elastic/wtd/protractor/bin -var startdir = process.cwd(); -var command; -mkdir(__dirname + '/../logs'); - -command = __dirname + "/../node_modules/protractor/bin/webdriver-manager update"; -console.log("Installing Webdriver"); -exec(command,{async:false}); -sleep.sleep(1); - -console.log(); -cd(__dirname + '/../../'); -console.log('Installing Dependencies'); -exec("npm install minimist express", {async:false}); -console.log('Starting Node'); -sleep.sleep(1); -exec("node app.js -p 1984 -x example/persistence -x platform/persistence/elastic -i example/localstorage > protractor/logs/nodeApp.log 2>&1 &", {async:false}); -console.log(' Started Node'); - -console.log(); -console.log('Starting Webdriver'); -sleep.sleep(1); -exec("protractor/node_modules/protractor/bin/webdriver-manager start --standalone> protractor/logs/webdriver.log 2>&1 &",{async:false}); -if(error() == null){ - console.log(" Webdriver Started"); -}else{ - console.log(" Error : ", error()); -} -sleep.sleep(1); -cd(startdir); diff --git a/protractor/bin/stop.js b/protractor/bin/stop.js deleted file mode 100755 index ac2c3b4295..0000000000 --- a/protractor/bin/stop.js +++ /dev/null @@ -1,44 +0,0 @@ -#! /usr/bin/env node - -var shell = require("shelljs/global"); -var ps = require('psnode'); -var S = require('string'); -var sleep = require('sleep'); - -// A simple pid lookup -ps.list(function(err, results) { - - results.forEach(function( process ){ - //Killing Node - if(S(process.command).contains("node app.js")) { - console.log(); - console.log( 'Killing Node: %s', process.command); - ps.kill(process.pid, function(err, stdout) { - if (err) { - throw new Error(err); - } - console.log(stdout); - }); - }else if(S(process.command).contains("webdriver")) { - console.log(); - console.log( 'Killing WebDriver: %s', process.command); - ps.kill(process.pid, function(err, stdout) { - if (err){ - throw new Error(err); - } - console.log(stdout); - }); - }else if(S(process.command).contains("protractor")) { - console.log(); - console.log( 'Killing Chrome Drive: %s', process.command); - ps.kill(process.pid, function(err, stdout) { - if (err){ - throw new Error(err); - } - console.log(stdout); - }); - } - }); -}); - - diff --git a/protractor/common/Buttons.js b/protractor/common/Buttons.js deleted file mode 100644 index ec3d3c9c45..0000000000 --- a/protractor/common/Buttons.js +++ /dev/null @@ -1,41 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var Buttons = (function () { - function Buttons() { - } - //finds the Edit Button - Buttons.prototype.fullScreen = function () { - element(by.css('[title="Enter full screen mode"]')).click(); - - }; - Buttons.prototype.newWidnow = function () { - return element.all(by.css('[ng-click="parameters.action.perform()"]')).filter(function (arg) { - return arg.getAttribute("title").then(function (title){ - //expect(title).toEqual("Edit this object."); - return title == 'Open in a new browser tab'; - }) - }); - }; - return Buttons; - -})(); -module.exports = Buttons; diff --git a/protractor/common/CreateItem.js b/protractor/common/CreateItem.js deleted file mode 100644 index 6791b21d9e..0000000000 --- a/protractor/common/CreateItem.js +++ /dev/null @@ -1,194 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var CreateItem = (function () { - function CreateItem() {} - //finds the Create Button - CreateItem.prototype.createButton = function () { - return element.all(by.css('[ng-click="createController.toggle()"]')); - }; - function getFolderType(arg) { - switch(arg) { - case 'folder': - return "F\nFolder" - break; - case 'display': - return "L\nDisplay Layout" - break; - case 'telemetry': - return "t\nTelemetry Panel" - break; - case 'webpage': - return "ê\nWeb Page" - break; - case 'clock': - return "C\nClock" - break; - case 'timer': - return "õ\nTimer" - case 'timeline': - return "S\nTimeline" - break; - case 'activity': - return "a\nActivity" - break; - case 'activity-mode': - return "A\nActivity Mode" - break; - case 'sinewave': - return "T\nSine Wave Generator" - break; - default: - throw new Error("Unexpect State"); - } - } - //Selects Object from Create Menu - CreateItem.prototype.selectNewItem = function (itemText) { - item = getFolderType(itemText); - browser.wait(function(){ - return element(by.css('[ng-click="createAction.perform()"]')).isPresent(); - }, 6000); - this.els =element.all(by.css('[ng-click="createAction.perform()"]')); - this.todoButton = this.els.filter(function(elem) { - return elem.getText().then(function(text) { - return text === item; - }); - }); - return this.todoButton; - }; - //Fills Out Folder Forum - CreateItem.prototype.fillFolderForum = function (folderName, type) { - this.namefields = element.all(by.css('[ng-required="ngRequired"]')).filter(function (elem) { - return elem.getAttribute('type').then(function(text) { - return text === 'text'; - }); - }); - - browser.sleep(1000); - this.namefields.clear(); - browser.sleep(1000); - - this.namefields.get(0).sendKeys(folderName); - switch(type) { - case 'folder': - // return "F\nFolder" - break; - case 'display': - this.namefields.get(1).sendKeys("1"); - browser.sleep(1000); - this.namefields.get(2).sendKeys("2"); - break; - case 'telemetry': - this.namefields.get(1).sendKeys("1"); - browser.sleep(1000); - this.namefields.get(2).sendKeys("2"); - this.dropdownElement = element.all(by.model('ngModel[field]')).filter(function(elem) { - return elem.getTagName().then(function(tag) { - return tag === 'select'; - }); - }); - this.dropdownElement.click(); - this.dropdownElement.all(by.css('option')).get(1).click(); - browser.sleep(1000); - break; - case 'webpage': - this.namefields.get(1).sendKeys("http://test.com"); - browser.sleep(1000); - break; - case 'clock': - this.dropdownElement = element.all(by.model('ngModel[field]')).filter(function(elem) { - return elem.getTagName().then(function(tag) { - return tag === 'select'; - }); - }); - this.dropdownElement.get(0).click(); - this.dropdownElement.get(0).all(by.css('option')).get(0).click(); - browser.sleep(1000); - this.dropdownElement.get(1).click(); - this.dropdownElement.get(1).all(by.css('option')).get(0).click(); - browser.sleep(1000); - - break; - case 'timer': - this.timerDate = element.all(by.model('datetime.date')); - browser.sleep(1000); - this.timerDate.clear().sendKeys("2015-07-22"); - browser.sleep(1000); - this.timerDate = element.all(by.model('datetime.hour')); - this.timerDate.get(0).sendKeys("7"); - this.timerDate = element.all(by.model('datetime.min')); - this.timerDate.get(0).sendKeys("30"); - this.timerDate = element.all(by.model('datetime.sec')); - this.timerDate.get(0).sendKeys("000"); - browser.sleep(1000); - break; - case 'timeline': - this.timerDate = element.all(by.model('datetime.days')); - this.timerDate.clear().sendKeys("10"); - browser.sleep(1000); - this.timerDate = element.all(by.model('datetime.hours')); - this.timerDate.get(0).sendKeys("7"); - this.timerDate = element.all(by.model('datetime.minutes')); - this.timerDate.get(0).sendKeys("30"); - this.timerDate = element.all(by.model('datetime.seconds')); - this.timerDate.get(0).sendKeys("3"); - browser.sleep(1000); - break; - case 'activity': - this.startDay = element.all(by.model('datetime.days')); - this.startDay.clear().sendKeys("10"); - this.startHours = element.all(by.model('datetime.hours')); - this.startHours.get(0).clear().sendKeys("7"); - this.startMinutes = element.all(by.model('datetime.minutes')); - this.startMinutes.get(0).clear().sendKeys("30"); - this.startSeconds = element.all(by.model('datetime.seconds')); - this.startSeconds.get(0).clear().sendKeys("3"); - browser.sleep(1000); - //Duration - this.startDay.get(1).clear().sendKeys("1"); - this.startHours.get(1).clear().sendKeys("1"); - this.startMinutes.get(1).clear().sendKeys("0"); - this.startSeconds.get(1).clear().sendKeys("0"); - browser.sleep(1000); - break; - case 'activity-mode': - this.namefields.get(1).sendKeys("55"); - browser.sleep(1000); - this.namefields.get(2).sendKeys("10"); - break; - case 'sinewave': - this.namefields.get(1).sendKeys("10"); - browser.sleep(1000); - break; - default: - throw new Error("Unexpect State"); - } - return element.all(by.css('[ng-click="ngModel.confirm()"]')); - - }; - //TODO USAGE FOR CLICK ON OBJECT ONCE CREATED - CreateItem.prototype.findFolder = function (){ - return element.all(by.css('[ng-click="action.perform("navigate")"]')); - }; - return CreateItem; - -})(); -module.exports = CreateItem; diff --git a/protractor/common/EditItem.js b/protractor/common/EditItem.js deleted file mode 100644 index fb45fb1daf..0000000000 --- a/protractor/common/EditItem.js +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var EditItem = (function () { - function EditItem() { - } - //finds the Edit Button - EditItem.prototype.SelectItem = function (item_title) { - return element.all(by.css('.item.grid-item.ng-scope')).filter(function (arg){ - return arg.getText().then(function (text) { - // expect(text).toEqual("fh"); - return text == item_title; - }); - }); - }; - EditItem.prototype.EditButton = function () { - return element.all(by.css('[ng-click="parameters.action.perform()"]')).filter(function (arg) { - return arg.getAttribute("title").then(function (title){ - //expect(title).toEqual("Edit"); - return title == 'Edit'; - }) - }); - }; - EditItem.prototype.CreateActivity = function () { - element.all(by.css('[ng-controller="ClickAwayController as toggle"]')).click(); - browser.sleep(1000); - var list = element.all(by.css('[ng-repeat="option in structure.options"]')).filter(function (arg){ - return arg.getText().then(function (text){ - //expect(text).toEqual("Edit this object."); - return text == "a\nActivity"; - }); - }).click(); - }; - EditItem.prototype.saveButton = function () { - element.all(by.css('[ng-click="currentAction.perform()"]')).filter(function (args){ - return args.getText().then(function (text) { - //expect(text).toEqual("Save"); - return text == "Save"; - }); - }).click(); - }; - function getFolderType(arg) { - - } - return EditItem; - -})(); -module.exports = EditItem; diff --git a/protractor/common/Launch.js b/protractor/common/Launch.js deleted file mode 100644 index 75d3631cc4..0000000000 --- a/protractor/common/Launch.js +++ /dev/null @@ -1,29 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -/*global module,browser*/ - -module.exports = function launch() { - 'use strict'; - browser.ignoreSynchronization = true; - browser.get('http://localhost:1984'); - browser.sleep(2000); // 2 seconds -}; diff --git a/protractor/common/RightMenu.js b/protractor/common/RightMenu.js deleted file mode 100644 index d7df8efad4..0000000000 --- a/protractor/common/RightMenu.js +++ /dev/null @@ -1,116 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ - -var RightMenu = (function () { - - function RightMenu() { - } - function carrotMyItem(){ - var MyItem = ">\nF\nMy Items" - element.all(by.repeater('child in composition')).filter(function (ele){ - return ele.getText().then(function(text) { - return text === MyItem; - }); - }).all(by.css('.ui-symbol.view-control.ng-binding.ng-scope')).click(); - } - //RightMenu Click on Object - RightMenu.prototype.delete = function (name, flag) { - if(typeof flag === 'undefined'){ - flag = true; - } - if(flag === true){ - carrotMyItem(); - } - browser.sleep(1000) - var object = element.all(by.repeater('child in composition')).filter(function (ele){ - return ele.getText().then(function(text) { - return text === name; - }); - }); - browser.sleep(1000) - browser.actions().mouseMove(object.get(0)).perform(); - browser.actions().click(protractor.Button.RIGHT).perform(); - browser.sleep(1000) - element.all(by.css('.ng-binding')).filter(function (ele){ - return ele.getText().then(function (text) { - return text == "Z\nRemove"; - }) - }).click(); - browser.sleep(1000) - element.all(by.repeater('child in composition')).filter(function (ele){ - return ele.getText().then(function(text) { - return text === name; - }); - }).then(function (folder) { - expect(folder.length).toBe(0); - }); - }; - RightMenu.prototype.reset = function (name) { - carrotMyItem(); - browser.sleep(1000) - var object = element.all(by.repeater('child in composition')).filter(function (ele){ - return ele.getText().then(function(text) { - return text === name; - }); - }).click(); - browser.sleep(1000) - browser.actions().mouseMove(object.get(0)).perform(); - browser.actions().click(protractor.Button.RIGHT).perform(); - browser.sleep(1000) - var remove = element.all(by.css('.ng-binding')).filter(function (ele){ - return ele.getText().then(function (text) { - return text == "r\nRestart at 0"; - }) - }).click(); - browser.sleep(1000) - }; - //click '<', true==yes false==no - RightMenu.prototype.select = function(name, flag){ - if(typeof flag == "undefined"){ - flag = true; - } - if(flag == true){ - carrotMyItem(); - } - browser.sleep(1000) - return element.all(by.repeater('child in composition')).filter(function (ele){ - return ele.getText().then(function(text) { - return text === name; - }); - }); - - }; - RightMenu.prototype.dragDrop = function(name){ - var object = element.all(by.repeater('child in composition')).filter(function (ele){ - return ele.getText().then(function(text) { - return text === name; - }); - }); - var folder = object.get(0); - var panel = element(by.css('.items-holder.grid.abs.ng-scope')); - - browser.actions().dragAndDrop(folder, panel).perform(); - }; - return RightMenu; - -})(); -module.exports = RightMenu; diff --git a/protractor/common/drag.js b/protractor/common/drag.js deleted file mode 100644 index b8170e3057..0000000000 --- a/protractor/common/drag.js +++ /dev/null @@ -1,70 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -//drag function -/* -var e = document.createEvent("Event"); -e.initEvent('dragstart',true,false); -_element.dispatchEvent(e); -*/ -// qux.js -var Drag = (function () { - - function Drag() {}; - Drag.prototype.DragDrop = function(elem, zone){ - createEvent = function(type) { - var event = document.createEvent("event"); - event.initEvent(type, true, false); - event.dataTransfer = { - data: { - }, - setData: function(type, val){ - event.dataTransfer.data[type] = val; - }, - getData: function(type){ - return event.dataTransfer.data[type]; - } - }; - return event; - } - var event = createEvent('dragstart'); - event.effectAllowed = "copyMove"; - elem.dispatchEvent(event); - - var ele = createEvent('dragover'); - ele.preventDefault(); - zone.dispatchEvent(ele); - - var dropEvent = createEvent('drop', {}); - dropEvent.dataTransfer = event.dataTransfer; - dropEvent.preventDefault(); - zone.dispatchEvent(dropEvent); - - var dragEndEvent = createEvent('dragend', {}); - dragEndEvent.dataTransfer = event.dataTransfer; - elem.dispatchEvent(dragEndEvent); - }; - return Drag; -})(); -module.exports = Drag; - - - diff --git a/protractor/conf.js b/protractor/conf.js deleted file mode 100644 index ab3ed054dc..0000000000 --- a/protractor/conf.js +++ /dev/null @@ -1,67 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -/*global exports,process*/ - -// conf.js -exports.config = { - allScriptsTimeout: 500000, - jasmineNodeOpts: {defaultTimeoutInterval: 360000}, - seleniumAddress: 'http://localhost:4444/wd/hub', - //specs: ['StressTestCarrot.js'], - specs: [ - // 'create/CreateActivity.js', - // 'delete/DeleteActivity.js', - // 'create/CreateActivityMode.js', - // 'delete/DeleteActivityMode.js', - // 'create/CreateClock.js', - // 'delete/DeleteClock.js', - 'create/CreateDisplay.js', - 'delete/DeleteDisplay.js', - 'create/CreateFolder.js', - 'delete/DeleteFolder.js', - // 'create/CreateTelemetry.js', - // 'delete/DeleteTelemetry.js', - // 'create/CreateTimeline.js', - // 'delete/DeleteTimeline.js', - // 'create/CreateTimer.js', - // 'delete/DeleteTimer.js', - 'create/CreateWebPage.js', - 'delete/DeleteWebPage.js', - 'UI/Fullscreen.js', - 'create/CreateButton.js', - //"UI/DragDrop.js", - "UI/NewWindow.js" - //'UI/InfoBubble.js', - //'UI/RightClick.js' - ], - capabilities: { - 'browserName': 'chrome', // or 'safari' - 'chromeOptions': {} - } -}; - -// Allow specifying binary location as an environment variable, -// for cases where Chrome is not installed in a usual location. -if (process.env.CHROME_BIN) { - exports.config.capabilities.chromeOptions.binary = - process.env.CHROME_BIN; -} diff --git a/protractor/create/CreateActivity.js b/protractor/create/CreateActivity.js deleted file mode 100644 index fc1880e52e..0000000000 --- a/protractor/create/CreateActivity.js +++ /dev/null @@ -1,57 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); - -describe('Create Activity', function() { - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var ITEM_NAME = "Activity"; - var ITEM_TYPE = "activity"; - var ITEM_MENU_GLYPH = 'a\nActivity'; - var ITEM_GRID_SELECT = 'P\na\nActivity\n0 Items'; - beforeEach(require('../common/Launch')); - it('should Create new Activity', function(){ - //button.click() - browser.wait(function() { - createClass.createButton().click(); - return true; - }).then(function (){ - var folder = createClass.selectNewItem(ITEM_TYPE) - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(1000); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - var ok = createClass.fillFolderForum(ITEM_NAME, ITEM_TYPE).click(); - browser.sleep(1000); - //ok.click(); - }).then(function (){ - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - }); - - }); - -}); diff --git a/protractor/create/CreateActivityMode.js b/protractor/create/CreateActivityMode.js deleted file mode 100644 index 76b600837d..0000000000 --- a/protractor/create/CreateActivityMode.js +++ /dev/null @@ -1,58 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); - -describe('Create Activity Mode', function() { - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var ITEM_NAME = "Activity Mode"; - var ITEM_TYPE = "activity-mode"; - var ITEM_MENU_GLYPH = 'A\nActivity Mode'; - var ITEM_GRID_SELECT = 'P\nA\nActivity Mode'; - beforeEach(require('../common/Launch')); - it('should Create new Activity Mode', function(){ - //button.click() - browser.wait(function() { - createClass.createButton().click(); - return true; - }).then(function (){ - var folder = createClass.selectNewItem(ITEM_TYPE) - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(1000); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - createClass.fillFolderForum(ITEM_NAME,ITEM_TYPE).click(); - browser.sleep(1000); - - }).then(function (){ - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - browser.sleep(1000); - }); - - }); - -}); diff --git a/protractor/create/CreateButton.js b/protractor/create/CreateButton.js deleted file mode 100644 index 1c5afcdc34..0000000000 --- a/protractor/create/CreateButton.js +++ /dev/null @@ -1,40 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -//TODO Add filter for duplications/ -describe('Create Button', function() { - beforeEach(require('../common/Launch')); - //it('should hava title "My Items"', function(){ - // expect(browser.getTitle()).toEqual('My Items'); - //}); - it('should find create menu to be invisible', function(){ - expect(element(by.css('[ng-show="createController.isActive()"]')).isDisplayed()).toBeFalsy(); - }); - it('should find create menu only visable after the create button clicked', function(){ - element(by.css('[ng-click="createController.toggle()"]')).click(); - expect(element(by.css('[ng-show="createController.isActive()"]')).isDisplayed()).toBeTruthy(); - }); - it('should find create menu only visable after the create button clicked', function(){ - element(by.css('[ng-click="createController.toggle()"]')).click(); - expect(element(by.css('[ng-show="createController.isActive()"]')).isDisplayed()).toBeTruthy(); - }); - -}); diff --git a/protractor/create/CreateClock.js b/protractor/create/CreateClock.js deleted file mode 100644 index 02dc81bb88..0000000000 --- a/protractor/create/CreateClock.js +++ /dev/null @@ -1,109 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); -var rightClick = require("../common/RightMenu"); -describe('Create Clock', function() { - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var rightClickClass = new rightClick(); - - var ITEM_NAME = "Clock"; - var ITEM_TYPE = "clock"; - var ITEM_MENU_GLYPH = 'C\nClock'; - var ITEM_GRID_SELECT = 'P\nC\nClock'; - beforeEach(require('../common/Launch')); - it('should Create new Clock', function(){ - //button.click() - browser.wait(function() { - createClass.createButton().click(); - return true; - }).then(function (){ - var folder = createClass.selectNewItem(ITEM_TYPE) - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(1000); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - createClass.fillFolderForum(ITEM_NAME,ITEM_TYPE).click(); - browser.sleep(1000); - }).then(function (){ - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - browser.sleep(1000); - }); - - }); - it('should check clock', function () { - - function getTime(flag) { - function addZero(time){ - if(time < 10){ - return '0' + time; - } - return time; - } - var currentdate = new Date(); - - var month = currentdate.getMonth() + 1; - month = addZero(month); - - var day = currentdate.getDate(); - day = addZero(day); - - var hour = currentdate.getHours() - 5; - hour = addZero(hour); - - var second = currentdate.getSeconds(); - if(flag == true) { - second = second + 1; - } - second = addZero(second); - - var minute = currentdate.getMinutes(); - minute = addZero(minute); - - return ("UTC " + currentdate.getFullYear() + "/" + (month) + "/" + - day + " " + (hour) + ":" + minute + ":" + second + " PM"); - } - this.addMatchers({ - toBeIn: function(expected){ - var posibilities = Array.isArray(this.actual) ? this.actual : [this.actual]; - return posibilities.indexOf(expected) > -1; - } - }) - rightClickClass.select(ITEM_MENU_GLYPH, true).click().then(function () { - browser.sleep(1000); - browser.executeScript(getTime, false).then(function(current){ - browser.executeScript(getTime, true).then(function(current1) { - var clock = element(by.css('.l-time-display.l-digital.l-clock.s-clock.ng-scope')); - clock.getText().then(function (ele) { - expect([current,current1]).toBeIn(ele); - }) - }); - }); - - }) - }); -}); diff --git a/protractor/create/CreateDisplay.js b/protractor/create/CreateDisplay.js deleted file mode 100644 index 716e0c3ebd..0000000000 --- a/protractor/create/CreateDisplay.js +++ /dev/null @@ -1,58 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); - -describe('Create Display', function() { - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var ITEM_NAME = "Display"; - var ITEM_TYPE = "display"; - var ITEM_MENU_GLYPH = 'L\nDisplay Layout'; - var ITEM_GRID_SELECT = 'P\nL\nDisplay\n0 Items'; - - beforeEach(require('../common/Launch')); - it('should Create new Display', function(){ - //button.click() - browser.wait(function() { - createClass.createButton().click(); - return true; - }).then(function (){ - var folder = createClass.selectNewItem(ITEM_TYPE) - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(1000); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - createClass.fillFolderForum(ITEM_NAME,ITEM_TYPE).click(); - browser.sleep(1000); - }).then(function (){ - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - browser.sleep(1000); - }); - - }); - -}); diff --git a/protractor/create/CreateFolder.js b/protractor/create/CreateFolder.js deleted file mode 100644 index d1731791b9..0000000000 --- a/protractor/create/CreateFolder.js +++ /dev/null @@ -1,59 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -//TODO Add filter for duplications/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); - -describe('Create Folder', function() { - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var ITEM_NAME = "Folder"; - var ITEM_TYPE = "folder"; - var ITEM_MENU_GLYPH = 'F\nFolder'; - var ITEM_GRID_SELECT = 'P\nF\nFolder\n0 Items'; - - beforeEach(require('../common/Launch')); - it('should Create new Folder', function(){ - - browser.wait(function() { - createClass.createButton().click(); - return true; - }).then(function (){ - var folder = createClass.selectNewItem(ITEM_TYPE); - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(1000); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - createClass.fillFolderForum(ITEM_NAME, ITEM_TYPE).click(); - browser.sleep(1000); - }).then(function (){ - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - browser.sleep(1000); - }); - - }); - -}); diff --git a/protractor/create/CreateSineWave.js b/protractor/create/CreateSineWave.js deleted file mode 100644 index 396e3c70b5..0000000000 --- a/protractor/create/CreateSineWave.js +++ /dev/null @@ -1,59 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); - -describe('Create Sine Wave Generator', function() { - var createClass = new itemCreate(); - var ITEM_NAME = "Sine Wave G"; - var ITEM_TYPE = "sinewave"; - var ITEM_MENU_GLYPH = 'T\nSine Wave Generator' - beforeEach(require('../common/Launch')); - it('should Create new Sin Wave Generator' , function(){ - //button.click() - browser.wait(function() { - createClass.createButton().click(); - return true; - }).then(function (){ - var folder = createClass.selectNewItem(ITEM_TYPE) - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(1000); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - var ok = createClass.fillFolderForum(ITEM_NAME, ITEM_TYPE); - browser.sleep(1000); - ok.click(); - }).then(function (){ - var checkfolder = element.all(by.css('.title.ng-binding')).filter(function (ele) { - return ele.getTagName('div').then(function (tag){ - return tag == 'div'; - }); - }) - expect(checkfolder.getText()).toEqual([ '', 'Sine Wave G' ]); - - }); - - }); - -}); diff --git a/protractor/create/CreateTelemetry.js b/protractor/create/CreateTelemetry.js deleted file mode 100644 index 1e12c3f266..0000000000 --- a/protractor/create/CreateTelemetry.js +++ /dev/null @@ -1,59 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); - -describe('Create Telemetry', function() { - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var ITEM_NAME = "Telemetry"; - var ITEM_TYPE = "telemetry"; - var ITEM_MENU_GLYPH = 't\nTelemetry Panel' - var ITEM_GRID_SELECT = 'P\nt\nTelemetry\n0 Items'; - - beforeEach(require('../common/Launch')); - - it('should Create new Telemetry', function(){ - //button.click() - browser.wait(function() { - createClass.createButton().click(); - return true; - }).then(function (){ - var folder = createClass.selectNewItem(ITEM_TYPE) - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(1000); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - createClass.fillFolderForum(ITEM_NAME, ITEM_TYPE).click(); - browser.sleep(1000); - }).then(function (){ - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - browser.sleep(1000); - }); - - }); - -}); diff --git a/protractor/create/CreateTimeline.js b/protractor/create/CreateTimeline.js deleted file mode 100644 index 2f193fde3f..0000000000 --- a/protractor/create/CreateTimeline.js +++ /dev/null @@ -1,81 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); - -describe('Create Timeline', function() { - var createItemClass = new itemCreate(); - var editItemClass = new itemEdit(); - var ITEM_NAME = "Timeline"; - var ITEM_TYPE = "timeline"; - var ITEM_MENU_GLYPH = 'S\nTimeline'; - var ITEM_GRID_SELECT = 'P\nS\nTimeline\n0 Items'; - beforeEach(require('../common/Launch')); - it('should Create Timeline', function(){ - //button.click() - browser.wait(function() { - createItemClass.createButton().click(); - return true; - }).then(function (){ - var folder = createItemClass.selectNewItem(ITEM_TYPE) - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - createItemClass.fillFolderForum(ITEM_NAME, ITEM_TYPE).click(); - browser.sleep(1000); - }).then(function (){ - var fo= element.all(by.css('.item.grid-item.ng-scope')).filter(function (arg){ - return arg.getText().then(function (text) { - expect(text).toEqual("fh"); - return text == ITEM_GRID_SELECT; - }); - }); - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - - }); - }); - it('should Create Timeline Activity', function(){ - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - item.click(); - browser.sleep(1000); - expect(browser.getTitle()).toEqual(ITEM_NAME); - browser.sleep(1000); - var edit = editItemClass.EditButton(); - expect(edit.count()).toBe(1); - edit.click(); - browser.sleep(1000); - editItemClass.CreateActivity(); - var ok = createItemClass.fillFolderForum("Activity", "activity"); - browser.sleep(1000); - ok.click(); - browser.sleep(1000); - editItemClass.saveButton(); - //save.click(); - browser.sleep(5000); - }); - -}); diff --git a/protractor/create/CreateTimer.js b/protractor/create/CreateTimer.js deleted file mode 100644 index 666c820907..0000000000 --- a/protractor/create/CreateTimer.js +++ /dev/null @@ -1,74 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); -var rightClick = require("../common/RightMenu"); - -describe('Create Timer', function() { - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var rightMenu = new rightClick(); - - var ITEM_NAME = "Timer"; - var ITEM_TYPE = "timer"; - var ITEM_MENU_GLYPH = 'õ\nTimer'; - var ITEM_GRID_SELECT = 'P\nõ\nTimer'; - - beforeEach(require('../common/Launch')); - - it('should Create Timer', function(){ - //button.click() - browser.wait(function() { - createClass.createButton().click(); - return true; - }).then(function (){ - var folder = createClass.selectNewItem(ITEM_TYPE) - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(1000); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - createClass.fillFolderForum(ITEM_NAME, ITEM_TYPE).click(); - browser.sleep(1500); - }).then(function (){ - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - browser.sleep(1000); - }); - }); - it('should test Timer', function(){ - browser.sleep(2000) - rightMenu.reset(ITEM_MENU_GLYPH); - browser.sleep(1000) - var timer = element(by.css('.value.ng-binding.active')) - timer.getText().then(function (time) { - var timerChecker = false; - if(time == "0D 00:00:01" || time == "0D 00:00:02"){ - timerChecker = true; - } - expect(timerChecker).toEqual(true) - }) - }); - -}); diff --git a/protractor/create/CreateWebPage.js b/protractor/create/CreateWebPage.js deleted file mode 100644 index b7ac7dbd6e..0000000000 --- a/protractor/create/CreateWebPage.js +++ /dev/null @@ -1,59 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); - -describe('Create Web Page', function() { - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var ITEM_NAME = "Webpage"; - var ITEM_TYPE = "webpage"; - var ITEM_MENU_GLYPH = 'ê\nWeb Page'; - var ITEM_GRID_SELECT = 'P\nê\nWebpage'; - - beforeEach(require('../common/Launch')); - - it('should Create new Web Page', function(){ - //button.click() - browser.wait(function() { - createClass.createButton().click(); - return true; - }).then(function (){ - var folder = createClass.selectNewItem('webpage') - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(1000); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - createClass.fillFolderForum(ITEM_NAME,ITEM_TYPE).click(); - browser.sleep(1000); - }).then(function (){ - var item = editItemClass.SelectItem(ITEM_GRID_SELECT); - expect(item.count()).toBe(1); - browser.sleep(1000); - }); - - }); - -}); diff --git a/protractor/ctrl.sh b/protractor/ctrl.sh deleted file mode 100755 index 04d6ebcc45..0000000000 --- a/protractor/ctrl.sh +++ /dev/null @@ -1,60 +0,0 @@ -#! /bin/bash -ARGUMENT=$1; -DIRECTORY=/Users/jsanderf/Applications; - -if [ $# != 1 ]; then - echo "Expected 1 Aurgument. Received " $# 1>&2; - exit 1 -fi -#Start webdrive and http-server -if [ $ARGUMENT == start ]; then - echo - echo "Starting MMAP ..." - $DIRECTORY/MAMP/ctlscript.sh start > logs/MAMP.log 2>&1 & - wait $! - if [ $? != 0 ]; then - echo " Error: MMAP" - echo " Check Log file" - echo - else - echo " Started: MMAP" - echo - fi - echo "Starting webdriver ..." - webdriver-manager start > logs/webdriver.log 2>&1 & - sleep 3; - if grep -iq "Exception" logs/webdriver.log; then - echo " Error: webdriver-manager" - echo " Check Log file" - echo - else - echo " Started: webdriver-manager" - fi - echo "Starting Elastic Search..." - elasticsearch > logs/elasticSearch.log 2>&1 & - sleep 3; - if grep -iq "Exception" logs/elasticSearch.log; then - echo " Error: ElasticSearch" - echo " Check Log file" - echo - else - echo " Started: ElasticSearch" - fi -#Runs Protractor tests -elif [ $ARGUMENT == run ]; then - protractor ./conf.js -#Kill Process -elif [ $ARGUMENT == stop ]; then - echo "Stopping MAMP" - $DIRECTORY/MAMP/ctlscript.sh stop >> logs/MAMP.log 2>&1 & - sleep 1; - echo "Stopping webdriver ..." - kill $(ps aux | grep "[p]rotractor" | awk '{print $2}'); - kill $(ps aux | grep "[w]ebdriver-manager" | awk '{print $2}'); - sleep 1; - echo "Stopping Elastic..." - kill $(ps aux | grep "[e]lastic" | awk '{print $2}'); - sleep 1; -else - echo "Unkown: Command" $1; -fi diff --git a/protractor/delete/DeleteActivity.js b/protractor/delete/DeleteActivity.js deleted file mode 100644 index a9e9d48333..0000000000 --- a/protractor/delete/DeleteActivity.js +++ /dev/null @@ -1,38 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var right_click = require("../common/RightMenu.js"); -var Create = require("../common/CreateItem") -describe('Delete Activity', function() { - var clickClass = new right_click(); - var createClass = new Create(); - var ITEM_NAME = "Activity"; - var ITEM_TYPE = "activity"; - var ITEM_MENU_GLYPH = 'a\nActivity'; - //var ITEM_GRID_SELECT = 'P\nS\nTimeline\n0 Items'; - var ITEM_SIDE_SELECT = ">\na\nActivity" - beforeEach(require('../common/Launch')); - it('should delete the Activity', function(){ - clickClass.delete(ITEM_SIDE_SELECT); - browser.sleep(1000); - }); - -}); diff --git a/protractor/delete/DeleteActivityMode.js b/protractor/delete/DeleteActivityMode.js deleted file mode 100644 index 8568b1ac51..0000000000 --- a/protractor/delete/DeleteActivityMode.js +++ /dev/null @@ -1,38 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var right_click = require("../common/RightMenu.js"); -var Create = require("../common/CreateItem") -describe('Delete Activity Mode', function() { - var clickClass = new right_click(); - var createClass = new Create(); - var ITEM_NAME = "Activity Mode"; - var ITEM_TYPE = "activity-mode"; - var ITEM_MENU_GLYPH = 'A\nActivity Mode'; - var ITEM_GRID_SELECT = 'P\nA\nActivity Mode'; - var ITEM_SIDE_SELECT = "A\nActivity Mode" - beforeEach(require('../common/Launch')); - it('should delete the Activty Mode', function(){ - clickClass.delete(ITEM_SIDE_SELECT); - browser.sleep(1000); - }); - -}); diff --git a/protractor/delete/DeleteClock.js b/protractor/delete/DeleteClock.js deleted file mode 100644 index 600619db09..0000000000 --- a/protractor/delete/DeleteClock.js +++ /dev/null @@ -1,38 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var right_click = require("../common/RightMenu.js"); -var Create = require("../common/CreateItem") -describe('Delete Clock', function() { - var clickClass = new right_click(); - var createClass = new Create(); - var ITEM_NAME = "Clock"; - var ITEM_TYPE = "clock"; - var ITEM_MENU_GLYPH = 'C\nClock'; - var ITEM_GRID_SELECT = 'P\nC\nClock'; - var ITEM_SIDE_SELECT = "C\nClock"; - beforeEach(require('../common/Launch')); - it('should delete the Clock', function(){ - clickClass.delete(ITEM_SIDE_SELECT); - browser.sleep(1000); - }); - -}); diff --git a/protractor/delete/DeleteDisplay.js b/protractor/delete/DeleteDisplay.js deleted file mode 100644 index d33a1d1c94..0000000000 --- a/protractor/delete/DeleteDisplay.js +++ /dev/null @@ -1,38 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var right_click = require("../common/RightMenu.js"); -var Create = require("../common/CreateItem") -describe('Delete Display', function() { - var clickClass = new right_click(); - var createClass = new Create(); - var ITEM_NAME = "Display"; - var ITEM_TYPE = "display"; - var ITEM_MENU_GLYPH = 'L\nDisplay Layout'; - var ITEM_GRID_SELECT = 'P\nL\nDisplay Layout'; - var ITEM_SIDE_SELECT = ">\nL\nDisplay" - beforeEach(require('../common/Launch')); - it('should delete the Dispay', function(){ - clickClass.delete(ITEM_SIDE_SELECT); - browser.sleep(1000); - }); - -}); diff --git a/protractor/delete/DeleteFolder.js b/protractor/delete/DeleteFolder.js deleted file mode 100644 index d38c9b9910..0000000000 --- a/protractor/delete/DeleteFolder.js +++ /dev/null @@ -1,38 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var right_click = require("../common/RightMenu.js"); -var Create = require("../common/CreateItem") -describe('Delete Folder', function() { - var clickClass = new right_click(); - var createClass = new Create(); - var ITEM_NAME = "Folder"; - var ITEM_TYPE = "folder"; - var ITEM_MENU_GLYPH = 'F\nFolder'; - var ITEM_GRID_SELECT = 'P\nF\nFolder\n0 Items'; - var ITEM_SIDE_SELECT = ">\nF\nFolder" - beforeEach(require('../common/Launch')); - it('should delete the folder', function(){ - clickClass.delete(ITEM_SIDE_SELECT); - browser.sleep(1000); - }); - -}); diff --git a/protractor/delete/DeleteTelemetry.js b/protractor/delete/DeleteTelemetry.js deleted file mode 100644 index 447473fa4c..0000000000 --- a/protractor/delete/DeleteTelemetry.js +++ /dev/null @@ -1,38 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var right_click = require("../common/RightMenu.js"); -var Create = require("../common/CreateItem") -describe('Delete Telemetry', function() { - var clickClass = new right_click(); - var createClass = new Create(); - var ITEM_NAME = "Telemetry"; - var ITEM_TYPE = "telemetry"; - var ITEM_MENU_GLYPH = 't\nTelemetry Panel' - var ITEM_GRID_SELECT = 'P\nt\nTelemetry\n0 Items'; - var ITEM_SIDE_SELECT = ">\nt\nTelemetry" - beforeEach(require('../common/Launch')); - it('should delete the Telemetry', function(){ - clickClass.delete(ITEM_SIDE_SELECT); - browser.sleep(1000); - }); - -}); diff --git a/protractor/delete/DeleteTimeline.js b/protractor/delete/DeleteTimeline.js deleted file mode 100644 index 9230700cd9..0000000000 --- a/protractor/delete/DeleteTimeline.js +++ /dev/null @@ -1,38 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var right_click = require("../common/RightMenu.js"); -var Create = require("../common/CreateItem") -describe('Delete Timeline', function() { - var clickClass = new right_click(); - var createClass = new Create(); - var ITEM_NAME = "Timeline"; - var ITEM_TYPE = "timeline"; - var ITEM_MENU_GLYPH = 'S\nTimeline'; - var ITEM_GRID_SELECT = 'P\nS\nTimeline\n0 Items'; - var ITEM_SIDE_SELECT = ">\nS\nTimeline" - beforeEach(require('../common/Launch')); - it('should delete the specified object', function(){ - clickClass.delete(ITEM_SIDE_SELECT); - browser.sleep(1000); - }); - -}); diff --git a/protractor/delete/DeleteTimer.js b/protractor/delete/DeleteTimer.js deleted file mode 100644 index a1f1985905..0000000000 --- a/protractor/delete/DeleteTimer.js +++ /dev/null @@ -1,38 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var right_click = require("../common/RightMenu.js"); -var Create = require("../common/CreateItem") -describe('Delete Timer', function() { - var clickClass = new right_click(); - var createClass = new Create(); - var ITEM_NAME = "Timer"; - var ITEM_TYPE = "timer"; - var ITEM_MENU_GLYPH = 'õ\nTimer'; - var ITEM_GRID_SELECT = 'P\nõ\nTimer'; - var ITEM_SIDE_SELECT = "õ\nTimer" - beforeEach(require('../common/Launch')); - it('should delete the Timer', function(){ - clickClass.delete(ITEM_SIDE_SELECT); - browser.sleep(1000); - }); - -}); diff --git a/protractor/delete/DeleteWebPage.js b/protractor/delete/DeleteWebPage.js deleted file mode 100644 index dc6fd34e22..0000000000 --- a/protractor/delete/DeleteWebPage.js +++ /dev/null @@ -1,37 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var right_click = require("../common/RightMenu.js"); -var Create = require("../common/CreateItem") -describe('Delete Webpage', function() { - var clickClass = new right_click(); - var createClass = new Create(); - var ITEM_NAME = "Webpage"; - var ITEM_TYPE = "webpage"; - var ITEM_MENU_GLYPH = 'ê\nWeb Page'; - var ITEM_SIDE_SELECT = "ê\nWebpage" - beforeEach(require('../common/Launch')); - it('should delete the Webpage', function(){ - clickClass.delete(ITEM_SIDE_SELECT); - browser.sleep(1000); - }); - -}); diff --git a/protractor/package.json b/protractor/package.json deleted file mode 100644 index b43b9b1cdb..0000000000 --- a/protractor/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "ProtractorLauncher", - "version": "1.0.0", - "scripts" : { - "start" : "bin/start.js", - "protractor" : "bin/run.js", - "stop" : "bin/stop.js", - "all" : "bin/start.js; bin/run.js; bin/stop.js;", - "clean" : "bin/clean.js" - }, - "dependencies": { - "protractor": "^2.1.0", - "psnode": "0.0.1", - "shelljs": "^0.5.2", - "sleep": "^3.0.0", - "string": "^3.3.1" - }, - "description": "E2e Protractor Tests.", - "license": "ISC" -} diff --git a/protractor/stressTest/StressTest.js b/protractor/stressTest/StressTest.js deleted file mode 100644 index f5f7bc25be..0000000000 --- a/protractor/stressTest/StressTest.js +++ /dev/null @@ -1,78 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); -var right_click = require("../common/RightMenu.js"); - -describe('Create Folder', function() { - var clickClass = new right_click(); - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var ITEM_NAME = "Folder"; - var ITEM_TYPE = "folder"; - var ITEM_MENU_GLYPH = 'F\nFolder'; - var ITEM_GRID_SELECT = 'P\nF\nFolder\n0 Items'; - var ITEM_SIDE_SELECT = ">\nF\nFolder" - - beforeEach(function() { - browser.ignoreSynchronization = true; - browser.get('http://localhost:1984/warp/'); - browser.sleep(2000); // 20 seconds - }); - it('should Create new Folder', function(){ - browser.sleep(5000); - for(var i=0; i < 25; i++){ - browser.wait(function() { - createClass.createButton().click(); - return true; - }).then(function (){ - var folder = createClass.selectNewItem(ITEM_TYPE); - expect(folder.getText()).toEqual([ ITEM_MENU_GLYPH ]); - browser.sleep(500); - folder.click() - }).then(function() { - browser.wait(function () { - return element.all(by.model('ngModel[field]')).isDisplayed(); - }) - createClass.fillFolderForum(ITEM_NAME, ITEM_TYPE).click(); - browser.sleep(500); - }).then(function (){ - browser.sleep(500); - clickClass.delete(ITEM_SIDE_SELECT, true); - //element.all(by.css('.ui-symbol.view-control.ng-binding.ng-scope')).click(); - - - var MyItem = ">\nF\nMy Items" - element.all(by.repeater('child in composition')).filter(function (ele){ - return ele.getText().then(function(text) { - //expect(text).toEqual(MyItem); - return text === MyItem; - }); - }).all(by.css('.ui-symbol.view-control.ng-binding.ng-scope')).click(); - // clickClass.delete(ITEM_SIDE_SELECT, false); - }); - } - browser.pause(); - - }); - -}); diff --git a/protractor/stressTest/StressTestBubble.js b/protractor/stressTest/StressTestBubble.js deleted file mode 100644 index de77c5be7e..0000000000 --- a/protractor/stressTest/StressTestBubble.js +++ /dev/null @@ -1,59 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/StressTestBubble.jsStressTestBubble.js -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); -var right_click = require("../common/RightMenu.js"); - -describe('Create Folder', function() { - var clickClass = new right_click(); - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var ITEM_NAME = "Folder"; - var ITEM_TYPE = "folder"; - var ITEM_MENU_GLYPH = 'F\nFolder'; - var ITEM_GRID_SELECT = 'P\nF\nFolder\n0 Items'; - var ITEM_SIDE_SELECT = ">\nF\nFolder" - - beforeEach(function() { - browser.ignoreSynchronization = true; - browser.get('http://localhost:1984/warp/'); - browser.sleep(2000); // 20 seconds - }); - it('should Create new Folder', function(){ - browser.sleep(10000); - for(var i=0; i < 1000; i++){ - var object = element.all(by.repeater('child in composition')).filter(function (ele){ - return ele.getText().then(function(text) { - return text === ">\nF\nMy Items"; - }); - }); - //browser.sleep(1000) - browser.actions().mouseMove(object.get(0)).perform(); - //browser.actions().click(protractor.Button.RIGHT).perform(); - - element.all(by.css('.items-holder.grid.abs.ng-scope')).click(); - } - browser.pause(); - - }); - -}); diff --git a/protractor/stressTest/StressTestCreateButton.js b/protractor/stressTest/StressTestCreateButton.js deleted file mode 100644 index 19699ba123..0000000000 --- a/protractor/stressTest/StressTestCreateButton.js +++ /dev/null @@ -1,56 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); -var right_click = require("../common/RightMenu.js"); - -describe('Create Folder', function() { - var clickClass = new right_click(); - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var ITEM_NAME = "Folder"; - var ITEM_TYPE = "folder"; - var ITEM_MENU_GLYPH = 'F\nFolder'; - var ITEM_GRID_SELECT = 'P\nF\nFolder\n0 Items'; - var ITEM_SIDE_SELECT = ">\nF\nFolder" - - beforeEach(function() { - browser.ignoreSynchronization = true; - browser.get('http://localhost:1984/warp/'); - browser.sleep(2000); // 20 seconds - }); - it('should Create new Folder', function(){ - browser.sleep(10000); - for(var i=0; i < 1000; i++){ - createClass.createButton().click(); - - //browser.sleep(1000) - //browser.actions().mouseMove(object.get(0)).perform(); - //browser.actions().click(protractor.Button.RIGHT).perform(); - - element.all(by.css('.items-holder.grid.abs.ng-scope')).click(); - } - browser.pause(); - - }); - -}); diff --git a/protractor/stressTest/StressTestMenu.js b/protractor/stressTest/StressTestMenu.js deleted file mode 100644 index 4475d592c9..0000000000 --- a/protractor/stressTest/StressTestMenu.js +++ /dev/null @@ -1,55 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); -var right_click = require("../common/RightMenu.js"); - -describe('Create Folder', function() { - var clickClass = new right_click(); - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var ITEM_NAME = "Folder"; - var ITEM_TYPE = "folder"; - var ITEM_MENU_GLYPH = 'F\nFolder'; - var ITEM_GRID_SELECT = 'P\nF\nFolder\n0 Items'; - var ITEM_SIDE_SELECT = ">\nF\nFolder" - - beforeEach(function() { - browser.ignoreSynchronization = true; - browser.get('http://localhost:1984/warp/'); - browser.sleep(2000); // 20 seconds - }); - it('should Create new Folder', function(){ - browser.sleep(10000); - for(var i=0; i < 1000; i++){ - browser.wait(function() { - createClass.createButton().click(); - return true; - }).then(function (){ - element.all(by.css('.items-holder.grid.abs.ng-scope')).click(); - }) - } - browser.pause(); - - }); - -}); diff --git a/protractor/stressTest/StressTestNewPage.js b/protractor/stressTest/StressTestNewPage.js deleted file mode 100644 index df8f305818..0000000000 --- a/protractor/stressTest/StressTestNewPage.js +++ /dev/null @@ -1,61 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); -var right_click = require("../common/RightMenu.js"); -var fullScreenFile = require("../common/FullScreen"); - -describe('Create Folder', function() { - var clickClass = new right_click(); - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var fullScreenClass = new fullScreenFile(); - - var ITEM_NAME = "Folder"; - var ITEM_TYPE = "folder"; - var ITEM_MENU_GLYPH = 'F\nFolder'; - var ITEM_GRID_SELECT = 'P\nF\nFolder\n0 Items'; - var ITEM_SIDE_SELECT = ">\nF\nFolder" - - beforeEach(function() { - browser.ignoreSynchronization = true; - browser.get('http://localhost:1984/warp/'); - browser.sleep(2000); // 20 seconds - }); - it('should Create new Folder', function(){ - browser.sleep(15000); - for(var i=0; i < 1000; i++){ - fullScreenClass.newWidnow().click(); - - browser.getAllWindowHandles().then(function (handles) { - //browser.driver.switchTo().window(handles[1]); - browser.sleep(1000); - browser.driver.close(); - browser.sleep(1000); - // browser.driver.switchTo().window(handles[0]); - }); - } - browser.pause(); - - }); - -}); diff --git a/protractor/stressTest/StressTestRightClick.js b/protractor/stressTest/StressTestRightClick.js deleted file mode 100644 index abd51a256b..0000000000 --- a/protractor/stressTest/StressTestRightClick.js +++ /dev/null @@ -1,59 +0,0 @@ -/***************************************************************************** - * Open MCT, Copyright (c) 2014-2016, United States Government - * as represented by the Administrator of the National Aeronautics and Space - * Administration. All rights reserved. - * - * Open MCT is licensed under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * http://www.apache.org/licenses/LICENSE-2.0. - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - * Open MCT includes source code licensed under additional open source - * licenses. See the Open Source Licenses file (LICENSES.md) included with - * this source code distribution or the Licensing information page available - * at runtime from the About dialog for additional information. - *****************************************************************************/ -var itemCreate = require("../common/CreateItem"); -var itemEdit = require("../common/EditItem"); -var right_click = require("../common/RightMenu.js"); - -describe('Create Folder', function() { - var clickClass = new right_click(); - var createClass = new itemCreate(); - var editItemClass = new itemEdit(); - var ITEM_NAME = "Folder"; - var ITEM_TYPE = "folder"; - var ITEM_MENU_GLYPH = 'F\nFolder'; - var ITEM_GRID_SELECT = 'P\nF\nFolder\n0 Items'; - var ITEM_SIDE_SELECT = ">\nF\nFolder" - - beforeEach(function() { - browser.ignoreSynchronization = true; - browser.get('http://localhost:1984/warp/'); - browser.sleep(2000); // 20 seconds - }); - it('should Create new Folder', function(){ - browser.sleep(8000); - for(var i=0; i < 1000; i++){ - var object = element.all(by.repeater('child in composition')).filter(function (ele){ - return ele.getText().then(function(text) { - return text === ">\nF\nMy Items"; - }); - }); - //browser.sleep(1000) - browser.actions().mouseMove(object.get(0)).perform(); - browser.actions().click(protractor.Button.RIGHT).perform(); - - element.all(by.css('.items-holder.grid.abs.ng-scope')).click(); - } - browser.pause(); - - }); - -}); From 39f2f94a535413c093d03e8178a693277859faa2 Mon Sep 17 00:00:00 2001 From: Derek Webb Date: Sat, 27 Aug 2016 21:00:37 -0400 Subject: [PATCH 08/28] Info bubbles now allow the user to copy text from them (issue #101) --- platform/commonUI/general/res/sass/helpers/_bubbles.scss | 3 --- 1 file changed, 3 deletions(-) diff --git a/platform/commonUI/general/res/sass/helpers/_bubbles.scss b/platform/commonUI/general/res/sass/helpers/_bubbles.scss index e4cc8a2797..16bc08f0b4 100644 --- a/platform/commonUI/general/res/sass/helpers/_bubbles.scss +++ b/platform/commonUI/general/res/sass/helpers/_bubbles.scss @@ -21,9 +21,6 @@ *****************************************************************************/ //************************************************* GENERAL -.bubble-container { - pointer-events: none; -} //************************************************* LAYOUT From 08eaa822fe5545250fc2622f6476e768674c436c Mon Sep 17 00:00:00 2001 From: Derek Webb Date: Sat, 27 Aug 2016 21:29:30 -0400 Subject: [PATCH 09/28] Removing use of bubble-container class (issue #101) --- platform/commonUI/inspect/src/InfoConstants.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/commonUI/inspect/src/InfoConstants.js b/platform/commonUI/inspect/src/InfoConstants.js index 3eb6df921d..959f475a94 100644 --- a/platform/commonUI/inspect/src/InfoConstants.js +++ b/platform/commonUI/inspect/src/InfoConstants.js @@ -29,8 +29,7 @@ define({ BUBBLE_TEMPLATE: "" + + "bubble-layout=\"{{bubbleLayout}}\">" + "" + "" + From 89f2e0943c0b1a4ca21aa364a732cc517c01f879 Mon Sep 17 00:00:00 2001 From: Dhrubomoy Das Gupta Date: Sun, 28 Aug 2016 02:02:18 -0400 Subject: [PATCH 10/28] [Documentation] Fixed typo "Framework.md" was showing a 404 error. Changed it to "framework.md", which is the actual file name. --- docs/src/architecture/platform.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/architecture/platform.md b/docs/src/architecture/platform.md index 1f5e087a11..5fdffb6cfc 100644 --- a/docs/src/architecture/platform.md +++ b/docs/src/architecture/platform.md @@ -1,6 +1,6 @@ # Overview -The Open MCT platform utilizes the [framework layer](Framework.md) +The Open MCT platform utilizes the [framework layer](framework.md) to provide an extensible baseline for applications which includes: * A common user interface (and user interface paradigm) for dealing with From 542dea69a1fc8f0626c6e5a98db7c2e0504f3deb Mon Sep 17 00:00:00 2001 From: Alex M Date: Sun, 28 Aug 2016 14:50:15 +0300 Subject: [PATCH 11/28] [Documentation] Fix added lines in tutorial --- docs/src/tutorials/index.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/src/tutorials/index.md b/docs/src/tutorials/index.md index 038f76cf5c..250f9bb888 100644 --- a/docs/src/tutorials/index.md +++ b/docs/src/tutorials/index.md @@ -2746,14 +2746,14 @@ with the platform): ```diff define([ 'legacyRegistry', - './src/ExampleTelemetryServerAdapter', - './src/ExampleTelemetryInitializer', - './src/ExampleTelemetryModelProvider' ++ './src/ExampleTelemetryServerAdapter', ++ './src/ExampleTelemetryInitializer', ++ './src/ExampleTelemetryModelProvider' ], function ( legacyRegistry, - ExampleTelemetryServerAdapter, - ExampleTelemetryInitializer, - ExampleTelemetryModelProvider ++ ExampleTelemetryServerAdapter, ++ ExampleTelemetryInitializer, ++ ExampleTelemetryModelProvider ) { legacyRegistry.register("tutorials/telemetry", { "name": "Example Telemetry Adapter", @@ -2764,7 +2764,7 @@ define([ "key": "example.spacecraft", "glyph": "o" }, - { ++ { + "name": "Subsystem", + "key": "example.subsystem", + "glyph": "o", From 5a819a96def2027bf457355298afb375b4df94da Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Mon, 22 Aug 2016 15:24:27 -0700 Subject: [PATCH 12/28] [Build] Add gulp-nsp dependency ...to begin integrating checks for vulnerabilities in dependencies, fixes #1130. --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index f825d33a71..77589c54ce 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "gulp-jscs": "^3.0.2", "gulp-jshint": "^2.0.0", "gulp-jshint-html-reporter": "^0.1.3", + "gulp-nsp": "^2.4.2", "gulp-rename": "^1.2.2", "gulp-replace-task": "^0.11.0", "gulp-requirejs-optimize": "^0.3.1", From 05e88e5dcf73a7afe7f5ad5aeea00946ef65405e Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Mon, 22 Aug 2016 15:32:08 -0700 Subject: [PATCH 13/28] [Build] Add NSP task ...to check dependencies for known vulnerabilities. --- gulpfile.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index ff994c6a2c..5bacb58ef9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -103,6 +103,11 @@ gulp.task('stylesheets', function () { .pipe(gulp.dest(__dirname)); }); +gulp.task('nsp', function (done) { + var nsp = require('gulp-nsp'); + nsp({package: __dirname + '/package.json'}, done); +}); + gulp.task('lint', function () { var nonspecs = paths.specs.map(function (glob) { return "!" + glob; From 64d8b5fcd1c9a07f49f9ea040d121df0c6e74947 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Mon, 22 Aug 2016 15:32:44 -0700 Subject: [PATCH 14/28] [Build] Incluse NSP in verify tasks --- gulpfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 5bacb58ef9..bf52224863 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -157,6 +157,6 @@ gulp.task('develop', ['serve', 'stylesheets', 'watch']); gulp.task('install', [ 'static', 'scripts' ]); -gulp.task('verify', [ 'lint', 'test', 'checkstyle' ]); +gulp.task('verify', [ 'lint', 'test', 'checkstyle', 'nsp' ]); gulp.task('build', [ 'verify', 'install' ]); From 6cbdaa442b4c8c4666cff9c61560a5fb05f0c83d Mon Sep 17 00:00:00 2001 From: Kevin Van Kessel Date: Sun, 28 Aug 2016 12:01:42 -0700 Subject: [PATCH 15/28] [Search] Repurposed checkAll test. #1117 Changed test to ensure checkAll and it's appropriate filter string are set whenever checkAll is changed. Removed redundant line checking for a filter string of 'NONE' as this is no longer a possibility. --- platform/search/test/controllers/SearchMenuControllerSpec.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform/search/test/controllers/SearchMenuControllerSpec.js b/platform/search/test/controllers/SearchMenuControllerSpec.js index be4443d4cf..611f0d5a08 100644 --- a/platform/search/test/controllers/SearchMenuControllerSpec.js +++ b/platform/search/test/controllers/SearchMenuControllerSpec.js @@ -76,13 +76,15 @@ define( expect(mockScope.ngModel.filtersString).not.toEqual(''); }); - it("changing checkAll status updates the filter string", function () { + it("changing checkAll status sets checkAll to true", function () { controller.checkAll(); + expect(mockScope.ngModel.checkAll).toEqual(true); expect(mockScope.ngModel.filtersString).toEqual(''); mockScope.ngModel.checkAll = false; controller.checkAll(); + expect(mockScope.ngModel.checkAll).toEqual(true); expect(mockScope.ngModel.filtersString).toEqual(''); }); @@ -117,7 +119,6 @@ define( controller.updateOptions(); - expect(mockScope.ngModel.filtersString).not.toEqual('NONE'); expect(mockScope.ngModel.filtersString).not.toEqual(''); }); }); From dd4e20cfb52df17d169c694ed804c33c99951a55 Mon Sep 17 00:00:00 2001 From: Dhrubomoy Das Gupta Date: Mon, 29 Aug 2016 11:30:36 -0400 Subject: [PATCH 16/28] [Documentation] Updated /architecture/index.md maintaing -> maintaining --- docs/src/architecture/index.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/src/architecture/index.md b/docs/src/architecture/index.md index a4586a3542..6f2fbcfcef 100644 --- a/docs/src/architecture/index.md +++ b/docs/src/architecture/index.md @@ -6,7 +6,7 @@ overall architecture of Open MCT. The target audience includes: * _Platform maintainers_: Individuals involved in developing, - extending, and maintaing capabilities of the platform. + extending, and maintaining capabilities of the platform. * _Integration developers_: Individuals tasked with integrated Open MCT into a larger system, who need to understand its inner workings sufficiently to complete this integration. @@ -63,7 +63,7 @@ These layers are: application-specific knowledge; at this layer, we have only established an abstraction by which different software components may communicate and/or interact. -* [_Platform_](platform.md): The platform layer defines the general look, +* [_Platform_](platform.md): The platform layer defines the general look, feel, and behavior of Open MCT. This includes user-facing components like Browse mode and Edit mode, as well as underlying elements of the information model and the general service infrastructure. @@ -74,5 +74,3 @@ These layers are: typically consists of a mix of custom plug-ins to Open MCT, as well as optional features (such as Plot view) included alongside the platform. - - From b8eeeaeede8158e000a61de0cbb688b023b6ae68 Mon Sep 17 00:00:00 2001 From: Dhrubomoy Das Gupta Date: Mon, 29 Aug 2016 11:41:38 -0400 Subject: [PATCH 17/28] [Documentation] Updated /architecture/platform.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changing following two words makes them a bit easier to read: look­and­feel -> look-­and-­feel userfacing -> user-facing --- docs/src/architecture/platform.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/architecture/platform.md b/docs/src/architecture/platform.md index 5fdffb6cfc..f7f0c48cda 100644 --- a/docs/src/architecture/platform.md +++ b/docs/src/architecture/platform.md @@ -38,7 +38,7 @@ in __any of these tiers__. are initiated from here and invoke behavior in the presentation layer. HTML  templates are written in Angular’s template syntax; see the [Angular documentation on templates](https://docs.angularjs.org/guide/templates)​.  These describe the page as actually seen by the user. Conceptually,  - stylesheets (controlling the look­and­feel of the rendered templates) belong  + stylesheets (controlling the look-and-feel of the rendered templates) belong  in this grouping as well.  * [_Presentation layer_](#presentation-layer): The presentation layer is responsible for updating (and providing information to update) @@ -48,7 +48,7 @@ in __any of these tiers__. display. * [_Information model_](#information-model): ​Provides a common (within Open MCT  Web) set of interfaces for dealing with “things” ­ domain objects ­ within the  - system. User­facing concerns in a Open MCT Web application are expressed as  + system. User-facing concerns in a Open MCT Web application are expressed as  domain objects; examples include folders (used to organize other domain  objects), layouts (used to build displays), or telemetry points (used as  handles for streams of remote measurements.) These domain objects expose a  From fe00d3e50141c5495e9dd7968bdb6aeef34c06cb Mon Sep 17 00:00:00 2001 From: Dhrubomoy Das Gupta Date: Mon, 29 Aug 2016 11:54:14 -0400 Subject: [PATCH 18/28] [Documentation] Updated APIRedesign.md Contributer -> Contributor effects -> affects (Effect is usually used as a noun. When an "s" is added, "effects" means personal belongings) --- docs/src/design/proposals/APIRedesign.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/design/proposals/APIRedesign.md b/docs/src/design/proposals/APIRedesign.md index d14f4ce469..e6230823ed 100644 --- a/docs/src/design/proposals/APIRedesign.md +++ b/docs/src/design/proposals/APIRedesign.md @@ -180,7 +180,7 @@ to develop a tabular visualization plugin. * Add a model property to the bundle.json to take in "Hello World" as a parameter and pass through to the controller/view -### Open Source Contributer +### Open Source Contributor * [Failures are non-graceful when services are missing.]( https://github.com/nasa/openmctweb/issues/79) @@ -214,7 +214,7 @@ to an entirely different framework. We can expect AngularJS 1.x to reach end-of-life reasonably soon thereafter. -Our API is currently a superset of Angular's API, so this directly effects +Our API is currently a superset of Angular's API, so this directly affects our API. Specifically, API changes should be oriented towards removing or reducing the Angular dependency. From cbb7ada63c44340fdf60118c482236e20c2607ca Mon Sep 17 00:00:00 2001 From: Dhrubomoy Das Gupta Date: Mon, 29 Aug 2016 12:01:11 -0400 Subject: [PATCH 19/28] [Documentation] Update APIRedesign_PeteRichards.md imperitive -> imperative set up -> setup compiliation -> compilation --- docs/src/design/proposals/APIRedesign_PeteRichards.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/src/design/proposals/APIRedesign_PeteRichards.md b/docs/src/design/proposals/APIRedesign_PeteRichards.md index 3fa78fe2ed..dce80c41ae 100644 --- a/docs/src/design/proposals/APIRedesign_PeteRichards.md +++ b/docs/src/design/proposals/APIRedesign_PeteRichards.md @@ -3,7 +3,7 @@ **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* - [Reducing interface depth (the bundle.json version)](#reducing-interface-depth-the-bundlejson-version) - - [Imperitive component registries](#imperitive-component-registries) + - [Imperitive component registries](#imperative-component-registries) - [Get rid of "extension category" concept.](#get-rid-of-extension-category-concept) - [Reduce number and depth of extension points](#reduce-number-and-depth-of-extension-points) - [Composite services should not be the default](#composite-services-should-not-be-the-default) @@ -30,11 +30,11 @@ # Reducing interface depth (the bundle.json version) -## Imperitive component registries +## Imperative component registries Transition component registries to javascript, get rid of bundle.json and bundles.json. Prescribe a method for application configuration, but allow flexibility in how application configuration is defined. -Register components in an imperitive fashion, see angularApp.factory, angularApp.controller, etc. Alternatively, implement our own application object with new registries and it's own form of registering objects. +Register components in an imperative fashion, see angularApp.factory, angularApp.controller, etc. Alternatively, implement our own application object with new registries and it's own form of registering objects. ## Get rid of "extension category" concept. @@ -126,9 +126,9 @@ Allow developers to use whatever module loading system they'd like to use, while ## Use gulp or grunt for standard tooling -Using gulp or grunt as a task runner would bring us in line with standard web developer workflows and help standardize rendering, deployment, and packaging. Additional tools can be added to the workflow at low cost, simplifying the set up of developer environments. +Using gulp or grunt as a task runner would bring us in line with standard web developer workflows and help standardize rendering, deployment, and packaging. Additional tools can be added to the workflow at low cost, simplifying the setup of developer environments. -Gulp and grunt provide useful developer tooling such as live reload, automatic scss/less/etc compiliation, and ease of extensibility for standard production build processes. They're key in decoupling code. +Gulp and grunt provide useful developer tooling such as live reload, automatic scss/less/etc compilation, and ease of extensibility for standard production build processes. They're key in decoupling code. ## Package openmctweb as single versioned file. From 6b8a2a7770081942a510ce45e5968d7c0646a9ea Mon Sep 17 00:00:00 2001 From: Dhrubomoy Das Gupta Date: Mon, 29 Aug 2016 12:12:59 -0400 Subject: [PATCH 20/28] [Documentation] Update /docs/src/guide/index.md work flow -> workflow (one word) domaiwn -> domain (typo) pop up -> popup (one word) --- docs/src/guide/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/src/guide/index.md b/docs/src/guide/index.md index 081f1df45a..308ca6d2c1 100644 --- a/docs/src/guide/index.md +++ b/docs/src/guide/index.md @@ -643,7 +643,7 @@ to be passed along by other services. ## Domain Objects Domain objects are the most fundamental component of Open MCT's information -model. A domain object is some distinct thing relevant to a user's work flow, +model. A domain object is some distinct thing relevant to a user's workflow, such as a telemetry channel, display, or similar. Open MCT is a tool for viewing, browsing, manipulating, and otherwise interacting with a graph of domain objects. @@ -981,7 +981,7 @@ Examples of gestures included in the platform are: composition. * `drop`: For representations that can be drop targets for drag-and-drop composition. -* `menu`: For representations that can be used to pop up a context menu. +* `menu`: For representations that can be used to popup a context menu. Gesture definitions have a property `key` which is used as a machine-readable identifier for the gesture (e.g. `drag`, `drop`, `menu` above.) @@ -1153,7 +1153,7 @@ For example, the _My Items_ folder is added as an extension of this category. Extensions of this category should have the following properties: -* `id`: The machine-readable identifier for the domaiwn object being exposed. +* `id`: The machine-readable identifier for the domain object being exposed. * `model`: The model, as a JSON object, for the domain object being exposed. ## Stylesheets Category From c3d158584bbaa995dbb043810f000526d711828e Mon Sep 17 00:00:00 2001 From: Dhrubomoy Das Gupta Date: Mon, 29 Aug 2016 12:23:21 -0400 Subject: [PATCH 21/28] [Documentation] Update ../process/testing/plan.md Clicking `Long-duration testing` was showing the right doc but wrong section due to typo in `procedures.md#long-duration-testng`. Fixed it, so now clicking `Long-duration testing` will take us to the right section. --- docs/src/process/testing/plan.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/process/testing/plan.md b/docs/src/process/testing/plan.md index 47ab60ee34..34e75855c9 100644 --- a/docs/src/process/testing/plan.md +++ b/docs/src/process/testing/plan.md @@ -102,7 +102,7 @@ perform: * A relevant subset of [_user testing_](procedures.md#user-test-procedures) identified by the acting [project manager](../cycle.md#roles). -* [_Long-duration testing_](procedures.md#long-duration-testng) +* [_Long-duration testing_](procedures.md#long-duration-testing) (specifically, for 24 hours.) Issues are reported as a product of both forms of testing. From 2e8d021a6ab22361cc028a6a9f16cb3b2666017b Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Tue, 9 Aug 2016 16:06:53 -0700 Subject: [PATCH 22/28] [Frontend] Improve layout of "locator" Fixes #1118 Locator in Save In, Move, etc. dialog now expands vertically to use as much vertical as possible; --- .../edit/src/creation/CreateWizard.js | 4 +- .../commonUI/general/res/sass/_inspector.scss | 2 +- .../general/res/sass/forms/_elems.scss | 28 ++++++--- .../src/actions/AbstractComposeAction.js | 2 +- .../entanglement/src/actions/CopyAction.js | 2 +- .../src/services/LocationService.js | 1 + platform/forms/res/templates/form.html | 62 +++++++++---------- 7 files changed, 59 insertions(+), 42 deletions(-) diff --git a/platform/commonUI/edit/src/creation/CreateWizard.js b/platform/commonUI/edit/src/creation/CreateWizard.js index 37ef530dbd..6921ca8669 100644 --- a/platform/commonUI/edit/src/creation/CreateWizard.js +++ b/platform/commonUI/edit/src/creation/CreateWizard.js @@ -90,7 +90,9 @@ define( // Ensure there is always a "save in" section if (includeLocation) { sections.push({ - name: 'Location', rows: [{ + name: 'Location', + cssclass: "grows", + rows: [{ name: "Save In", control: "locator", validate: validateLocation, diff --git a/platform/commonUI/general/res/sass/_inspector.scss b/platform/commonUI/general/res/sass/_inspector.scss index bb325dbe17..7d30c978af 100644 --- a/platform/commonUI/general/res/sass/_inspector.scss +++ b/platform/commonUI/general/res/sass/_inspector.scss @@ -71,7 +71,7 @@ .form { margin-bottom: $interiorMarginSm; padding-bottom: $interiorMarginLg; - .form-section { + .l-section-body { margin-bottom: 0; &:not(.first) { border-top: 1px solid $colorFormLines; diff --git a/platform/commonUI/general/res/sass/forms/_elems.scss b/platform/commonUI/general/res/sass/forms/_elems.scss index d8de2fc435..1e0cdefa13 100644 --- a/platform/commonUI/general/res/sass/forms/_elems.scss +++ b/platform/commonUI/general/res/sass/forms/_elems.scss @@ -25,11 +25,21 @@ .form { color: $colorFormText; + height: 100%; width: 100%; - .form-section { - position: relative; - margin-bottom: $interiorMarginLg * 2; - } + + .l-form-section { + position: relative; + &.grows { + .l-section-body, + .form-row { + @include flex(1 1 auto); + .wrapper { + height: 100%; + } + } + } + } .section-header { border-radius: $basicCr; @@ -43,10 +53,14 @@ .form-row { $m: $interiorMargin; box-sizing: border-box; - @include clearfix; border-top: 1px solid $colorFormLines; + margin-bottom: $interiorMarginLg * 2; padding: $formTBPad 0; position: relative; + //&ng-form { + // display: block; + //} + &.first { border-top: none; } @@ -92,9 +106,9 @@ .selector-list { // Used in create overlay to display tree view @include nice-input(); - $h: 150px; position: relative; - height: $h; + min-height: 150px; + height: 100%; >.wrapper { $p: $interiorMargin; overflow: auto; diff --git a/platform/entanglement/src/actions/AbstractComposeAction.js b/platform/entanglement/src/actions/AbstractComposeAction.js index 3b43d568d9..943c2adb0a 100644 --- a/platform/entanglement/src/actions/AbstractComposeAction.js +++ b/platform/entanglement/src/actions/AbstractComposeAction.js @@ -95,7 +95,7 @@ define( this.locationService = locationService; this.composeService = composeService; this.verb = verb || "Compose"; - this.suffix = suffix || "to a new location"; + this.suffix = suffix || "To a New Location"; } AbstractComposeAction.prototype.cloneContext = function () { diff --git a/platform/entanglement/src/actions/CopyAction.js b/platform/entanglement/src/actions/CopyAction.js index 805b5f48ba..6388c25b74 100644 --- a/platform/entanglement/src/actions/CopyAction.js +++ b/platform/entanglement/src/actions/CopyAction.js @@ -54,7 +54,7 @@ define( copyService, context, "Duplicate", - "to a location" + "To a Location" ); } diff --git a/platform/entanglement/src/services/LocationService.js b/platform/entanglement/src/services/LocationService.js index 4ecf5d982b..7cb92265f5 100644 --- a/platform/entanglement/src/services/LocationService.js +++ b/platform/entanglement/src/services/LocationService.js @@ -58,6 +58,7 @@ define( sections: [ { name: 'Location', + cssclass: "grows", rows: [ { name: label, diff --git a/platform/forms/res/templates/form.html b/platform/forms/res/templates/form.html index 4326aead68..376dc152d7 100644 --- a/platform/forms/res/templates/form.html +++ b/platform/forms/res/templates/form.html @@ -19,39 +19,39 @@ this source code distribution or the Licensing information page available at runtime from the About dialog for additional information. --> -
- -
+ + +
{{section.name}}
-
- -
-
- {{row.name}} -
-
-
- - -
-
+ +
+ {{row.name}} +
+
+
+ +
- -
+
+
\ No newline at end of file From b48ca991196d9442a8147dce9b1347c184169577 Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Tue, 9 Aug 2016 23:08:25 -0700 Subject: [PATCH 23/28] [Frontend] Sanding on larger locator control Fixes #1118 --- platform/commonUI/general/res/sass/forms/_elems.scss | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/platform/commonUI/general/res/sass/forms/_elems.scss b/platform/commonUI/general/res/sass/forms/_elems.scss index 1e0cdefa13..186dd2f84f 100644 --- a/platform/commonUI/general/res/sass/forms/_elems.scss +++ b/platform/commonUI/general/res/sass/forms/_elems.scss @@ -106,17 +106,14 @@ .selector-list { // Used in create overlay to display tree view @include nice-input(); + padding: $interiorMargin; position: relative; min-height: 150px; height: 100%; >.wrapper { $p: $interiorMargin; + box-sizing: border-box; overflow: auto; - position: absolute; - top: $p; - right: $p; - bottom: $p; - left: $p; } } } From 1a284ac9dcc413dbf257603fe0e9264092f2d5b0 Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Wed, 10 Aug 2016 10:10:25 -0700 Subject: [PATCH 24/28] [Frontend] Proper classes added to text input configs Fixes #1108 --- example/plotOptions/bundle.js | 2 +- platform/features/fixed/bundle.js | 5 +++-- platform/features/layout/bundle.js | 5 +++-- platform/features/layout/src/elements/ElementFactory.js | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/example/plotOptions/bundle.js b/example/plotOptions/bundle.js index 66a2e81937..ae47d2a97c 100644 --- a/example/plotOptions/bundle.js +++ b/example/plotOptions/bundle.js @@ -129,7 +129,7 @@ define([ { "name": "Period", "control": "textfield", - "cssclass": "l-small l-numeric", + "cssclass": "l-input-sm l-numeric", "key": "period", "required": true, "property": [ diff --git a/platform/features/fixed/bundle.js b/platform/features/fixed/bundle.js index 890df811a3..e2e40ff511 100644 --- a/platform/features/fixed/bundle.js +++ b/platform/features/fixed/bundle.js @@ -139,6 +139,7 @@ define([ "dialog": { "control": "textfield", "name": "Image URL", + "cssclass": "l-input-lg", "required": true } }, @@ -213,12 +214,12 @@ define([ { "name": "Horizontal grid (px)", "control": "textfield", - "cssclass": "l-small l-numeric" + "cssclass": "l-input-sm l-numeric" }, { "name": "Vertical grid (px)", "control": "textfield", - "cssclass": "l-small l-numeric" + "cssclass": "l-input-sm l-numeric" } ], "pattern": "^(\\d*[1-9]\\d*)?$", diff --git a/platform/features/layout/bundle.js b/platform/features/layout/bundle.js index 7e976f3da1..134b0f68a4 100644 --- a/platform/features/layout/bundle.js +++ b/platform/features/layout/bundle.js @@ -169,6 +169,7 @@ define([ "dialog": { "control": "textfield", "name": "Image URL", + "cssclass": "l-input-lg", "required": true } }, @@ -329,12 +330,12 @@ define([ { "name": "Horizontal grid (px)", "control": "textfield", - "cssclass": "l-small l-numeric" + "cssclass": "l-input-sm l-numeric" }, { "name": "Vertical grid (px)", "control": "textfield", - "cssclass": "l-small l-numeric" + "cssclass": "l-input-sm l-numeric" } ], "pattern": "^(\\d*[1-9]\\d*)?$", diff --git a/platform/features/layout/src/elements/ElementFactory.js b/platform/features/layout/src/elements/ElementFactory.js index 2e686de192..121f94176e 100644 --- a/platform/features/layout/src/elements/ElementFactory.js +++ b/platform/features/layout/src/elements/ElementFactory.js @@ -55,6 +55,7 @@ define( key: "url", control: "textfield", name: "Image URL", + "cssclass": "l-input-lg", required: true } ] From cc6b9d4099b2ac7d1bff828be76ce9eb1f2a3e79 Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Wed, 10 Aug 2016 16:43:14 -0700 Subject: [PATCH 25/28] [Frontend] Revised mobile styles for form layout Fixes #1118 --- .../res/sass/mobile/overlay/_overlay.scss | 41 ++++++++----------- 1 file changed, 17 insertions(+), 24 deletions(-) diff --git a/platform/commonUI/general/res/sass/mobile/overlay/_overlay.scss b/platform/commonUI/general/res/sass/mobile/overlay/_overlay.scss index a5459aa1d9..1feb4f1c9a 100644 --- a/platform/commonUI/general/res/sass/mobile/overlay/_overlay.scss +++ b/platform/commonUI/general/res/sass/mobile/overlay/_overlay.scss @@ -25,7 +25,6 @@ @include phone { .overlay > .holder { - //@include test(orange); // This works! $m: 0; border-radius: $m; top: $m; @@ -38,36 +37,30 @@ overflow: auto; @include transform(none); - .editor .form .form-row { - > .label, - > .controls { - //@include test(blue); - display: block; - float: none; - width: 100%; - } - > .label { - &:after { - float: none; + .editor .form .form-row.l-flex-row { + // Display elements in a columnar view + @include flex-direction(column); + > .flex-elem { + &:not(:first-child) { + margin-top: $interiorMargin; + } + &.label { + width: 100%; + } + &.controls { + overflow: auto; } } - } - - .contents { - .abs.top-bar, - .abs.editor, - .abs.message-body, - .abs.bottom-bar { - //@include test(orange); - top: auto; right: auto; bottom: auto; left: auto; - height: auto; width: auto; - margin-bottom: $interiorMarginLg * 2; + + &.validates > .label:before { position: relative; + right: auto; + line-height: inherit; + margin-right: $interiorMargin; } } } .t-dialog-sm .overlay > .holder { - //@include test(blue); height: auto; max-height: 100%; } } From 2c2d9c1bfed11cfa0a6569c7921461921e87c41d Mon Sep 17 00:00:00 2001 From: Charles Hacskaylo Date: Mon, 29 Aug 2016 14:26:27 -0700 Subject: [PATCH 26/28] [Frontend] Updated test specs Fixes #1118 --- platform/entanglement/test/actions/AbstractComposeActionSpec.js | 2 +- platform/entanglement/test/actions/CopyActionSpec.js | 2 +- platform/entanglement/test/actions/LinkActionSpec.js | 2 +- platform/entanglement/test/actions/MoveActionSpec.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/entanglement/test/actions/AbstractComposeActionSpec.js b/platform/entanglement/test/actions/AbstractComposeActionSpec.js index cc7e59bc09..80fde42748 100644 --- a/platform/entanglement/test/actions/AbstractComposeActionSpec.js +++ b/platform/entanglement/test/actions/AbstractComposeActionSpec.js @@ -150,7 +150,7 @@ define( it("prompts for location", function () { expect(locationService.getLocationFromUser) .toHaveBeenCalledWith( - "Compose selectedObject to a new location", + "Compose selectedObject To a New Location", "Compose To", jasmine.any(Function), currentParent diff --git a/platform/entanglement/test/actions/CopyActionSpec.js b/platform/entanglement/test/actions/CopyActionSpec.js index a626268440..380d5ebd18 100644 --- a/platform/entanglement/test/actions/CopyActionSpec.js +++ b/platform/entanglement/test/actions/CopyActionSpec.js @@ -173,7 +173,7 @@ define( it("prompts for location", function () { expect(locationService.getLocationFromUser) .toHaveBeenCalledWith( - "Duplicate selectedObject to a location", + "Duplicate selectedObject To a Location", "Duplicate To", jasmine.any(Function), currentParent diff --git a/platform/entanglement/test/actions/LinkActionSpec.js b/platform/entanglement/test/actions/LinkActionSpec.js index c04e14f2a4..f7930bf0dd 100644 --- a/platform/entanglement/test/actions/LinkActionSpec.js +++ b/platform/entanglement/test/actions/LinkActionSpec.js @@ -126,7 +126,7 @@ define( it("prompts for location", function () { expect(locationService.getLocationFromUser) .toHaveBeenCalledWith( - "Link selectedObject to a new location", + "Link selectedObject To a New Location", "Link To", jasmine.any(Function), currentParent diff --git a/platform/entanglement/test/actions/MoveActionSpec.js b/platform/entanglement/test/actions/MoveActionSpec.js index 7226ecb2ec..bc5398d599 100644 --- a/platform/entanglement/test/actions/MoveActionSpec.js +++ b/platform/entanglement/test/actions/MoveActionSpec.js @@ -126,7 +126,7 @@ define( it("prompts for location", function () { expect(locationService.getLocationFromUser) .toHaveBeenCalledWith( - "Move selectedObject to a new location", + "Move selectedObject To a New Location", "Move To", jasmine.any(Function), currentParent From fc7d2672db7f1a99b7824c1ff1aa3c49d725ba3c Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Tue, 30 Aug 2016 14:01:28 -0700 Subject: [PATCH 27/28] [Build] Remove SNAPSHOT status ...to close sprint Orwell, https://github.com/nasa/openmct/milestones/Orwell --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 77589c54ce..f63e661565 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openmct", - "version": "0.11.2-SNAPSHOT", + "version": "0.11.2", "description": "The Open MCT core platform", "dependencies": { "express": "^4.13.1", From 6364bbc6b320ecb4669cdae6046eb9db0f08d2ca Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Tue, 30 Aug 2016 14:10:48 -0700 Subject: [PATCH 28/28] [Build] Restore SNAPSHOT status ...to begin sprint Pratchett, https://github.com/nasa/openmct/milestones/Pratchett --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f63e661565..491904fe4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openmct", - "version": "0.11.2", + "version": "0.11.3-SNAPSHOT", "description": "The Open MCT core platform", "dependencies": { "express": "^4.13.1",