Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
240 commits
Select commit Hold shift + click to select a range
832f9be
Add version to package.json
martinRenou Apr 18, 2017
71fbcdc
Tabs -> spaces
martinRenou Apr 18, 2017
3a51f3a
Install vue.js with NPM
martinRenou Apr 18, 2017
c892b79
Merge pull request #400 from simphony/install_vue
martinRenou Apr 18, 2017
87df38e
Install vue with bower instead of NPM
martinRenou Apr 18, 2017
d7a09a7
Replace the old ApplicationListView by a Vue ViewModel
martinRenou Apr 18, 2017
4c08083
Delete unused handlebars helpers
martinRenou Apr 18, 2017
14fc736
Create ApplicationListView template
martinRenou Apr 18, 2017
051d193
Fixed imports
martinRenou Apr 18, 2017
b25d692
Fix import
martinRenou Apr 18, 2017
60ffdfb
Started to adapt the controller to the new Application list ViewModel
martinRenou Apr 18, 2017
1cbd133
Changed data representation of the model
martinRenou Apr 24, 2017
b625942
Adapt controller with the new model data representation
martinRenou Apr 24, 2017
a9cf5a0
Adapt ApplicationListView with the new model data representation
martinRenou Apr 24, 2017
0440ef5
Adapt ApplicationView with the new model data representation
martinRenou Apr 24, 2017
31ddfaf
Fixed little issues
martinRenou Apr 24, 2017
27928b2
Add comment
martinRenou Apr 24, 2017
6760912
Add stop button
martinRenou Apr 24, 2017
e3f334e
Fix linter tests
martinRenou Apr 24, 2017
c17ef68
Fix model tests
martinRenou Apr 24, 2017
5554651
Fix view tests
martinRenou Apr 24, 2017
88b2ca1
Try to fix selenium test (DOM elements has been changed)
martinRenou Apr 24, 2017
7143e94
Use minified version of Vue
martinRenou Apr 24, 2017
adee7bd
Try to fix selenium tests
martinRenou Apr 24, 2017
c5891a3
Fix selenium tests
martinRenou Apr 24, 2017
7c82057
Fix selenium test
martinRenou Apr 24, 2017
08c22a7
Fix selenium tests
martinRenou Apr 24, 2017
ed7ae38
Fixed init path
stefanoborini Apr 24, 2017
3acffe7
Fix indentation of the bower file
martinRenou Apr 25, 2017
d4c982c
Now assign the model to the ApplicationListView at instantiation
martinRenou Apr 25, 2017
a15b9d3
Use shorthands for vue attributes
martinRenou Apr 25, 2017
5d5ccd9
The stop-button hover event is now triggered with pure CSS
martinRenou Apr 25, 2017
93a48cd
Clear unused code
martinRenou Apr 25, 2017
48eb4a8
Use filters for icon and application name
martinRenou Apr 25, 2017
0c35794
Configurables is now a list, fixing the issue of Vue adding a __ob__ …
martinRenou Apr 25, 2017
11eaf35
Try to fix focus selenium test
martinRenou Apr 25, 2017
3f52280
Fix jstests
martinRenou Apr 25, 2017
88e398f
Use if else-if
martinRenou Apr 25, 2017
1bea069
Undo last commit
martinRenou Apr 25, 2017
a8d6dfb
Fix issue with unknown "this"
martinRenou Apr 25, 2017
4e5c077
Merge pull request #402 from simphony/replace_application_list2
martinRenou Apr 25, 2017
9acf655
Merge branch 'master' into switch_to_vue
martinRenou Apr 25, 2017
ef3b360
Merge branch 'master' into switch_to_vue
martinRenou Apr 25, 2017
a5f5545
Create Vue object
martinRenou Apr 25, 2017
43bfd89
Add model to app_view
martinRenou Apr 25, 2017
bf3b082
Put filters in utils
martinRenou Apr 25, 2017
efa8afa
Add template for the application view
martinRenou Apr 25, 2017
8b1e20e
Add policy section to the applicationView
martinRenou Apr 26, 2017
b0b9f61
Add start application method
martinRenou Apr 26, 2017
3b1e37e
Put Status in utils instead of models
martinRenou Apr 26, 2017
dca826e
Disable start button on starting
martinRenou Apr 26, 2017
5332c45
Add stop application method to applicationListView
martinRenou Apr 26, 2017
14ec63c
Remove unused method
martinRenou Apr 26, 2017
c3a3b33
Fix comment
martinRenou Apr 26, 2017
bab40bf
Add iframe
martinRenou Apr 26, 2017
da3257b
Removed unused file
martinRenou Apr 26, 2017
17bd786
Add iframe size
martinRenou Apr 26, 2017
eeab568
Remove old code
martinRenou Apr 26, 2017
957991a
Fix jstest
martinRenou Apr 26, 2017
427fac4
Fix focus
martinRenou Apr 26, 2017
b632981
Fix jstest
martinRenou Apr 26, 2017
a66da55
Fix delayed
martinRenou Apr 26, 2017
179ca0e
Fix padding
martinRenou Apr 26, 2017
0e0710c
Remove handlebars
martinRenou Apr 26, 2017
a9a291d
Replace the iframe_size computed property with a method
martinRenou Apr 26, 2017
c9949c5
Put handlebars back in bower
martinRenou Apr 26, 2017
31ab258
Change tornado-webapi version
martinRenou Apr 26, 2017
062c8c7
Merge pull request #405 from simphony/replace_application_view
martinRenou Apr 26, 2017
522382f
Loading is now a property of the model
martinRenou Apr 26, 2017
bc71535
Sort application list by names
martinRenou Apr 26, 2017
b9cf1db
Fix jstest
martinRenou Apr 27, 2017
ac0089f
Correctly instantiate the views with the model
martinRenou Apr 27, 2017
a351e7a
Reinitialize configurables at update
martinRenou Apr 27, 2017
a92cb9a
Fix linter test
martinRenou Apr 27, 2017
fd26c3e
Start_application and stop_application are now model methods
martinRenou Apr 27, 2017
b1f8cdf
Fix linter test
martinRenou Apr 27, 2017
cbd11f9
Temporary disable google analytics to get tests green
martinRenou Apr 27, 2017
1dabeeb
Create GA view
martinRenou Apr 27, 2017
b623af8
Filters are now globally initialized
martinRenou Apr 27, 2017
8251f5a
Fix imports
martinRenou Apr 28, 2017
41fa40a
Remove comments
martinRenou Apr 28, 2017
08b0c50
Set the app_list value in a single shot
martinRenou Apr 28, 2017
db1094e
Add an id to the appview container
martinRenou Apr 28, 2017
128601b
Merge branch 'refactor_model2' into create_ga_vue_object
martinRenou Apr 28, 2017
f037ab8
Remove filters for app status, replaced by app.is_... methods
martinRenou Apr 28, 2017
ee9d330
Merge branch 'refactor_model2' into create_ga_vue_object
martinRenou Apr 28, 2017
b961a44
Merge pull request #407 from simphony/refactor_model2
stefanoborini Apr 28, 2017
1a23c05
Merge branch 'master' into switch_to_vue
martinRenou Apr 28, 2017
0bc1b02
Merge branch 'switch_to_vue' into create_ga_vue_object
martinRenou Apr 28, 2017
74e524e
Update tornado webapi
martinRenou Apr 28, 2017
2d99a96
Merge branch 'create_ga_vue_object' into register_filters_globally
martinRenou Apr 28, 2017
002aa8b
Fix status listening issue
martinRenou May 2, 2017
53a45dd
Fix jstest
martinRenou May 2, 2017
5215904
Merge branch 'create_ga_vue_object' into register_filters_globally
martinRenou May 2, 2017
285035a
Put application view template in the corresponding js file
martinRenou May 2, 2017
79cc748
Put application list template in the corresponding js file
martinRenou May 2, 2017
79d0bde
Merge pull request #411 from simphony/create_ga_vue_object
stefanoborini May 2, 2017
09bd39a
Fix jstest and imports
martinRenou May 2, 2017
f4e0c0d
Merge branch 'register_filters_globally' into put_templates_in_js_files
martinRenou May 2, 2017
9b05d3b
Fix search form behavior
martinRenou May 2, 2017
c976fa9
Deselect current selected application if it's not displayed in the list
martinRenou May 2, 2017
4a06e84
Fix jstest
martinRenou May 2, 2017
b30f722
Merge branch 'put_templates_in_js_files' into fix_search_form
martinRenou May 2, 2017
14c1764
Merge pull request #412 from simphony/register_filters_globally
stefanoborini May 2, 2017
bcb20fe
Try to fix selenium tests
martinRenou May 2, 2017
d4d78d6
Merge branch 'put_templates_in_js_files' into fix_search_form
martinRenou May 2, 2017
0bcc0c0
Try to fix selenium tests2
martinRenou May 2, 2017
2f791a5
Merge pull request #413 from simphony/put_templates_in_js_files
stefanoborini May 3, 2017
3852b86
Undo commit c976fa9
martinRenou May 3, 2017
dca03ae
When the model is loaded, the first app is selected
martinRenou May 3, 2017
627d799
Merge branch 'switch_to_vue' into fix_search_form
martinRenou May 3, 2017
374e001
Remove trailing spaces
martinRenou May 3, 2017
3638482
Merge pull request #418 from simphony/select_first_app_when_loading
stefanoborini May 3, 2017
a8eb69c
Start creating the component
martinRenou May 3, 2017
f629058
Component created
martinRenou May 3, 2017
abfe0ad
Try to insert component
martinRenou May 3, 2017
6f1e8bb
Merge branch 'switch_to_vue' into configurables_components
martinRenou May 3, 2017
3565f2b
Try to not instantiate components
martinRenou May 4, 2017
2253541
First working version
martinRenou May 4, 2017
60bf323
Do not reinitialize configurables when updating the application
martinRenou May 4, 2017
f07ebfb
Fix linter test
martinRenou May 4, 2017
fa76ab9
Fix tests
martinRenou May 4, 2017
3c60633
Disable configurable widgets when starting
martinRenou May 4, 2017
0608ad5
No need for a method or a variable entries_visible
martinRenou May 4, 2017
c0a5645
Add selenium test for hiding application
martinRenou May 4, 2017
6dc6179
Try to fix selenium test
martinRenou May 4, 2017
d59291c
Try to fix selenium test 2
martinRenou May 4, 2017
d85556e
Try to fix selenium test 3
martinRenou May 4, 2017
36395a5
Try to fix selenium test 4
martinRenou May 4, 2017
2acf156
Add print for debug
martinRenou May 4, 2017
2bc0f3f
Try to fix selenium test n
martinRenou May 4, 2017
979eac3
Changed representation of the component
martinRenou May 4, 2017
078e128
Do a deep copy of the configurable model instead of getting each prop…
martinRenou May 4, 2017
aa4daae
Add tests
martinRenou May 4, 2017
bd8feee
Removed handlebars
martinRenou May 4, 2017
efd1c5b
We don't use jquery anymore for focus on the iframe
martinRenou May 4, 2017
78dc6ab
Add transition effect
martinRenou May 5, 2017
a6fa268
Switch from simple fade to slide-fade
martinRenou May 5, 2017
6e8ce30
Add a visible_list computed property to filter the application list
martinRenou May 5, 2017
925870a
Rename focus_iframe event to entry_clicked
martinRenou May 5, 2017
84af7a0
Renamed sel_value to selected_value
martinRenou May 5, 2017
f6ba4b5
Review
martinRenou May 5, 2017
7dcc427
Seperate component tag name to configurable tag name
martinRenou May 5, 2017
dc56c8d
Merge pull request #417 from simphony/fix_search_form
stefanoborini May 5, 2017
cee2c2e
Add tests for the resolution configurable component
martinRenou May 8, 2017
9aeeec8
Configurable models are now classes
martinRenou May 8, 2017
b380478
Replace the slide-fade transition by a fade transition
martinRenou May 8, 2017
1645faf
Merge branch 'switch_to_vue' into add_transitions
martinRenou May 8, 2017
a05e0ff
Add transitions for the list of applications
martinRenou May 8, 2017
540c214
Fixes #426
martinRenou May 8, 2017
84893cf
Merge branch 'master' into switch_to_vue
martinRenou May 8, 2017
b4fb56a
Merge branch 'switch_to_vue' into add_transitions
martinRenou May 8, 2017
0c5c399
Merge branch 'master' into switch_to_vue
martinRenou May 8, 2017
0c5ab0e
Merge branch 'switch_to_vue' into add_transitions
martinRenou May 8, 2017
ffdea02
Merge branch 'switch_to_vue' into fix_selected_index
martinRenou May 8, 2017
7523ad9
Merge branch 'switch_to_vue' into configurables_components
martinRenou May 8, 2017
b641e98
Renamed resolution_model into ResolutionModel
martinRenou May 8, 2017
1d96bf9
as_config_dict is now a component method
martinRenou May 8, 2017
66aa440
Merge branch 'master' into switch_to_vue
martinRenou May 8, 2017
8e51e49
Merge branch 'switch_to_vue' into configurables_components
martinRenou May 8, 2017
dc43241
Undo last change on the bower.json file
martinRenou May 8, 2017
79ee5f0
Removed component from the ResolutionModel
martinRenou May 8, 2017
825bc1a
Remove useless test dom element
martinRenou May 8, 2017
359b218
Add test
martinRenou May 8, 2017
571c86b
Try to fix selenium tests
martinRenou May 8, 2017
7a2430d
Try to fix selenium tests 2
martinRenou May 8, 2017
c61f65a
Fix selenium tests
martinRenou May 9, 2017
f370924
Fix incompatibility issue
martinRenou May 9, 2017
6ffbbec
Merge pull request #428 from simphony/fix_incompatibility_issue
martinRenou May 9, 2017
b8686d6
Now use dev mode
martinRenou May 9, 2017
f3012aa
Export filters in a seperate file
martinRenou May 9, 2017
479cba6
Add tests for the application list view
martinRenou May 9, 2017
291f564
Export filters in a seperate file
martinRenou May 9, 2017
2adb4d5
Merge branch 'export_filter2' into add_view_tests
martinRenou May 9, 2017
1a8d281
Merge branch 'switch_to_vue' into use_dev_mode
martinRenou May 9, 2017
fed2eca
Merge pull request #422 from simphony/remove_jquery_from_vue
stefanoborini May 9, 2017
2eff7d5
Merge branch 'switch_to_vue' into fix_selected_index
martinRenou May 9, 2017
559e351
Export filters in a seperate file
martinRenou May 9, 2017
4d0bcdf
Merge branch 'use_dev_mode' into export_filter2
martinRenou May 9, 2017
dbc42a7
Merge pull request #431 from simphony/use_dev_mode
stefanoborini May 9, 2017
c85c168
Merge pull request #427 from simphony/fix_selected_index
stefanoborini May 9, 2017
dca24a3
Change filters directory
martinRenou May 10, 2017
15c537e
Merge branch 'switch_to_vue' into add_transitions
martinRenou May 10, 2017
109b522
Merge pull request #433 from simphony/export_filter2
stefanoborini May 10, 2017
940defa
Merge branch 'switch_to_vue' into add_view_tests
martinRenou May 10, 2017
4a26ebc
Fix jstest
martinRenou May 10, 2017
7da2df5
Remove trailing filters file
martinRenou May 10, 2017
0eeec36
Merge branch 'switch_to_vue' into configurables_components
martinRenou May 10, 2017
6b731d1
Reviews
martinRenou May 10, 2017
c12f7e5
Fix tests
martinRenou May 10, 2017
26bc9f4
Undo some changes in the model
martinRenou May 10, 2017
a79b422
Add tests for the model
martinRenou May 10, 2017
50e13f7
Add tests for the application view form
martinRenou May 10, 2017
c0b88f5
Refactor files names
martinRenou May 10, 2017
f454621
Add iframe rendering test
martinRenou May 10, 2017
9a2809b
Add application's description in the start form
martinRenou May 10, 2017
58f8904
Merge pull request #443 from simphony/add_image_description
stefanoborini May 10, 2017
daa9e2b
Use .sync modifier
martinRenou May 10, 2017
b44dcc3
Merge branch 'switch_to_vue' into add_view_tests
martinRenou May 10, 2017
2a4312d
Change url
martinRenou May 10, 2017
5f460bb
Changed check
martinRenou May 10, 2017
eb96180
Remove useless method
martinRenou May 10, 2017
bf6f1fe
Rename variables in controller.js
martinRenou May 11, 2017
543aefd
Change filter names
martinRenou May 11, 2017
505b75e
Renamed all remaining variables
martinRenou May 11, 2017
6dcf0a0
Merge pull request #420 from simphony/configurables_components
martinRenou May 11, 2017
a628f23
Merge pull request #423 from simphony/add_transitions
martinRenou May 11, 2017
c54e6fe
Merge branch 'switch_to_vue' into add_view_tests
martinRenou May 11, 2017
a84e9ec
Fix tests and add some tests
martinRenou May 11, 2017
4fbbd16
Merge branch 'switch_to_vue' into change_naming_convention
martinRenou May 11, 2017
0fb74d7
Renamed configurable attributes
martinRenou May 11, 2017
6f121cb
Undo change when merged to switch_to_vue
martinRenou May 11, 2017
68099ec
Remove white spaces
martinRenou May 11, 2017
a90d862
Merge pull request #436 from simphony/add_view_tests
stefanoborini May 11, 2017
b8a82e9
Merge branch 'switch_to_vue' into change_naming_convention
martinRenou May 11, 2017
0d615b1
Change utils's method names
martinRenou May 11, 2017
ec71436
Compute bounding box without jQuery
martinRenou May 11, 2017
34f87ee
Fix tests
martinRenou May 11, 2017
f402a51
Merge pull request #446 from simphony/change_naming_convention
stefanoborini May 11, 2017
9be0b58
The model now return errors instead of dealing with it
martinRenou May 11, 2017
2f60908
Merge branch 'master' into switch_to_vue
martinRenou May 11, 2017
4e307dd
Merge branch 'switch_to_vue' into remove_old_dialogs
martinRenou May 11, 2017
bf22336
Add dialog
martinRenou May 11, 2017
78704f0
Change confirm dialog so that it doesn't show cancel button if not ca…
martinRenou May 12, 2017
66a6022
Fixed css of the confirm dialog
martinRenou May 12, 2017
a1e7c44
Display error dialog when starting fails
martinRenou May 12, 2017
d0e3282
Remove old dialogs
martinRenou May 12, 2017
0100781
Fix jstests
martinRenou May 12, 2017
13bb7fd
Add error dialog when stopping fails
martinRenou May 12, 2017
808f5b8
Fix import
martinRenou May 12, 2017
706f6c6
Merge pull request #448 from simphony/utils_get_rid_of_jquery
stefanoborini May 12, 2017
334f1dd
Removed useless method
martinRenou May 12, 2017
ea7d110
Changes dialog model
martinRenou May 12, 2017
c90095d
Fix promise issues in the model
martinRenou May 12, 2017
fe6ebe6
Merge pull request #450 from simphony/remove_old_dialogs
stefanoborini May 12, 2017
c355e4a
Fix ModalDialog CSS
martinRenou May 12, 2017
af94db1
Remove transition
martinRenou May 12, 2017
3aa0f37
Add comment
martinRenou May 12, 2017
b19c05e
Change export of the configurables
martinRenou May 12, 2017
d4d1c37
Merge pull request #451 from simphony/last_reviews
stefanoborini May 12, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"datatables.net": "~1.10.12",
"datatables.net-dt": "~1.10.12",
"admin-lte": "~2.3.11",
"handlebars": "~4.0.5",
"underscore": "~1.8.3",
"html5shiv": "~3.7.3",
"respond": "~1.4.2",
Expand Down
1 change: 1 addition & 0 deletions jstests/tests.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<div id="qunit"></div>
<div id="qunit-fixture">
<div id="applist"></div>
<div class="content-wrapper"></div>
</div>
</body>
</html>
94 changes: 94 additions & 0 deletions jstests/tests/home/test_application_list_view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
define([
"home/models",
"home/views/application_list_view",
"components/vue/dist/vue",
"vue/filters"
], function (models, applicationListView, Vue) {
"use strict";

QUnit.module("home.app_list_view");
QUnit.test("rendering list", function (assert) {
var done = assert.async();

var model = new models.ApplicationListModel();
var appListView = new applicationListView.ApplicationListView({
data: function() { return { model: model }; }
}).$mount();

assert.ok(model.loading);
assert.equal(
appListView.$el.querySelector("#loading-spinner").style.display,
""
);

model.update().done(function() { Vue.nextTick(function() {
assert.equal(
appListView.$el.querySelector("#no-app-msg").style.display,
"none"
);
assert.equal(
appListView.$el.querySelector("#loading-spinner").style.display,
"none"
);
assert.equal(
appListView.$el.querySelector("#applistentries").children.length,
model.appList.length
);

done();
})});
});

QUnit.test("rendering nothing in the list", function (assert) {
var done = assert.async();

var model = new models.ApplicationListModel();
var appListView = new applicationListView.ApplicationListView({
data: function() { return { model: model }; }
}).$mount();

model.loading = false;

Vue.nextTick(function() {
assert.equal(
appListView.$el.querySelector("#no-app-msg").style.display,
""
);
assert.equal(
appListView.$el.querySelector("#loading-spinner").style.display,
"none"
);
assert.equal(
appListView.$el.querySelector("#applistentries").children.length,
0
);

done();
});
});

QUnit.test("search form", function (assert) {
var done = assert.async();

var model = new models.ApplicationListModel();
var appListView = new applicationListView.ApplicationListView({
data: function() { return { model: model }; }
}).$mount();

model.update().done(function() { Vue.nextTick(function() {
assert.notEqual(appListView.visibleList.length, 0);

appListView.searchInput = "heho";

Vue.nextTick(function() {
assert.equal(appListView.visibleList.length, 0);
assert.equal(
appListView.$el.querySelector("input[name=q]").value,
"heho"
);

done();
})
})});
});
});
75 changes: 75 additions & 0 deletions jstests/tests/home/test_application_view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
define([
"home/models",
"home/views/application_view",
"components/vue/dist/vue",
"vue/filters"
], function (models, applicationView, Vue) {
"use strict";

QUnit.module("home.app_view");
QUnit.test("rendering form", function (assert) {
var done = assert.async();

var model = new models.ApplicationListModel();
var appView = new applicationView.ApplicationView({
data: function() { return { model: model }; }
}).$mount();

model.update().done(function() { Vue.nextTick(function() {
assert.equal(appView.$el.children[0].tagName, 'DIV');
assert.ok(appView.$el.children[0].classList.contains('row'));

assert.equal(
appView.$el.querySelector('.box-title').innerHTML,
model.appList[0].appData.image.ui_name
);

// Simulate application starting
model.appList[0].status = 'STARTING';

assert.equal(
appView.$el.querySelector('.box-title').innerHTML,
model.appList[0].appData.image.ui_name
);
assert.equal(
appView.$el.querySelector('#app-description').innerHTML,
model.appList[0].appData.image.description
);

done();
})});
});

QUnit.test("rendering iframe", function (assert) {
var done = assert.async();

var model = new models.ApplicationListModel();
var appView = new applicationView.ApplicationView({
data: function() { return { model: model }; }
}).$mount();

model.update().done(function() {
// Simulate application running
model.appList[0].status = 'RUNNING';
model.appList[0].appData.container = {};
model.appList[0].appData.container.url_id = 'https://127.0.0.1:1234/';

Vue.nextTick(function() {
assert.equal(appView.$el.children[0].tagName, 'IFRAME');

// Render form again by selecting the other application which is stopped
model.selectedIndex = 1;

Vue.nextTick(function() {
console.log(model.appList[1].ui_name)
assert.equal(
appView.$el.querySelector('.box-title').innerHTML,
model.appList[1].appData.image.ui_name
);

done();
});
});
});
});
});
29 changes: 14 additions & 15 deletions jstests/tests/home/test_configurables.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@ define([

QUnit.module("home.configurables");
QUnit.test("instantiation", function (assert) {
var resolution_class = configurables.from_tag("resolution");
var resolution = new resolution_class();
assert.equal(resolution.tag, "resolution");
assert.equal(resolution.resolution, "Window");

resolution.resolution = "1024x768";
assert.equal(resolution.as_config_dict().resolution, "1024x768");
var resolutionConf = new configurables.resolution.model();

assert.equal(resolutionConf.tag, "resolution");
assert.deepEqual(resolutionConf.configDict, { resolution: "Window" });
assert.notEqual(resolutionConf.asConfigDict().resolution, "Window");

resolutionConf.configDict = { resolution: '1280x1024' };
assert.equal(resolutionConf.asConfigDict().resolution, '1280x1024');
});

QUnit.test("view", function (assert) {
var resolution_class = configurables.from_tag("resolution");
var resolution = new resolution_class();
var propsData = { configDict: { resolution: "Window" } };
var component = new configurables.resolution.component({propsData: propsData}).$mount();

var view = resolution.view();
assert.notEqual(view.find("select"), null);
assert.equal(view.find("option").length,
resolution.resolution_options.length);
assert.notEqual(component.$el.querySelector("select"), null);
assert.equal(component.$el.querySelector("select").children.length, 5);
});
});
});
18 changes: 11 additions & 7 deletions jstests/tests/home/test_models.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
define([
"home/models"
"home/models"
], function (models) {
"use strict";

QUnit.module("home.models");
QUnit.test("instantiation", function (assert) {
var model = new models.ApplicationListModel();
assert.equal(model.app_data.length, 0);

assert.equal(model.appList.length, 0);
assert.equal(model.selectedIndex, null);

model.update().done(function() {
assert.equal(model.app_data.length, 2);
assert.equal(model.app_data[0].image.configurables[0], "resolution");
assert.notEqual(model.configurables[0].resolution, null);
assert.equal(model.configurables[0].resolution.resolution, "Window");
assert.equal(model.appList.length, 2);
assert.equal(model.selectedIndex, 0);

assert.equal(model.appList[0].appData.image.configurables[0], "resolution");
assert.equal(model.appList[0].configurables[0].configDict.resolution, "Window");
});
});
});
Expand Down
22 changes: 0 additions & 22 deletions jstests/tests/home/test_views.js

This file was deleted.

9 changes: 7 additions & 2 deletions jstests/tests/vue/components/test_ConfirmDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ define([
"jstests/helpers"
], function (Vue, ConfirmDialog, helpers) {
"use strict";

QUnit.module("ConfirmDialog");
QUnit.test("rendering", function (assert) {
assert.equal(helpers.getRenderedText(ConfirmDialog, {
title: "This is the title"
title: "This is the title",
closeCallback: function() {}
}), "This is the title Cancel Ok");

assert.equal(helpers.getRenderedText(ConfirmDialog, {
title: "This is the title"
}), "This is the title Ok");
});
});
14 changes: 6 additions & 8 deletions jstests/testsuite.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
bootstrap: '../components/bootstrap/js/bootstrap.min',
moment: "../components/moment/moment",
"jsapi/v1/resources": "../../../jstests/tests/home/mock_jsapi",
handlebars: "../components/handlebars/handlebars.amd.min",
underscore: "../components/underscore/underscore-min"
},
shim: {
Expand All @@ -19,24 +18,23 @@
}
});

require([
"init",
require([
"tests/home/test_configurables.js",
"tests/home/test_models.js",
"tests/home/test_views.js",
"tests/home/test_application_list_view.js",
"tests/home/test_application_view.js",
"tests/vue/components/test_DataTable.js",
"tests/vue/components/test_ConfirmDialog.js",
"tests/test_utils.js",
"tests/test_analytics.js"
], function(init) {
], function() {
window.apidata = {
base_url: "/",
prefix: "/"
};
init.handlebars();


QUnit.load();
QUnit.start();
});
});
}());

35 changes: 17 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{
"name": "simphony-remote-deps",
"version": "0.0.0",
"description": "SimPhoNy-remote nodejs dependencies",
"author": "Enthought",
"license": "BSD",
"repository": {
"type": "git",
"url": "https://github.com/simphony-remote/simphony-remote.git"
},
"dependencies": {
"bower": "*",
"configurable-http-proxy": "git://github.com/jupyterhub/configurable-http-proxy.git#2.0.1"
},
"devDependencies": {
"jshint": "*",
"node-qunit-phantomjs": "*"
}
"name": "simphony-remote-deps",
"version": "1.2.0",
"description": "SimPhoNy-remote nodejs dependencies",
"author": "Enthought",
"license": "BSD",
"repository": {
"type": "git",
"url": "https://github.com/simphony-remote/simphony-remote.git"
},
"dependencies": {
"bower": "*",
"configurable-http-proxy": "git://github.com/jupyterhub/configurable-http-proxy.git#2.0.1"
},
"devDependencies": {
"jshint": "*",
"node-qunit-phantomjs": "*"
}
}

Loading