Cover the call_screen.js with units tests

RESOLVED FIXED

Status

Firefox OS
Gaia::Dialer
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: etienne, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
The soon to be in it's own file CallScreen component (see bug 902983) needs unit tests.

It's a nice singleton so it should be pretty straightforward even if there is a bit of dom manipulation.
|telephony_helper_test.js| will probably be a great source of inspiration.
(Reporter)

Updated

5 years ago
Blocks: 902980
Depends on: 902983
(Reporter)

Comment 1

5 years ago
Gabriele, you mentioned some interest in adding unit tests to the dialer, ping me if you want to take this bug, glad to help!
Yes I would like to add some tests related to the CDMA call waiting functionality (bug 882980) which is somewhat orthogonal to GSM call waiting and introduces some fairly subtle changes. I'll try to land the changes first because they've been a pretty thorny issue and then I'd like to come back and add the tests.
(Reporter)

Comment 3

5 years ago
Quick update: the call_screen_test.js file now exists. New features are covered.

But this bug is still valid since someone need to do a pass and add all the missing ones.

After discussing this with Rik, we should also switch from binding everything at evaluation to having a (tested) init method. Should make things a log cleaner.
(Reporter)

Comment 4

5 years ago
Calling this one fixed :)
At this point we would clearly require any CallScreen change to come with a test, so mission accomplished.

https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/dialer/test/unit/call_screen_test.js
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.