summaryrefslogtreecommitdiffstats
path: root/apps/files/tests
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-02-27 13:30:07 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-02-28 15:03:26 +0100
commit29c924f74b692a496606af1759f14d02c5dee9cc (patch)
tree3b4057199c361203196c6881d69c10c21f425ab3 /apps/files/tests
parentacdf091f8463aadadd92be037e64102d2c8cf34c (diff)
downloadnextcloud-server-29c924f74b692a496606af1759f14d02c5dee9cc.tar.gz
nextcloud-server-29c924f74b692a496606af1759f14d02c5dee9cc.zip
Use hard-coded values for paddings and margins
This ensures that the resize tests do not depend on the values set in the CSS files. Note that this change causes a test to fail with Firefox, but not with PhantomJS. This is due to a difference in the starting width used by Firefox and by PhantomJS, and it will be fixed in a following commit. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'apps/files/tests')
-rw-r--r--apps/files/tests/js/breadcrumbSpec.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files/tests/js/breadcrumbSpec.js b/apps/files/tests/js/breadcrumbSpec.js
index 392d4bf3fe1..b1fd8d11769 100644
--- a/apps/files/tests/js/breadcrumbSpec.js
+++ b/apps/files/tests/js/breadcrumbSpec.js
@@ -236,7 +236,7 @@ describe('OCA.Files.BreadCrumb tests', function() {
});
describe('Resizing', function() {
- var bc, dummyDir, widths;
+ var bc, dummyDir, widths, paddings, margins;
// cit() will skip tests if running on PhantomJS because it does not
// have proper support for flexboxes.
@@ -261,9 +261,15 @@ describe('OCA.Files.BreadCrumb tests', function() {
// results on different browsers due to font engine differences
// 51px is default size for menu and home
widths = [51, 51, 106, 112, 160, 257, 251, 91];
+ // using hard-coded paddings and margins to avoid depending on the
+ // current CSS values used in the server
+ paddings = [0, 0, 0, 0, 0, 0, 0, 0];
+ margins = [0, 0, 0, 0, 0, 0, 0, 0];
$('div.crumb').each(function(index){
$(this).css('width', widths[index]);
+ $(this).css('padding', paddings[index]);
+ $(this).css('margin', margins[index]);
});
});
afterEach(function() {