Bug 1617540 Comment 5 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

1. Sorry I wasn't clear enough

so let's assume we have the autocomplete popup displaying  3 items `a`, `b` and `c`

- `hasPopupLabels(popup, ["a", "b"])` will return `true`, as both `a` and `b` are included
- `hasPopupLabels(popup, ["a", "b"], true)` will return false, as the expected array does not have `c`

we could derivate 2 functions from that:

- `hasExactPopupLabel(popup, expected)` which would call `hasPopupLabels(popup, expected, true)`
- `hasPopupLabel(popup, str)` which would call `hasPopupLabels(popup, [str])`


2. yes, this should go into `head.js`. Ideally we could put it just below the function we have to retrieve the popup labels

3. yes, we should update the tests to use this new function(s) as it will indicate us they're working

let me know if you still have questions :)
1. Sorry I wasn't clear enough

so let's assume we have the autocomplete popup displaying  3 items `a`, `b` and `c`

- `hasPopupLabels(popup, ["a", "b"])` will return `true`, as both `a` and `b` are included
- `hasPopupLabels(popup, ["a", "b"], true)` will return false, as the expected array does not have `c`

we could derivate 2 functions from that:

- `hasExactPopupLabels(popup, expected)` which would call `hasPopupLabels(popup, expected, true)`
- `hasPopupLabel(popup, str)` which would call `hasPopupLabels(popup, [str])`


2. yes, this should go into `head.js`. Ideally we could put it just below the function we have to retrieve the popup labels

3. yes, we should update the tests to use this new function(s) as it will indicate us they're working

let me know if you still have questions :)

Back to Bug 1617540 Comment 5