summaryrefslogtreecommitdiffstats
path: root/settings/tests
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-05-20 13:43:20 +0200
committerVincent Petry <pvince81@owncloud.com>2015-05-20 13:43:20 +0200
commit66e426c9904b7ccb73fbf87a62b55feae6a672e6 (patch)
treea8118d209ccc9a5e206ba403236fe9f4b768a7e0 /settings/tests
parent3a4568313fdc55b07e9bda0937c3a179f78d1af9 (diff)
downloadnextcloud-server-66e426c9904b7ccb73fbf87a62b55feae6a672e6.tar.gz
nextcloud-server-66e426c9904b7ccb73fbf87a62b55feae6a672e6.zip
Sort apps by level, then by name
Also properly initialize the level to 0 when no level was returned
Diffstat (limited to 'settings/tests')
-rw-r--r--settings/tests/js/appsSpec.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/settings/tests/js/appsSpec.js b/settings/tests/js/appsSpec.js
index 311fade2c66..60e3692def4 100644
--- a/settings/tests/js/appsSpec.js
+++ b/settings/tests/js/appsSpec.js
@@ -130,14 +130,26 @@ describe('OC.Settings.Apps tests', function() {
apps: [
{
id: 'foo',
+ name: 'Foo app',
level: 0
},
{
id: 'alpha',
+ name: 'Alpha app',
level: 300
},
{
+ id: 'nolevel',
+ name: 'No level'
+ },
+ {
+ id: 'zork',
+ name: 'Some famous adventure game',
+ level: 200
+ },
+ {
id: 'delta',
+ name: 'Mathematical symbol',
level: 200
}
]
@@ -145,10 +157,8 @@ describe('OC.Settings.Apps tests', function() {
);
var results = getResultsFromDom();
- expect(results.length).toEqual(3);
- expect(results[0]).toEqual('alpha');
- expect(results[1]).toEqual('delta');
- expect(results[2]).toEqual('foo');
+ expect(results.length).toEqual(5);
+ expect(results).toEqual(['alpha', 'delta', 'zork', 'foo', 'nolevel']);
});
});