Merge branch 'master' into open933

This commit is contained in:
Henry 2016-09-06 16:43:17 -07:00
commit d37dd52ee1
93 changed files with 519 additions and 3174 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
*.gzip *.gzip
*.tgz *.tgz
*.DS_Store *.DS_Store
*.swp
# Compiled CSS, unless directly added # Compiled CSS, unless directly added
*.sass-cache *.sass-cache

View File

@ -36,6 +36,22 @@ Open MCT is now running, and can be accessed by pointing a web browser at [http:
Documentation is available on the [Open MCT website](https://nasa.github.io/openmct/documentation/). The documentation can also be built locally. Documentation is available on the [Open MCT website](https://nasa.github.io/openmct/documentation/). The documentation can also be built locally.
### Examples
The clearest examples for developing Open MCT plugins are in the
[tutorials](https://nasa.github.io/openmct/docs/tutorials/) provided in
our documentation.
For a practical example of a telemetry adapter, see David Hudson's
[Kerbal Space Program plugin](https://github.com/hudsonfoo/kerbal-openmct),
which allows [Kerbal Space Program](https://kerbalspaceprogram.com) players
to build and use displays for their own missions in Open MCT.
Additional examples are available in the `examples` hierarchy of this
repository; however, be aware that these examples are
[not fully-documented](https://github.com/nasa/openmct/issues/846), so
the tutorials will likely serve as a better starting point.
### Building the Open MCT Documentation Locally ### Building the Open MCT Documentation Locally
Open MCT's documentation is generated by an Open MCT's documentation is generated by an
[npm](https://www.npmjs.com/)-based build. It has additional dependencies that [npm](https://www.npmjs.com/)-based build. It has additional dependencies that

10
app.js
View File

@ -67,10 +67,14 @@
}); });
app.use('/proxyUrl', function proxyRequest(req, res, next) { app.use('/proxyUrl', function proxyRequest(req, res, next) {
console.log('Proxying request to: ', req.query.url); var targetUrl = req.query.url;
var queryParameters = req.query;
console.log('Proxying request to: ', targetUrl);
delete queryParameters['url'];
req.pipe(request({ req.pipe(request({
url: req.query.url, url: targetUrl,
strictSSL: false strictSSL: false,
qs: queryParameters
}).on('error', next)).pipe(res); }).on('error', next)).pipe(res);
}); });

View File

@ -45,8 +45,8 @@ npm run docs
echo "git clone $REPOSITORY_URL website" echo "git clone $REPOSITORY_URL website"
git clone $REPOSITORY_URL website || exit 1 git clone $REPOSITORY_URL website || exit 1
echo "cp -r $OUTPUT_DIRECTORY $WEBSITE_DIRECTORY/docs" echo "cp -r $OUTPUT_DIRECTORY $WEBSITE_DIRECTORY"
cp -r $OUTPUT_DIRECTORY $WEBSITE_DIRECTORY/docs cp -r $OUTPUT_DIRECTORY $WEBSITE_DIRECTORY
echo "cd $WEBSITE_DIRECTORY" echo "cd $WEBSITE_DIRECTORY"
cd $WEBSITE_DIRECTORY || exit 1 cd $WEBSITE_DIRECTORY || exit 1

View File

@ -6,7 +6,7 @@ overall architecture of Open MCT.
The target audience includes: The target audience includes:
* _Platform maintainers_: Individuals involved in developing, * _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 * _Integration developers_: Individuals tasked with integrated
Open MCT into a larger system, who need to understand Open MCT into a larger system, who need to understand
its inner workings sufficiently to complete this integration. its inner workings sufficiently to complete this integration.
@ -74,5 +74,3 @@ These layers are:
typically consists of a mix of custom plug-ins to Open MCT, typically consists of a mix of custom plug-ins to Open MCT,
as well as optional features (such as Plot view) included alongside as well as optional features (such as Plot view) included alongside
the platform. the platform.

View File

@ -1,6 +1,6 @@
# Overview # 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: to provide an extensible baseline for applications which includes:
* A common user interface (and user interface paradigm) for dealing with * A common user interface (and user interface paradigm) for dealing with
@ -38,7 +38,7 @@ in __any of these tiers__.
are initiated from here and invoke behavior in the presentation layer. HTML  are initiated from here and invoke behavior in the presentation layer. HTML 
templates are written in Angulars template syntax; see the [Angular documentation on templates](https://docs.angularjs.org/guide/templates).  templates are written in Angulars 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,  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.  in this grouping as well. 
* [_Presentation layer_](#presentation-layer): The presentation layer * [_Presentation layer_](#presentation-layer): The presentation layer
is responsible for updating (and providing information to update) is responsible for updating (and providing information to update)
@ -48,7 +48,7 @@ in __any of these tiers__.
display. display.
* [_Information model_](#information-model): Provides a common (within Open MCT  * [_Information model_](#information-model): Provides a common (within Open MCT 
Web) set of interfaces for dealing with “things” ­ domain objects ­ within the  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  domain objects; examples include folders (used to organize other domain 
objects), layouts (used to build displays), or telemetry points (used as  objects), layouts (used to build displays), or telemetry points (used as 
handles for streams of remote measurements.) These domain objects expose a  handles for streams of remote measurements.) These domain objects expose a 

View File

@ -180,7 +180,7 @@ to develop a tabular visualization plugin.
* Add a model property to the bundle.json to take in "Hello World" * Add a model property to the bundle.json to take in "Hello World"
as a parameter and pass through to the controller/view as a parameter and pass through to the controller/view
### Open Source Contributer ### Open Source Contributor
* [Failures are non-graceful when services are missing.]( * [Failures are non-graceful when services are missing.](
https://github.com/nasa/openmctweb/issues/79) 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. 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 our API. Specifically, API changes should be oriented towards removing
or reducing the Angular dependency. or reducing the Angular dependency.

View File

@ -3,7 +3,7 @@
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
- [Reducing interface depth (the bundle.json version)](#reducing-interface-depth-the-bundlejson-version) - [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) - [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) - [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) - [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) # 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. 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. ## 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 ## 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. ## Package openmctweb as single versioned file.

View File

@ -643,7 +643,7 @@ to be passed along by other services.
## Domain Objects ## Domain Objects
Domain objects are the most fundamental component of Open MCT's information 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 such as a telemetry channel, display, or similar. Open MCT is a tool for
viewing, browsing, manipulating, and otherwise interacting with a graph of viewing, browsing, manipulating, and otherwise interacting with a graph of
domain objects. domain objects.
@ -981,7 +981,7 @@ Examples of gestures included in the platform are:
composition. composition.
* `drop`: For representations that can be drop targets for drag-and-drop * `drop`: For representations that can be drop targets for drag-and-drop
composition. 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 Gesture definitions have a property `key` which is used as a machine-readable
identifier for the gesture (e.g. `drag`, `drop`, `menu` above.) 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: 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. * `model`: The model, as a JSON object, for the domain object being exposed.
## Stylesheets Category ## Stylesheets Category

View File

@ -102,7 +102,7 @@ perform:
* A relevant subset of [_user testing_](procedures.md#user-test-procedures) * A relevant subset of [_user testing_](procedures.md#user-test-procedures)
identified by the acting [project manager](../cycle.md#roles). 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.) (specifically, for 24 hours.)
Issues are reported as a product of both forms of testing. Issues are reported as a product of both forms of testing.

View File

@ -48,17 +48,17 @@ for a more general overview of how to run and deploy a Open MCT application.
First step is to check out Open MCT from the source repository. First step is to check out Open MCT from the source repository.
`git clone https://github.com/nasa/openmctweb.git openmctweb` `git clone https://github.com/nasa/openmct.git openmct`
This will create a copy of the Open MCT source code repository in the folder This will create a copy of the Open MCT source code repository in the folder
`openmctweb` (relative to the path from which you ran the command.) `openmct` (relative to the path from which you ran the command.)
If you have a repository URL, use that as the "path to repo" above. Alternately, If you have a repository URL, use that as the "path to repo" above. Alternately,
if you received Open MCT as a git bundle, the path to that bundle on the if you received Open MCT as a git bundle, the path to that bundle on the
local filesystem can be used instead. local filesystem can be used instead.
At this point, it will also be useful to branch off of Open MCT v0.6.2 At this point, it will also be useful to branch off of Open MCT v0.6.2
(which was used when writing these tutorials) to begin adding plugins. (which was used when writing these tutorials) to begin adding plugins.
cd openmctweb cd openmct
git branch <my branch name> open-v0.6.2 git branch <my branch name> open-v0.6.2
git checkout <my branch name> git checkout <my branch name>
@ -79,7 +79,7 @@ changes to stylesheets, or you are running the minified version of the app
The next step is to run a web server so that you can view the Open MCT The next step is to run a web server so that you can view the Open MCT
client (including the plugins you add to it) in browser. Any web server can client (including the plugins you add to it) in browser. Any web server can
be used for hosting OpenMCTWeb, and a trivial web server is provided in this be used for hosting Open MCT, and a trivial web server is provided in this
package for the purposes of running the tutorials. The provided web server package for the purposes of running the tutorials. The provided web server
should not be used in a production environment should not be used in a production environment
@ -91,7 +91,7 @@ To run the tutorial web server
Once running, you should be able to view Open MCT from your browser at Once running, you should be able to view Open MCT from your browser at
http://localhost:8080/ (assuming the web server is running on port 8080, http://localhost:8080/ (assuming the web server is running on port 8080,
and OpenMCTWeb is installed at the server's root path). and Open MCT is installed at the server's root path).
[Google Chrome](https://www.google.com/chrome/) is recommended for these [Google Chrome](https://www.google.com/chrome/) is recommended for these
tutorials, as Chrome is Open MCT's "test-to" browser. The browser cache tutorials, as Chrome is Open MCT's "test-to" browser. The browser cache
can sometimes interfere with development (masking changes by can sometimes interfere with development (masking changes by
@ -130,7 +130,6 @@ to this plugin as tutorials/todo as well.) We will start with an "empty bundle",
one which exposes no extensions - which looks like: one which exposes no extensions - which looks like:
```diff ```diff
define([ define([
'legacyRegistry' 'legacyRegistry'
], function ( ], function (
@ -144,7 +143,6 @@ define([
} }
}); });
}); });
``` ```
__tutorials/todo/bundle.js__ __tutorials/todo/bundle.js__
@ -348,6 +346,7 @@ deeper explanation of domain objects, see the Open MCT Developer Guide.)
In the case of our to-do list feature, the to-do list itself is the thing we'll In the case of our to-do list feature, the to-do list itself is the thing we'll
want users to be able to create and edit. So, we will add that as a new type in want users to be able to create and edit. So, we will add that as a new type in
our bundle definition: our bundle definition:
```diff ```diff
define([ define([
'legacyRegistry' 'legacyRegistry'
@ -370,7 +369,6 @@ define([
+ ]} + ]}
}); });
}); });
``` ```
__tutorials/todo/bundle.js__ __tutorials/todo/bundle.js__
@ -427,7 +425,6 @@ are stored by convention.)
</li> </li>
</ul> </ul>
``` ```
__tutorials/todo/res/templates/todo.html__ __tutorials/todo/res/templates/todo.html__
A summary of what's included: A summary of what's included:
@ -573,6 +570,7 @@ We will define that in an AMD module (see http://requirejs.org/docs/whyamd.html)
in the directory `tutorials/todo/src/controllers` (`src` is, by default, the in the directory `tutorials/todo/src/controllers` (`src` is, by default, the
directory where bundle-related source code is kept, and controllers is where directory where bundle-related source code is kept, and controllers is where
Angular controllers are stored by convention.) Angular controllers are stored by convention.)
```diff ```diff
define(function () { define(function () {
function TodoController($scope) { function TodoController($scope) {
@ -971,6 +969,7 @@ by the tool bar we've defined.
Additionally, we need to make changes to our template to select specific tasks Additionally, we need to make changes to our template to select specific tasks
in response to some user gesture. Here, we will select tasks when a user clicks in response to some user gesture. Here, we will select tasks when a user clicks
the description. the description.
```diff ```diff
<div ng-controller="TodoController"> <div ng-controller="TodoController">
<div> <div>
@ -996,6 +995,7 @@ __tutorials/todo/res/templates/todo.html__
Finally, the `TodoController` uses the `dialogService` now, so we need to Finally, the `TodoController` uses the `dialogService` now, so we need to
declare that dependency in its extension definition: declare that dependency in its extension definition:
```diff ```diff
define([ define([
'legacyRegistry', 'legacyRegistry',
@ -1248,7 +1248,6 @@ another file to the res directory of our bundle; this time, it is `css/todo.css`
font-style: italic; font-style: italic;
} }
``` ```
__tutorials/todo/res/css/todo.css__ __tutorials/todo/res/css/todo.css__
Here, we have defined classes and appearances for: Here, we have defined classes and appearances for:
@ -1261,6 +1260,7 @@ Here, we have defined classes and appearances for:
To include this CSS file in our running instance of Open MCT, we need to To include this CSS file in our running instance of Open MCT, we need to
declare it in our bundle definition, this time as an extension of category declare it in our bundle definition, this time as an extension of category
`stylesheets`: `stylesheets`:
```diff ```diff
define([ define([
'legacyRegistry', 'legacyRegistry',
@ -1430,7 +1430,6 @@ define([
}); });
}); });
``` ```
__tutorials/bargraph/bundle.js__ __tutorials/bargraph/bundle.js__
The view definition should look familiar after the To-Do List tutorial, with The view definition should look familiar after the To-Do List tutorial, with
@ -1499,6 +1498,7 @@ The third is for labels along the horizontal axis, which will indicate which
bar corresponds to which telemetry point. Inline `style` attributes are used bar corresponds to which telemetry point. Inline `style` attributes are used
wherever dynamic positioning (handled by a script) is anticipated. wherever dynamic positioning (handled by a script) is anticipated.
The corresponding CSS file which styles and positions these elements: The corresponding CSS file which styles and positions these elements:
```diff ```diff
.example-bargraph { .example-bargraph {
position: absolute; position: absolute;
@ -1596,6 +1596,7 @@ actual telemetry data in subsequent steps.)
Notably, we will not try to show telemetry data after this step. Notably, we will not try to show telemetry data after this step.
To support this, we will add a new controller which supports our Bar Graph view: To support this, we will add a new controller which supports our Bar Graph view:
```diff ```diff
define(function () { define(function () {
function BarGraphController($scope, telemetryHandler) { function BarGraphController($scope, telemetryHandler) {
@ -1647,6 +1648,7 @@ Whenever the telemetry handler invokes its callbacks, we update the set of
telemetry objects in view, as well as the width for each bar. telemetry objects in view, as well as the width for each bar.
We will also utilize this from our template: We will also utilize this from our template:
```diff ```diff
+ <div class="example-bargraph" ng-controller="BarGraphController"> + <div class="example-bargraph" ng-controller="BarGraphController">
<div class="example-tick-labels"> <div class="example-tick-labels">
@ -2346,6 +2348,7 @@ add a top-level object which will serve as a container; in the next step, we
will populate this with the contents of the telemetry dictionary (which we will populate this with the contents of the telemetry dictionary (which we
will retrieve from the server.) will retrieve from the server.)
```diff
define([ define([
'legacyRegistry' 'legacyRegistry'
], function ( ], function (
@ -2375,6 +2378,7 @@ define([
} }
}); });
}); });
```
__tutorials/telemetry/bundle.js__ __tutorials/telemetry/bundle.js__
Here, we've created our initial telemetry plugin. This exposes a new domain Here, we've created our initial telemetry plugin. This exposes a new domain
@ -2469,7 +2473,6 @@ define([
}; };
}); });
``` ```
__main.js__ __main.js__
...we will be able to reload Open MCT and see that it is present: ...we will be able to reload Open MCT and see that it is present:
@ -2486,9 +2489,10 @@ server. Our first step will be to add a service that will handle interactions
with the server; this will not be used by Open MCT directly, but will be with the server; this will not be used by Open MCT directly, but will be
used by subsequent components we add. used by subsequent components we add.
/*global define,WebSocket*/ ```diff
/*global define,WebSocket*/
define( define(
[], [],
function () { function () {
"use strict"; "use strict";
@ -2522,7 +2526,8 @@ used by subsequent components we add.
return ExampleTelemetryServerAdapter; return ExampleTelemetryServerAdapter;
} }
); );
```
__tutorials/telemetry/src/ExampleTelemetryServerAdapter.js__ __tutorials/telemetry/src/ExampleTelemetryServerAdapter.js__
When created, this service initiates a connection to the server, and begins When created, this service initiates a connection to the server, and begins
@ -2539,9 +2544,10 @@ subsystems. This means that we need to convert the data from the dictionary
into domain object models, and expose these to Open MCT via a into domain object models, and expose these to Open MCT via a
`modelService`. `modelService`.
/*global define*/ ```diff
/*global define*/
define( define(
function () { function () {
"use strict"; "use strict";
@ -2618,7 +2624,8 @@ into domain object models, and expose these to Open MCT via a
return ExampleTelemetryModelProvider; return ExampleTelemetryModelProvider;
} }
); );
```
__tutorials/telemetry/src/ExampleTelemetryModelProvider.js__ __tutorials/telemetry/src/ExampleTelemetryModelProvider.js__
This script implements a `provider` for `modelService`; the `modelService` is a This script implements a `provider` for `modelService`; the `modelService` is a
@ -2671,9 +2678,10 @@ This allows our telemetry dictionary to be expressed as domain object models
fix this, we will need another script which will add these subsystems to the fix this, we will need another script which will add these subsystems to the
root-level object we added in Step 1. root-level object we added in Step 1.
/*global define*/ ```diff
/*global define*/
define( define(
function () { function () {
"use strict"; "use strict";
@ -2719,7 +2727,8 @@ root-level object we added in Step 1.
return ExampleTelemetryInitializer; return ExampleTelemetryInitializer;
} }
); );
```
__tutorials/telemetry/src/ExampleTelemetryInitializer.js__ __tutorials/telemetry/src/ExampleTelemetryInitializer.js__
At the conclusion of Step 1, the top-level My Spacecraft object was empty. This At the conclusion of Step 1, the top-level My Spacecraft object was empty. This
@ -2737,14 +2746,14 @@ with the platform):
```diff ```diff
define([ define([
'legacyRegistry', 'legacyRegistry',
'./src/ExampleTelemetryServerAdapter', + './src/ExampleTelemetryServerAdapter',
'./src/ExampleTelemetryInitializer', + './src/ExampleTelemetryInitializer',
'./src/ExampleTelemetryModelProvider' + './src/ExampleTelemetryModelProvider'
], function ( ], function (
legacyRegistry, legacyRegistry,
ExampleTelemetryServerAdapter, + ExampleTelemetryServerAdapter,
ExampleTelemetryInitializer, + ExampleTelemetryInitializer,
ExampleTelemetryModelProvider + ExampleTelemetryModelProvider
) { ) {
legacyRegistry.register("tutorials/telemetry", { legacyRegistry.register("tutorials/telemetry", {
"name": "Example Telemetry Adapter", "name": "Example Telemetry Adapter",
@ -2755,7 +2764,7 @@ define([
"key": "example.spacecraft", "key": "example.spacecraft",
"glyph": "o" "glyph": "o"
}, },
{ + {
+ "name": "Subsystem", + "name": "Subsystem",
+ "key": "example.subsystem", + "key": "example.subsystem",
+ "glyph": "o", + "glyph": "o",
@ -2934,6 +2943,7 @@ identifier, the pending promise is resolved.
This `history` method will be used by a `telemetryService` provider which we This `history` method will be used by a `telemetryService` provider which we
will implement: will implement:
```diff ```diff
/*global define*/ /*global define*/
@ -3019,6 +3029,7 @@ Finally, note that we also have a `subscribe` method, to satisfy the interface o
`telemetryService`, but this `subscribe` method currently does nothing. `telemetryService`, but this `subscribe` method currently does nothing.
This script uses an `ExampleTelemetrySeries` class, which looks like: This script uses an `ExampleTelemetrySeries` class, which looks like:
```diff ```diff
/*global define*/ /*global define*/
@ -3050,6 +3061,7 @@ This takes the array of telemetry values (as returned by the server) and wraps
it with the interface expected by the platform (the methods shown.) it with the interface expected by the platform (the methods shown.)
Finally, we expose this `telemetryService` provider declaratively: Finally, we expose this `telemetryService` provider declaratively:
```diff ```diff
define([ define([
'legacyRegistry', 'legacyRegistry',
@ -3316,7 +3328,6 @@ define(
} }
); );
``` ```
__tutorials/telemetry/src/ExampleTelemetryProvider.js__ __tutorials/telemetry/src/ExampleTelemetryProvider.js__
A quick summary of these changes: A quick summary of these changes:

View File

@ -129,7 +129,7 @@ define([
{ {
"name": "Period", "name": "Period",
"control": "textfield", "control": "textfield",
"cssclass": "l-small l-numeric", "cssclass": "l-input-sm l-numeric",
"key": "period", "key": "period",
"required": true, "required": true,
"property": [ "property": [

View File

@ -42,6 +42,7 @@ var gulp = require('gulp'),
main: 'main.js', main: 'main.js',
dist: 'dist', dist: 'dist',
assets: 'dist/assets', assets: 'dist/assets',
reports: 'dist/reports',
scss: ['./platform/**/*.scss', './example/**/*.scss'], scss: ['./platform/**/*.scss', './example/**/*.scss'],
scripts: [ 'main.js', 'platform/**/*.js', 'src/**/*.js' ], scripts: [ 'main.js', 'platform/**/*.js', 'src/**/*.js' ],
specs: [ 'platform/**/*Spec.js', 'src/**/*Spec.js' ], specs: [ 'platform/**/*Spec.js', 'src/**/*Spec.js' ],
@ -102,6 +103,11 @@ gulp.task('stylesheets', function () {
.pipe(gulp.dest(__dirname)); .pipe(gulp.dest(__dirname));
}); });
gulp.task('nsp', function (done) {
var nsp = require('gulp-nsp');
nsp({package: __dirname + '/package.json'}, done);
});
gulp.task('lint', function () { gulp.task('lint', function () {
var nonspecs = paths.specs.map(function (glob) { var nonspecs = paths.specs.map(function (glob) {
return "!" + glob; return "!" + glob;
@ -112,6 +118,10 @@ gulp.task('lint', function () {
.pipe(jshint({ jasmine: true })); .pipe(jshint({ jasmine: true }));
return merge(scriptLint, specLint) 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('default'))
.pipe(jshint.reporter('fail')); .pipe(jshint.reporter('fail'));
}); });
@ -147,6 +157,6 @@ gulp.task('develop', ['serve', 'stylesheets', 'watch']);
gulp.task('install', [ 'static', 'scripts' ]); gulp.task('install', [ 'static', 'scripts' ]);
gulp.task('verify', [ 'lint', 'test', 'checkstyle' ]); gulp.task('verify', [ 'lint', 'test', 'checkstyle', 'nsp' ]);
gulp.task('build', [ 'verify', 'install' ]); gulp.task('build', [ 'verify', 'install' ]);

View File

@ -81,7 +81,7 @@ module.exports = function(config) {
coverageReporter: { coverageReporter: {
dir: process.env.CIRCLE_ARTIFACTS ? dir: process.env.CIRCLE_ARTIFACTS ?
process.env.CIRCLE_ARTIFACTS + '/coverage' : process.env.CIRCLE_ARTIFACTS + '/coverage' :
"dist/coverage", "dist/reports/coverage",
check: { check: {
global: { global: {
lines: 80 lines: 80
@ -91,13 +91,13 @@ module.exports = function(config) {
// HTML test reporting. // HTML test reporting.
htmlReporter: { htmlReporter: {
outputDir: "target/tests", outputDir: "dist/reports/tests",
preserveDescribeNesting: true, preserveDescribeNesting: true,
foldAll: false foldAll: false
}, },
junitReporter: { junitReporter: {
outputDir: process.env.CIRCLE_TEST_REPORTS || 'target/junit' outputDir: process.env.CIRCLE_TEST_REPORTS || 'dist/reports/junit'
}, },
// Continuous Integration mode. // Continuous Integration mode.

View File

@ -1,6 +1,6 @@
{ {
"name": "openmct", "name": "openmct",
"version": "0.11.1-SNAPSHOT", "version": "0.11.3-SNAPSHOT",
"description": "The Open MCT core platform", "description": "The Open MCT core platform",
"dependencies": { "dependencies": {
"express": "^4.13.1", "express": "^4.13.1",
@ -14,6 +14,8 @@
"gulp": "^3.9.0", "gulp": "^3.9.0",
"gulp-jscs": "^3.0.2", "gulp-jscs": "^3.0.2",
"gulp-jshint": "^2.0.0", "gulp-jshint": "^2.0.0",
"gulp-jshint-html-reporter": "^0.1.3",
"gulp-nsp": "^2.4.2",
"gulp-rename": "^1.2.2", "gulp-rename": "^1.2.2",
"gulp-replace-task": "^0.11.0", "gulp-replace-task": "^0.11.0",
"gulp-requirejs-optimize": "^0.3.1", "gulp-requirejs-optimize": "^0.3.1",

View File

@ -90,7 +90,9 @@ define(
// Ensure there is always a "save in" section // Ensure there is always a "save in" section
if (includeLocation) { if (includeLocation) {
sections.push({ sections.push({
name: 'Location', rows: [{ name: 'Location',
cssclass: "grows",
rows: [{
name: "Save In", name: "Save In",
control: "locator", control: "locator",
validate: validateLocation, validate: validateLocation,

View File

@ -50,10 +50,7 @@ define(
$scope.rootObject = $scope.rootObject =
(context && context.getRoot()) || $scope.rootObject; (context && context.getRoot()) || $scope.rootObject;
}, 0); }, 0);
} else if (!contextRoot) { } 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 // Update the displayed tree on a timeout to avoid
// an infinite digest exception. // an infinite digest exception.
objectService.getObjects(['ROOT']) objectService.getObjects(['ROOT'])

View File

@ -152,8 +152,19 @@ define(
mockScope.$watch.mostRecentCall.args[1](mockDomainObject); mockScope.$watch.mostRecentCall.args[1](mockDomainObject);
mockTimeout.mostRecentCall.args[0](); mockTimeout.mostRecentCall.args[0]();
expect(mockScope.rootObject).toBe(defaultRoot); 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);
});
}); });
}); });
} }

View File

@ -21,7 +21,6 @@
*****************************************************************************/ *****************************************************************************/
.t-fixed-position { .t-fixed-position {
&.l-fixed-position { &.l-fixed-position {
// @include test(red);
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
@ -35,7 +34,6 @@
height: 100%; height: 100%;
width: 100%; width: 100%;
.l-grid { .l-grid {
// @include test(orange);
position: absolute; position: absolute;
height: 100%; height: 100%;
width: 100%; width: 100%;
@ -49,11 +47,6 @@
position: absolute; position: absolute;
border: 1px solid transparent; border: 1px solid transparent;
&.s-selected {
@include boxShdwLarge();
border-color: $colorKey;
cursor: move;
}
&.s-not-selected { &.s-not-selected {
opacity: 0.8; opacity: 0.8;
} }
@ -76,26 +69,19 @@
} }
.l-fixed-position-text { .l-fixed-position-text {
//@include txtShdwSubtle();
border: 1px solid transparent; border: 1px solid transparent;
font-size: 0.8rem; font-size: 0.8rem;
$p: 1px; //$interiorMarginSm; $p: 1px;
line-height: 100%; line-height: 100%;
&.l-static-text { &.l-static-text {
// overflow: auto;
padding: $p; padding: $p;
} }
&.l-telemetry { &.l-telemetry {
.l-elem { .l-elem {
//@include absPosDefault($p);
//@include absPosDefault(0);
box-sizing: border-box; box-sizing: border-box;
display: block; display: block;
padding: 2px; padding: 2px;
//width: 50%;
&.l-title { &.l-title {
//right: auto;
//left: $p;
float: none; float: none;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -103,9 +89,6 @@
width: auto; width: auto;
} }
&.l-value { &.l-value {
// @include test(blue);
// right: $p;
// left: auto;
border-radius: $smallCr; border-radius: $smallCr;
$valPad: 5px; $valPad: 5px;
float: right; float: right;
@ -125,7 +108,6 @@
.l-fixed-position-item-handle { .l-fixed-position-item-handle {
$brd: 1px solid $colorKey; $brd: 1px solid $colorKey;
// border-radius: $controlCr;
background: rgba($colorKey, 0.5); background: rgba($colorKey, 0.5);
cursor: crosshair; cursor: crosshair;
border: $brd; border: $brd;

View File

@ -71,7 +71,7 @@
.form { .form {
margin-bottom: $interiorMarginSm; margin-bottom: $interiorMarginSm;
padding-bottom: $interiorMarginLg; padding-bottom: $interiorMarginLg;
.form-section { .l-section-body {
margin-bottom: 0; margin-bottom: 0;
&:not(.first) { &:not(.first) {
border-top: 1px solid $colorFormLines; border-top: 1px solid $colorFormLines;

View File

@ -65,6 +65,7 @@
@import "user-environ/frame"; @import "user-environ/frame";
@import "user-environ/top-bar"; @import "user-environ/top-bar";
@import "user-environ/tool-bar"; @import "user-environ/tool-bar";
@import "user-environ/selecting";
/********************************* VIEWS */ /********************************* VIEWS */
@import "fixed-position"; @import "fixed-position";

View File

@ -97,7 +97,7 @@
.frame.child-frame.panel { .frame.child-frame.panel {
&:hover { &:hover {
@include boxShdwLarge(); @include boxShdwLarge();
border-color: $colorKey; border-color: $colorSelectableSelectedPrimary;
.view-switcher { .view-switcher {
opacity: 1; opacity: 1;
} }

View File

@ -25,10 +25,20 @@
.form { .form {
color: $colorFormText; color: $colorFormText;
height: 100%;
width: 100%; width: 100%;
.form-section {
.l-form-section {
position: relative; position: relative;
margin-bottom: $interiorMarginLg * 2; &.grows {
.l-section-body,
.form-row {
@include flex(1 1 auto);
.wrapper {
height: 100%;
}
}
}
} }
.section-header { .section-header {
@ -43,10 +53,14 @@
.form-row { .form-row {
$m: $interiorMargin; $m: $interiorMargin;
box-sizing: border-box; box-sizing: border-box;
@include clearfix;
border-top: 1px solid $colorFormLines; border-top: 1px solid $colorFormLines;
margin-bottom: $interiorMarginLg * 2;
padding: $formTBPad 0; padding: $formTBPad 0;
position: relative; position: relative;
//&ng-form {
// display: block;
//}
&.first { &.first {
border-top: none; border-top: none;
} }
@ -92,17 +106,14 @@
.selector-list { .selector-list {
// Used in create overlay to display tree view // Used in create overlay to display tree view
@include nice-input(); @include nice-input();
$h: 150px; padding: $interiorMargin;
position: relative; position: relative;
height: $h; min-height: 150px;
height: 100%;
>.wrapper { >.wrapper {
$p: $interiorMargin; $p: $interiorMargin;
box-sizing: border-box;
overflow: auto; overflow: auto;
position: absolute;
top: $p;
right: $p;
bottom: $p;
left: $p;
} }
} }
} }

View File

@ -21,9 +21,6 @@
*****************************************************************************/ *****************************************************************************/
//************************************************* GENERAL //************************************************* GENERAL
.bubble-container {
pointer-events: none;
}
//************************************************* LAYOUT //************************************************* LAYOUT

View File

@ -25,7 +25,6 @@
@include phone { @include phone {
.overlay > .holder { .overlay > .holder {
//@include test(orange); // This works!
$m: 0; $m: 0;
border-radius: $m; border-radius: $m;
top: $m; top: $m;
@ -38,36 +37,30 @@
overflow: auto; overflow: auto;
@include transform(none); @include transform(none);
.editor .form .form-row { .editor .form .form-row.l-flex-row {
> .label, // Display elements in a columnar view
> .controls { @include flex-direction(column);
//@include test(blue); > .flex-elem {
display: block; &:not(:first-child) {
float: none; margin-top: $interiorMargin;
}
&.label {
width: 100%; width: 100%;
} }
> .label { &.controls {
&:after { overflow: auto;
float: none;
}
} }
} }
.contents { &.validates > .label:before {
.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;
position: relative; position: relative;
right: auto;
line-height: inherit;
margin-right: $interiorMargin;
} }
} }
} }
.t-dialog-sm .overlay > .holder { .t-dialog-sm .overlay > .holder {
//@include test(blue);
height: auto; max-height: 100%; height: auto; max-height: 100%;
} }
} }

View File

@ -126,16 +126,15 @@
$p: $interiorMargin; $p: $interiorMargin;
box-sizing: border-box; box-sizing: border-box;
line-height: 130%; line-height: 130%;
//padding-left: $s * 2.25; padding-left: $s * 2;
font-size: $s; font-size: $s;
.clear-filters { .clear-filters {
color: $colorInputIcon;
opacity: 1; opacity: 1;
font-size: 0.9em; font-size: 0.9em;
margin-right: $interiorMarginSm; margin-right: $interiorMarginSm;
//position: absolute; position: absolute;
//left: 1px; left: 1px;
cursor: pointer; cursor: pointer;
} }
} }

View File

@ -19,11 +19,21 @@
* this source code distribution or the Licensing information page available * this source code distribution or the Licensing information page available
* at runtime from the About dialog for additional information. * at runtime from the About dialog for additional information.
*****************************************************************************/ *****************************************************************************/
/*global module,browser*/ .s-selectable {
border: 1px solid transparent;
module.exports = function launch() { &.s-hover {
'use strict'; // Styles when hovering over a selectable object
browser.ignoreSynchronization = true; border-color: $colorSelectableHov !important;
browser.get('http://localhost:1984'); }
browser.sleep(2000); // 2 seconds
}; &.s-selected {
// Styles for a selected object. Also used by legacy Fixed Position/Panel objects.
border-color: $colorSelectableSelectedPrimary !important;
}
&.s-moveable {
@include boxShdwLarge();
cursor: move;
}
}

View File

@ -28,8 +28,10 @@ define([
function link(scope, element) { function link(scope, element) {
var treeView = new TreeView(gestureService), var treeView = new TreeView(gestureService),
unobserve = treeView.observe(function (domainObject) { unobserve = treeView.observe(function (domainObject) {
if (scope.mctModel !== domainObject) {
scope.mctModel = domainObject; scope.mctModel = domainObject;
scope.$apply(); scope.$apply();
}
}); });
element.append(angular.element(treeView.elements())); element.append(angular.element(treeView.elements()));

View File

@ -29,6 +29,18 @@ define([
mockExpr, mockExpr,
mctTree; 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 () { beforeEach(function () {
mockGestureService = jasmine.createSpyObj( mockGestureService = jasmine.createSpyObj(
'gestureService', 'gestureService',
@ -56,7 +68,8 @@ define([
testAttrs; testAttrs;
beforeEach(function () { beforeEach(function () {
mockScope = jasmine.createSpyObj('$scope', ['$watch', '$on']); mockScope =
jasmine.createSpyObj('$scope', ['$watch', '$on', '$apply']);
mockElement = jasmine.createSpyObj('element', ['append']); mockElement = jasmine.createSpyObj('element', ['append']);
testAttrs = { mctModel: "some-expression" }; testAttrs = { mctModel: "some-expression" };
mockScope.$parent = mockScope.$parent =
@ -88,6 +101,27 @@ define([
jasmine.any(Function) 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();
});
}); });
}); });

View File

@ -29,8 +29,7 @@
define({ define({
BUBBLE_TEMPLATE: "<mct-container key=\"bubble\" " + BUBBLE_TEMPLATE: "<mct-container key=\"bubble\" " +
"bubble-title=\"{{bubbleTitle}}\" " + "bubble-title=\"{{bubbleTitle}}\" " +
"bubble-layout=\"{{bubbleLayout}}\" " + "bubble-layout=\"{{bubbleLayout}}\">" +
"class=\"bubble-container\">" +
"<mct-include key=\"bubbleTemplate\" " + "<mct-include key=\"bubbleTemplate\" " +
"ng-model=\"bubbleModel\">" + "ng-model=\"bubbleModel\">" +
"</mct-include>" + "</mct-include>" +

View File

@ -61,8 +61,11 @@ $colorCreateBtn: $colorKey;
$colorGridLines: rgba(#fff, 0.05); $colorGridLines: rgba(#fff, 0.05);
$colorInvokeMenu: #fff; $colorInvokeMenu: #fff;
$colorObjHdrTxt: $colorBodyFg; $colorObjHdrTxt: $colorBodyFg;
$colorObjHdrIc: darken($colorObjHdrTxt, 20%); $colorObjHdrIc: pullForward($colorObjHdrTxt, 20%);
$colorTick: pullForward($colorBodyBg, 20%); $colorTick: rgba(white, 0.2);
$colorSelectableSelectedPrimary: $colorKey;
$colorSelectableSelectedSecondary: pushBack($colorSelectableSelectedPrimary, 20%);
$colorSelectableHov: $colorSelectableSelectedSecondary;
// Menu colors // Menu colors
$colorMenuBg: pullForward($colorBodyBg, 23%); $colorMenuBg: pullForward($colorBodyBg, 23%);
@ -113,7 +116,6 @@ $colorProgressBarAmt: $colorKey;
$progressBarHOverlay: 15px; $progressBarHOverlay: 15px;
$progressBarStripeW: 20px; $progressBarStripeW: 20px;
$shdwStatusIc: rgba(black, 0.4) 0 1px 2px; $shdwStatusIc: rgba(black, 0.4) 0 1px 2px;
$animPausedPulseDur: 500ms;
// Selects // Selects
$colorSelectBg: $colorBtnBg; $colorSelectBg: $colorBtnBg;

View File

@ -61,8 +61,11 @@ $colorCreateBtn: $colorKey;
$colorGridLines: rgba(#000, 0.05); $colorGridLines: rgba(#000, 0.05);
$colorInvokeMenu: #fff; $colorInvokeMenu: #fff;
$colorObjHdrTxt: $colorBodyFg; $colorObjHdrTxt: $colorBodyFg;
$colorObjHdrIc: lighten($colorObjHdrTxt, 20%); $colorObjHdrIc: pushBack($colorObjHdrTxt, 30%);
$colorTick: lighten($colorBodyFg, 10%); $colorTick: rgba(black, 0.2);
$colorSelectableSelectedPrimary: $colorKey;
$colorSelectableSelectedSecondary: pushBack($colorSelectableSelectedPrimary, 20%);
$colorSelectableHov: $colorSelectableSelectedSecondary;
// Menu colors // Menu colors
$colorMenuBg: pushBack($colorBodyBg, 10%); $colorMenuBg: pushBack($colorBodyBg, 10%);
@ -113,7 +116,6 @@ $colorProgressBarAmt: #0a0;
$progressBarHOverlay: 15px; $progressBarHOverlay: 15px;
$progressBarStripeW: 20px; $progressBarStripeW: 20px;
$shdwStatusIc: rgba(white, 0.8) 0 0px 5px; $shdwStatusIc: rgba(white, 0.8) 0 0px 5px;
$animPausedPulseDur: 1s;
// Selects // Selects
$colorSelectBg: $colorBtnBg; $colorSelectBg: $colorBtnBg;

View File

@ -95,7 +95,7 @@ define(
this.locationService = locationService; this.locationService = locationService;
this.composeService = composeService; this.composeService = composeService;
this.verb = verb || "Compose"; this.verb = verb || "Compose";
this.suffix = suffix || "to a new location"; this.suffix = suffix || "To a New Location";
} }
AbstractComposeAction.prototype.cloneContext = function () { AbstractComposeAction.prototype.cloneContext = function () {

View File

@ -54,7 +54,7 @@ define(
copyService, copyService,
context, context,
"Duplicate", "Duplicate",
"to a location" "To a Location"
); );
} }

View File

@ -58,6 +58,7 @@ define(
sections: [ sections: [
{ {
name: 'Location', name: 'Location',
cssclass: "grows",
rows: [ rows: [
{ {
name: label, name: label,

View File

@ -150,7 +150,7 @@ define(
it("prompts for location", function () { it("prompts for location", function () {
expect(locationService.getLocationFromUser) expect(locationService.getLocationFromUser)
.toHaveBeenCalledWith( .toHaveBeenCalledWith(
"Compose selectedObject to a new location", "Compose selectedObject To a New Location",
"Compose To", "Compose To",
jasmine.any(Function), jasmine.any(Function),
currentParent currentParent

View File

@ -173,7 +173,7 @@ define(
it("prompts for location", function () { it("prompts for location", function () {
expect(locationService.getLocationFromUser) expect(locationService.getLocationFromUser)
.toHaveBeenCalledWith( .toHaveBeenCalledWith(
"Duplicate selectedObject to a location", "Duplicate selectedObject To a Location",
"Duplicate To", "Duplicate To",
jasmine.any(Function), jasmine.any(Function),
currentParent currentParent

View File

@ -126,7 +126,7 @@ define(
it("prompts for location", function () { it("prompts for location", function () {
expect(locationService.getLocationFromUser) expect(locationService.getLocationFromUser)
.toHaveBeenCalledWith( .toHaveBeenCalledWith(
"Link selectedObject to a new location", "Link selectedObject To a New Location",
"Link To", "Link To",
jasmine.any(Function), jasmine.any(Function),
currentParent currentParent

View File

@ -126,7 +126,7 @@ define(
it("prompts for location", function () { it("prompts for location", function () {
expect(locationService.getLocationFromUser) expect(locationService.getLocationFromUser)
.toHaveBeenCalledWith( .toHaveBeenCalledWith(
"Move selectedObject to a new location", "Move selectedObject To a New Location",
"Move To", "Move To",
jasmine.any(Function), jasmine.any(Function),
currentParent currentParent

View File

@ -139,6 +139,7 @@ define([
"dialog": { "dialog": {
"control": "textfield", "control": "textfield",
"name": "Image URL", "name": "Image URL",
"cssclass": "l-input-lg",
"required": true "required": true
} }
}, },
@ -213,12 +214,12 @@ define([
{ {
"name": "Horizontal grid (px)", "name": "Horizontal grid (px)",
"control": "textfield", "control": "textfield",
"cssclass": "l-small l-numeric" "cssclass": "l-input-sm l-numeric"
}, },
{ {
"name": "Vertical grid (px)", "name": "Vertical grid (px)",
"control": "textfield", "control": "textfield",
"cssclass": "l-small l-numeric" "cssclass": "l-input-sm l-numeric"
} }
], ],
"pattern": "^(\\d*[1-9]\\d*)?$", "pattern": "^(\\d*[1-9]\\d*)?$",

View File

@ -169,6 +169,7 @@ define([
"dialog": { "dialog": {
"control": "textfield", "control": "textfield",
"name": "Image URL", "name": "Image URL",
"cssclass": "l-input-lg",
"required": true "required": true
} }
}, },
@ -329,12 +330,12 @@ define([
{ {
"name": "Horizontal grid (px)", "name": "Horizontal grid (px)",
"control": "textfield", "control": "textfield",
"cssclass": "l-small l-numeric" "cssclass": "l-input-sm l-numeric"
}, },
{ {
"name": "Vertical grid (px)", "name": "Vertical grid (px)",
"control": "textfield", "control": "textfield",
"cssclass": "l-small l-numeric" "cssclass": "l-input-sm l-numeric"
} }
], ],
"pattern": "^(\\d*[1-9]\\d*)?$", "pattern": "^(\\d*[1-9]\\d*)?$",

View File

@ -44,7 +44,7 @@
<!-- Selection highlight, handles --> <!-- Selection highlight, handles -->
<span ng-if="controller.selected()"> <span ng-if="controller.selected()">
<div class="l-fixed-position-item s-selected" <div class="l-fixed-position-item s-selectable s-selected s-moveable"
mct-drag-down="controller.moveHandle().startDrag(controller.selected())" mct-drag-down="controller.moveHandle().startDrag(controller.selected())"
mct-drag="controller.moveHandle().continueDrag(delta)" mct-drag="controller.moveHandle().continueDrag(delta)"
mct-drag-up="controller.moveHandle().endDrag()" mct-drag-up="controller.moveHandle().endDrag()"

View File

@ -32,61 +32,28 @@
</mct-representation> </mct-representation>
<!-- Drag handles --> <!-- Drag handles -->
<span ng-show="domainObject.hasCapability('editor')"> <span ng-show="domainObject.hasCapability('editor')">
<span class="edit-handle edit-move"
<span
class="edit-handle edit-move"
mct-drag-down="controller.startDrag(childObject.getId(), [1,1], [0,0])" mct-drag-down="controller.startDrag(childObject.getId(), [1,1], [0,0])"
mct-drag="controller.continueDrag(delta)" mct-drag="controller.continueDrag(delta)"
mct-drag-up="controller.endDrag()"> mct-drag-up="controller.endDrag()">
</span> </span>
<!--
<span
class="edit-handle edit-resize-w"
mct-drag-down="controller.startDrag(childObject.getId(), [1,0], [-1,0])"
mct-drag="controller.continueDrag(delta)"
mct-drag-up="controller.endDrag()">
</span>
<span
class="edit-handle edit-resize-e"
mct-drag-down="controller.startDrag(childObject.getId(), [0,0], [1,0])"
mct-drag="controller.continueDrag(delta)"
mct-drag-up="controller.endDrag()">
</span>
<span <span class="edit-corner edit-resize-nw"
class="edit-handle edit-resize-n"
mct-drag-down="controller.startDrag(childObject.getId(), [0,1], [0,-1])"
mct-drag="controller.continueDrag(delta)"
mct-drag-up="controller.endDrag()">
</span>
<span
class="edit-handle edit-resize-s"
mct-drag-down="controller.startDrag(childObject.getId(), [0,0], [0,1])"
mct-drag="controller.continueDrag(delta)"
mct-drag-up="controller.endDrag()">
</span>
-->
<span
class="edit-corner edit-resize-nw"
mct-drag-down="controller.startDrag(childObject.getId(), [1,1], [-1,-1])" mct-drag-down="controller.startDrag(childObject.getId(), [1,1], [-1,-1])"
mct-drag="controller.continueDrag(delta)" mct-drag="controller.continueDrag(delta)"
mct-drag-up="controller.endDrag()"> mct-drag-up="controller.endDrag()">
</span> </span>
<span <span class="edit-corner edit-resize-ne"
class="edit-corner edit-resize-ne"
mct-drag-down="controller.startDrag(childObject.getId(), [0,1], [1,-1])" mct-drag-down="controller.startDrag(childObject.getId(), [0,1], [1,-1])"
mct-drag="controller.continueDrag(delta)" mct-drag="controller.continueDrag(delta)"
mct-drag-up="controller.endDrag()"> mct-drag-up="controller.endDrag()">
</span> </span>
<span <span class="edit-corner edit-resize-sw"
class="edit-corner edit-resize-sw"
mct-drag-down="controller.startDrag(childObject.getId(), [1,0], [-1,1])" mct-drag-down="controller.startDrag(childObject.getId(), [1,0], [-1,1])"
mct-drag="controller.continueDrag(delta)" mct-drag="controller.continueDrag(delta)"
mct-drag-up="controller.endDrag()"> mct-drag-up="controller.endDrag()">
</span> </span>
<span <span class="edit-corner edit-resize-se"
class="edit-corner edit-resize-se"
mct-drag-down="controller.startDrag(childObject.getId(), [0,0], [1,1])" mct-drag-down="controller.startDrag(childObject.getId(), [0,0], [1,1])"
mct-drag="controller.continueDrag(delta)" mct-drag="controller.continueDrag(delta)"
mct-drag-up="controller.endDrag()"> mct-drag-up="controller.endDrag()">

View File

@ -55,6 +55,7 @@ define(
key: "url", key: "url",
control: "textfield", control: "textfield",
name: "Image URL", name: "Image URL",
"cssclass": "l-input-lg",
required: true required: true
} }
] ]

View File

@ -19,22 +19,24 @@
this source code distribution or the Licensing information page available this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information. at runtime from the About dialog for additional information.
--> -->
<form name="mctForm" novalidate class="form"> <form name="mctForm" novalidate class="form l-flex-col">
<span ng-repeat="section in structure.sections"> <span ng-repeat="section in structure.sections"
<div class="section-header" ng-if="section.name"> class="l-form-section l-flex-col flex-elem {{ section.cssclass }}">
<div class="section-header flex-elem" ng-if="section.name">
{{section.name}} {{section.name}}
</div> </div>
<div class="form-section" ng-class="{ first:$index < 1 }"> <ng-form class="form-row validates l-flex-row flex-elem {{ section.cssclass }}"
<ng-form name="mctFormInner" ng-repeat="row in section.rows">
<div class="form-row validates l-flex-row"
ng-class="{ ng-class="{
first:$index < 1,
req: row.required, req: row.required,
valid: mctFormInner.$dirty && mctFormInner.$valid, valid: mctFormInner.$dirty && mctFormInner.$valid,
invalid: mctFormInner.$dirty && !mctFormInner.$valid, invalid: mctFormInner.$dirty && !mctFormInner.$valid,
first: $index < 1, first: $index < 1,
'l-controls-first': row.layout === 'control-first', 'l-controls-first': row.layout === 'control-first',
'l-controls-under': row.layout === 'controls-under' 'l-controls-under': row.layout === 'controls-under'
}"> }"
name="mctFormInner"
ng-repeat="row in section.rows">
<div class='label flex-elem' title="{{row.description}}"> <div class='label flex-elem' title="{{row.description}}">
{{row.name}} {{row.name}}
</div> </div>
@ -50,8 +52,6 @@
</mct-control> </mct-control>
</div> </div>
</div> </div>
</div>
</ng-form> </ng-form>
</div>
</span> </span>
</form> </form>

View File

@ -19,10 +19,12 @@
this source code distribution or the Licensing information page available this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information. at runtime from the About dialog for additional information.
--> -->
<div class="l-flex-col flex-elem grows holder holder-search" ng-controller="SearchController as controller"> <div class="angular-w" ng-controller="SearchController as controller">
<div class="search-bar flex-elem" <div class="l-flex-col flex-elem grows holder holder-search" ng-controller="SearchMenuController as menuController">
<div class="search-bar flex-elem l-flex-row"
ng-controller="ToggleController as toggle" ng-controller="ToggleController as toggle"
ng-class="{ holder: !(ngModel.input === '' || ngModel.input === undefined) }"> ng-class="{ holder: !(ngModel.input === '' || ngModel.input === undefined) }">
<div class="holder flex-elem grows">
<input class="search-input" <input class="search-input"
type="text" type="text"
ng-model="ngModel.input" ng-model="ngModel.input"
@ -30,6 +32,7 @@
<a class="clear-icon clear-input icon-x-in-circle" <a class="clear-icon clear-input icon-x-in-circle"
ng-class="{show: !(ngModel.input === '' || ngModel.input === undefined)}" ng-class="{show: !(ngModel.input === '' || ngModel.input === undefined)}"
ng-click="ngModel.input = ''; controller.search()"></a> ng-click="ngModel.input = ''; controller.search()"></a>
<!-- To prevent double triggering of clicks on click away, render <!-- To prevent double triggering of clicks on click away, render
non-clickable version of the button when menu active--> non-clickable version of the button when menu active-->
<a ng-if="!toggle.isActive()" class="menu-icon context-available" <a ng-if="!toggle.isActive()" class="menu-icon context-available"
@ -43,12 +46,26 @@
parameters="{menuVisible: toggle.setState}"> parameters="{menuVisible: toggle.setState}">
</mct-include> </mct-include>
</div> </div>
<a class="holder s-button flex-elem btn-cancel"
ng-show="!(ngModel.input === '' || ngModel.input === undefined)"
ng-click="ngModel.input = ''; ngModel.checkAll = true; menuController.checkAll(); controller.search()">
Cancel</a>
</div>
<div class="active-filter-display flex-elem holder" <div class="active-filter-display flex-elem holder"
ng-class="{off: ngModel.filtersString === '' || ngModel.filtersString === undefined || !ngModel.search}" ng-class="{off: ngModel.filtersString === '' || ngModel.filtersString === undefined || !ngModel.search}">
ng-controller="SearchMenuController as menuController"> <a class="clear-filters icon-x-in-circle s-icon-button"
<a class="clear-icon clear-filters icon-x-in-circle"
ng-click="ngModel.checkAll = true; menuController.checkAll()"></a>Filtered by: {{ ngModel.filtersString }} ng-click="ngModel.checkAll = true; menuController.checkAll()"></a>Filtered by: {{ ngModel.filtersString }}
</div> </div>
<div class="flex-elem holder results-msg" ng-model="ngModel" ng-show="!loading && ngModel.search">
{{
!results.length > 0? 'No results found':
results.length + ' result' + (results.length > 1? 's':'') + ' found'
}}
</div>
<div class="search-results flex-elem holder grows vscroll" <div class="search-results flex-elem holder grows vscroll"
ng-class="{ off: !(loading || results.length > 0), loading: loading }"> ng-class="{ off: !(loading || results.length > 0), loading: loading }">
<mct-representation key="'search-item'" <mct-representation key="'search-item'"
@ -59,5 +76,5 @@
</mct-representation> </mct-representation>
<a class="load-more-button s-button vsm" ng-if="controller.areMore()" ng-click="controller.loadMore()">More Results</a> <a class="load-more-button s-button vsm" ng-if="controller.areMore()" ng-click="controller.loadMore()">More Results</a>
</div> </div>
</div>
</div> </div>

View File

@ -80,7 +80,7 @@ define(function () {
// If there's still nothing in the filters string, there are no // If there's still nothing in the filters string, there are no
// filters selected // filters selected
if ($scope.ngModel.filtersString === '') { if ($scope.ngModel.filtersString === '') {
$scope.ngModel.filtersString = 'NONE'; $scope.ngModel.checkAll = true;
} }
} }
@ -95,12 +95,11 @@ define(function () {
$scope.ngModel.checked[type] = false; $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 // This setting will make the filters display hidden
$scope.ngModel.filtersString = ''; $scope.ngModel.filtersString = '';
} else { // Do not let checkAll become unchecked when it is the only checked filter
$scope.ngModel.filtersString = 'NONE'; if (!$scope.ngModel.checkAll) {
$scope.ngModel.checkAll = true;
} }
// Re-filter results // Re-filter results

View File

@ -76,14 +76,16 @@ define(
expect(mockScope.ngModel.filtersString).not.toEqual(''); 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(); controller.checkAll();
expect(mockScope.ngModel.checkAll).toEqual(true);
expect(mockScope.ngModel.filtersString).toEqual(''); expect(mockScope.ngModel.filtersString).toEqual('');
mockScope.ngModel.checkAll = false; mockScope.ngModel.checkAll = false;
controller.checkAll(); controller.checkAll();
expect(mockScope.ngModel.filtersString).toEqual('NONE'); expect(mockScope.ngModel.checkAll).toEqual(true);
expect(mockScope.ngModel.filtersString).toEqual('');
}); });
it("checking checkAll option resets other options", function () { it("checking checkAll option resets other options", function () {
@ -97,7 +99,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) { Object.keys(mockScope.ngModel.checked).forEach(function (type) {
mockScope.ngModel.checked[type] = false; mockScope.ngModel.checked[type] = false;
}); });
@ -105,7 +107,8 @@ define(
controller.updateOptions(); 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 () { it("tells the user when options are checked", function () {
@ -116,7 +119,6 @@ define(
controller.updateOptions(); controller.updateOptions();
expect(mockScope.ngModel.filtersString).not.toEqual('NONE');
expect(mockScope.ngModel.filtersString).not.toEqual(''); expect(mockScope.ngModel.filtersString).not.toEqual('');
}); });
}); });

View File

@ -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.

View File

@ -1,135 +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"
})
})//output console.log
/*expect(dragObject.get(0).isPresent()).toBe(true);
browser.manage().logs().get('browser').then(function(browserLogs) {
browserLogs.forEach(function(log){
console.log(log.message);
});
});*/
});
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);
});
});

View File

@ -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();
});
});

View File

@ -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);
});
});

View File

@ -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);
});
});

View File

@ -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);
})
});
});

View File

@ -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")

View File

@ -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

View File

@ -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);
}
});

View File

@ -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);

View File

@ -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);
});
}
});
});

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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);
});
});
});

View File

@ -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);
});
});
});

View File

@ -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();
});
});

View File

@ -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);
})
});
});
})
});
});

View File

@ -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);
});
});
});

View File

@ -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);
});
});
});

View File

@ -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' ]);
});
});
});

View File

@ -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);
});
});
});

View File

@ -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);
});
});

View File

@ -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)
})
});
});

View File

@ -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);
});
});
});

View File

@ -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

View File

@ -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);
});
});

View File

@ -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);
});
});

View File

@ -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);
});
});

View File

@ -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);
});
});

View File

@ -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);
});
});

View File

@ -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);
});
});

View File

@ -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);
});
});

View File

@ -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);
});
});

View File

@ -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);
});
});

View File

@ -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"
}

View File

@ -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();
});
});

View File

@ -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();
});
});

View File

@ -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();
});
});

View File

@ -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();
});
});

View File

@ -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();
});
});

View File

@ -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();
});
});