Closed
Bug 1100871
Opened 10 years ago
Closed 9 years ago
[Contacts] Improve integration tests for contacts search
Categories
(Firefox OS Graveyard :: Gaia::Contacts, defect)
Firefox OS Graveyard
Gaia::Contacts
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1104139
2.2 S1 (5dec)
People
(Reporter: hola, Assigned: hola)
References
Details
Attachments
(1 file)
Contacts search JS integration tests consist in two tests, one outdated and other skipped. We would have to fix them, and add a new test from unit testing that was testing the connection between the contact list and the search module.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → hola
Assignee | ||
Comment 1•10 years ago
|
||
The two integration tests are already working, but I am not really sure about what does this unit test is testing and how to replicate it with an integration test. The test can't be kept in list_test.js because we already removed every reference to search there, and can't be copied to search_test.js because the test also uses list.js. The test I am talking about is this: test('Search gets updated if contact changes', function(done) { // Search by the first character searchBox.value = contact.name[0]; contacts.Search.search(function search_finished() { assertContactFound(1, contact.uuid); // Keep the first character to have the same search valid contact.givenName[0] = contact.givenName[0] + ' New Name'; sinon.spy(contacts.Search, 'updateSearchList'); subject.refresh(contact, function() { var listStr = document.querySelector('#groups-list').textContent; assert.isTrue(listStr.indexOf(contact.givenName[0]) !== -1); var searchListStr = searchList.textContent; assert.isTrue(searchListStr.indexOf(contact.givenName[0]) !== -1); done(); }); }); }); Is the test relevant yet or can we forget about it?
Flags: needinfo?(jmcf)
Comment 2•10 years ago
|
||
A new integration test should be testing the following: go to search mode, search for a contact, edit such a contact, change the name of the contact in question and check that the contact search view has updated properly.
Flags: needinfo?(jmcf)
Updated•10 years ago
|
Summary: [Contacts] Fix integration tests for contacts search → [Contacts] Improve integration tests for contacts search
Assignee | ||
Comment 3•9 years ago
|
||
The second test is not working right now but it will work after bug 1104139, so I'll ask for review once that one lands.
Assignee | ||
Updated•9 years ago
|
Target Milestone: --- → 2.2 S1 (5dec)
Assignee | ||
Comment 4•9 years ago
|
||
These tests are too closely related to features being developed in bug 1104139 so I will submit the tests together with that bug.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•