Closed Bug 865212 Opened 13 years ago Closed 13 years ago

[Homescreen] Add a test suite for dock and pagination bar

Categories

(Firefox OS Graveyard :: Gaia::Homescreen, defect)

x86
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: crdlc, Assigned: crdlc)

Details

Attachments

(1 file)

No description provided.
Assignee: nobody → crdlc
Status: NEW → ASSIGNED
Attached file Patch v1
Minor improvements in dock test and add a new test suite for pagination bar module
Attachment #741298 - Flags: review?(jmcf)
Summary: Added new test for dock and pagination bar → [Homescreen] Add a test suite for dock and pagination bar
Added a new test suite for dialog request in other file
Added new suite for BookmarkEditor object
Added new test suites for homescreen.js and bookmark objects
I guess that I can say that this bug has been completed. Right now, we can start reviewing the code, thanks Jose
I'm having problems running grid_test.js tests, please could you check, thanks
If there is fails re-open this bug 867064
Comment on attachment 741298 [details] Patch v1 tests up and running thanks!
Attachment #741298 - Flags: review?(jmcf) → review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
The new tests don't run for me...
For me works fine, what problem do you have?
I have only one problem running all tests in my PC x 1 of 2814 tests failed: 1) [communications] Render contact "before each" hook: TypeError: Contacts.getTags is not a function
when running only the homescreen tests : ✖ 3 of 50 tests failed: 1) [homescreen] pagbar.js > Pagination bar > Current page index: 3, total pages: 5 >: Error: TypeError: HomeState is null (http://homescreen.gaiamobile.org:8080/js/grid.js?time=1367492763080:694) at onerror (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4959) 2) [homescreen] pagbar.js > Pagination bar > Adding a new page >: Error: expected false to be true at chaiAssert (http://test-agent.gaiamobile.org:8080/common/test/helper.js:30) at get (http://test-agent.gaiamobile.org:8080/common/vendor/chai/chai.js:374) at isTrue (http://test-agent.gaiamobile.org:8080/common/vendor/chai/chai.js:1367) at (anonymous) (http://homescreen.gaiamobile.org:8080/test/unit/pagbar_test.js:67) at wrapper (http://test-agent.gaiamobile.org:8080/common/test/mocha_generators.js:62) at run (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3709) at runTest (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4081) at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4127) at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4007) at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4016) at next (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3964) at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:3984) at (anonymous) (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4932) 3) [homescreen] pagbar.js > "after all" hook: Node was not found However this works fine when launching only pagbar.js. And indeed it works when launching all the tests, which is strange to me, because the various apps should be sandboxed...
I don't understand why it can happen: 1) All Gaia tests works fine 2) Running only pagbar.js works fine as well 3) Depending the order of unit tests of the homescreen, pagbar_test.js fails or not Sorry but I don't have idea...
And the strangest issue is this [1], pagbar doesn't use neither grid nor HomeState, it is standalone, only require ('homescreen/js/pagbar.js'); and doesn't overwrite the body of the document... [1] 1) [homescreen] pagbar.js > Pagination bar > Current page index: 3, total pages: 5 >: Error: TypeError: HomeState is null (http://homescreen.gaiamobile.org:8080/js/grid.js?time=1367492763080:694) at onerror (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4959)
Yep, I'm quite sure the HomeState issue existed before your tests here, I already saw it. Probably it didn't happen always before because of timing issue, and it always happen now because there is a strange interaction between tests. If the whole test is not failing then there is no urgency and I think I can try to take some time and see why this happens.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: