aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-12-29 10:59:49 +0100
committerGitHub <noreply@github.com>2020-12-29 10:59:49 +0100
commit50d5229c956882d61e04c91f906ad780e11139ca (patch)
treeb1be245c3e61a1ca26344d27bd8f374141134b1b /core
parent083f3d23737b99fafec87c64df99e9c09cde71c7 (diff)
parentbe38b924d1facd88f69c265106f66393fb213f1c (diff)
downloadnextcloud-server-50d5229c956882d61e04c91f906ad780e11139ca.tar.gz
nextcloud-server-50d5229c956882d61e04c91f906ad780e11139ca.zip
Merge pull request #24872 from nextcloud/tests/jsunit-chromium
Run jsunit with chromium/puppeteer
Diffstat (limited to 'core')
-rw-r--r--core/js/core.json9
-rw-r--r--core/js/tests/specHelper.js1
-rw-r--r--core/js/tests/specs/jquery.avatarSpec.js16
3 files changed, 9 insertions, 17 deletions
diff --git a/core/js/core.json b/core/js/core.json
index b25c260ab9f..9ea17f2ac5e 100644
--- a/core/js/core.json
+++ b/core/js/core.json
@@ -2,15 +2,6 @@
"libraries": [
],
"modules": [
- "share.js",
- "sharetemplates.js",
- "sharesocialmanager.js",
- "shareconfigmodel.js",
- "shareitemmodel.js",
- "sharedialogview.js",
- "sharedialoglinkshareview.js",
- "sharedialogresharerinfoview.js",
- "sharedialogshareelistview.js",
"public/publicpage.js",
"setupchecks.js",
"mimetype.js",
diff --git a/core/js/tests/specHelper.js b/core/js/tests/specHelper.js
index 72d42dfc58a..d8ac35f827d 100644
--- a/core/js/tests/specHelper.js
+++ b/core/js/tests/specHelper.js
@@ -117,6 +117,7 @@ window.Snap.prototype = {
};
window.isPhantom = /phantom/i.test(navigator.userAgent);
+document.documentElement.lang = navigator.language;
// global setup for all tests
(function setupTests() {
diff --git a/core/js/tests/specs/jquery.avatarSpec.js b/core/js/tests/specs/jquery.avatarSpec.js
index 4e13b7f26ff..420c72d2e9b 100644
--- a/core/js/tests/specs/jquery.avatarSpec.js
+++ b/core/js/tests/specs/jquery.avatarSpec.js
@@ -38,8 +38,8 @@ describe('jquery.avatar tests', function() {
it('undefined', function() {
$div.avatar('foo');
- expect($div.height()).toEqual(64);
- expect($div.width()).toEqual(64);
+ expect(Math.round($div.height())).toEqual(64);
+ expect(Math.round($div.width())).toEqual(64);
});
it('undefined but div has height', function() {
@@ -49,8 +49,8 @@ describe('jquery.avatar tests', function() {
expect(window.Image).toHaveBeenCalled();
window.Image().onerror();
- expect($div.height()).toEqual(9);
- expect($div.width()).toEqual(9);
+ expect(Math.round($div.height())).toEqual(9);
+ expect(Math.round($div.width())).toEqual(9);
});
it('undefined but data size is set', function() {
@@ -60,8 +60,8 @@ describe('jquery.avatar tests', function() {
expect(window.Image).toHaveBeenCalled();
window.Image().onerror();
- expect($div.height()).toEqual(10);
- expect($div.width()).toEqual(10);
+ expect(Math.round($div.height())).toEqual(10);
+ expect(Math.round($div.width())).toEqual(10);
});
@@ -71,8 +71,8 @@ describe('jquery.avatar tests', function() {
expect(window.Image).toHaveBeenCalled();
window.Image().onerror();
- expect($div.height()).toEqual(8);
- expect($div.width()).toEqual(8);
+ expect(Math.round($div.height())).toEqual(8);
+ expect(Math.round($div.width())).toEqual(8);
});
});