Merge lp:~hatch/juju-gui/ci-fixes into lp:juju-gui/experimental

Proposed by Jeff Pihach
Status: Merged
Merged at revision: 649
Proposed branch: lp:~hatch/juju-gui/ci-fixes
Merge into: lp:juju-gui/experimental
Diff against target: 59 lines (+8/-7)
2 files modified
test/test_fakebackend.js (+0/-1)
test/test_resizing_textarea.js (+8/-6)
To merge this branch: bzr merge lp:~hatch/juju-gui/ci-fixes
Reviewer Review Type Date Requested Status
Juju GUI Hackers Pending
Review via email: mp+162533@code.launchpad.net

Description of the change

CI Fixes

Implements workaround for cross browser textarea
height offset issues and removes the shortened
timeout on the import tests

https://codereview.appspot.com/9204044/

To post a comment you must log in.
Revision history for this message
Jeff Pihach (hatch) wrote :

Reviewers: mp+162533_code.launchpad.net,

Message:
Please take a look.

Description:
CI Fixes

Implements workaround for cross browser textarea
height offset issues and removes the shortened
timeout on the import tests

https://code.launchpad.net/~hatch/juju-gui/ci-fixes/+merge/162533

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/9204044/

Affected files:
   A [revision details]
   M test/test_fakebackend.js
   M test/test_resizing_textarea.js

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>

Index: test/test_fakebackend.js
=== modified file 'test/test_fakebackend.js'
--- test/test_fakebackend.js 2013-05-02 18:56:43 +0000
+++ test/test_fakebackend.js 2013-05-05 16:38:39 +0000
@@ -287,7 +287,6 @@
      });

      describe('FakeBackend.importEnvironment', function(done) {
- this.timeout(300);

        it('rejects unauthenticated calls', function(done) {
          fakebackend.logout();

Index: test/test_resizing_textarea.js
=== modified file 'test/test_resizing_textarea.js'
--- test/test_resizing_textarea.js 2013-05-02 21:14:35 +0000
+++ test/test_resizing_textarea.js 2013-05-05 16:38:39 +0000
@@ -10,7 +10,7 @@

  describe('textarea autosize plugin', function() {

- var Y, test_text, container, textarea, target, target2, ie_fudge;
+ var Y, test_text, container, textarea, target, target2, kludge;

    before(function(done) {
      Y = YUI(GlobalConfig).use([
@@ -31,11 +31,13 @@

        // XXX: BradCrittenden 2013-05-02 bug=1175781: This work-around
        // is just temporary. The root cause needs to be found and fixed.
- ie_fudge = 0;
- if (Y.UA.ie === 10) {
+ // The test check properties are inverted and will need to be fixed.
+ kludge = 0;
+ if (Y.UA.ie === 10 || Y.UA.gecko) {
          // IE10 Computes sizes wrong.
- ie_fudge = 6;
+ kludge = 6;
        }
+
        done();
      });
    });
@@ -73,7 +75,7 @@
     *
     */
    function get_height(target) {
- return clean_size(target.getComputedStyle('height')) + ie_fudge;
+ return clean_size(target.getComputedStyle('height')) + kludge;
    }

    /**
@@ -235,7 +237,7 @@
      });

      target.show();
- var current_height = get_height(target) - ie_fudge;
+ var current_height = get_height(target) - kludge;
      assert.equal(300, current_height,
          'The height should start out at 300px per the min_height cfg');
    });

Revision history for this message
Gary Poster (gary) wrote :

Don't really understand the timeout, but I'll take it for now, assuming
Ben will fix later. Thank you very much! LGTM and land unless someone
objects soon. :-)

https://codereview.appspot.com/9204044/

Revision history for this message
Jeff Pihach (hatch) wrote :

*** Submitted:

CI Fixes

Implements workaround for cross browser textarea
height offset issues and removes the shortened
timeout on the import tests

R=gary.poster
CC=
https://codereview.appspot.com/9204044

https://codereview.appspot.com/9204044/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'test/test_fakebackend.js'
2--- test/test_fakebackend.js 2013-05-02 18:56:43 +0000
3+++ test/test_fakebackend.js 2013-05-05 16:43:27 +0000
4@@ -287,7 +287,6 @@
5 });
6
7 describe('FakeBackend.importEnvironment', function(done) {
8- this.timeout(300);
9
10 it('rejects unauthenticated calls', function(done) {
11 fakebackend.logout();
12
13=== modified file 'test/test_resizing_textarea.js'
14--- test/test_resizing_textarea.js 2013-05-02 21:14:35 +0000
15+++ test/test_resizing_textarea.js 2013-05-05 16:43:27 +0000
16@@ -10,7 +10,7 @@
17
18 describe('textarea autosize plugin', function() {
19
20- var Y, test_text, container, textarea, target, target2, ie_fudge;
21+ var Y, test_text, container, textarea, target, target2, kludge;
22
23 before(function(done) {
24 Y = YUI(GlobalConfig).use([
25@@ -31,11 +31,13 @@
26
27 // XXX: BradCrittenden 2013-05-02 bug=1175781: This work-around
28 // is just temporary. The root cause needs to be found and fixed.
29- ie_fudge = 0;
30- if (Y.UA.ie === 10) {
31+ // The test check properties are inverted and will need to be fixed.
32+ kludge = 0;
33+ if (Y.UA.ie === 10 || Y.UA.gecko) {
34 // IE10 Computes sizes wrong.
35- ie_fudge = 6;
36+ kludge = 6;
37 }
38+
39 done();
40 });
41 });
42@@ -73,7 +75,7 @@
43 *
44 */
45 function get_height(target) {
46- return clean_size(target.getComputedStyle('height')) + ie_fudge;
47+ return clean_size(target.getComputedStyle('height')) + kludge;
48 }
49
50 /**
51@@ -235,7 +237,7 @@
52 });
53
54 target.show();
55- var current_height = get_height(target) - ie_fudge;
56+ var current_height = get_height(target) - kludge;
57 assert.equal(300, current_height,
58 'The height should start out at 300px per the min_height cfg');
59 });

Subscribers

People subscribed via source and target branches