Closed Bug 1220742 Opened 9 years ago Closed 6 years ago

test_marketplace_addon.py : TypeError: 'bool' object has no attribute '__getitem__'

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: MaxIvanov, Unassigned)

Details

Attachments

(2 files)

Description: Test case fails with "TypeError". 

Steps:
1. Update a flame device to 20151102030250
2. Run this test case http://lxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/tests/functional/marketplace/test_marketplace_addon.py

Actual result:
"TypeError"

Expected result:
Test completes successfully.

Repro Rate: Reproduced via Jenkins adhoc (0/5 passing)
http://jenkins1.qa.scl3.mozilla.com/job/flame-kk.ui.adhoc.bitbar/323/HTML_Report/

Traceback (most recent call last):
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/.env/lib/python2.7/site-packages/marionette_client-1.0.0-py2.7.egg/marionette/marionette_test.py", line 296, in run
testMethod()
File "/var/lib/jenkins/jobs/flame-kk.ui.adhoc.bitbar/workspace/tests/python/gaia-ui-tests/gaiatest/tests/functional/marketplace/test_marketplace_addon.py", line 78, in test_search_and_install_app
self.assertEquals(self.apps.is_app_installed(addon_details.affected_apps)['name'], 'System')
TypeError: 'bool' object has no attribute '__getitem__'
Attached image index.png
Assignee: nobody → martijn.martijn
The problem here is that Affected Apps now says:
"This add-on does not affect any installed apps."
Where it used to say that the System app was affected (which is correct).

Mathieu, do you know this is a bug? Or is this intended behavior?
Flags: needinfo?(mpillard)
This looks like a bug: my add-on modifies the system app. I don't remember if I ever saw this correctly say "System" or something similar though.
Flags: needinfo?(mpillard)
Yes, this used to work. That's why this Gaia UI test is failing now, because it expects the System app as the affected app.
Fred, do you perhaps know what might have affected this?
Assignee: martijn.martijn → nobody
Component: Gaia::UI Tests → Gaia::Settings
Flags: needinfo?(gasolin)
I have no idea, maybe yura knows addon better
Flags: needinfo?(gasolin) → needinfo?(yzenevich)
Please see this two bugs: bug 1218282 and bug 1217741. The way calculate affected apps depends on matches listed in the content_scripts that the add-on specifies. We changed the location from which we read content scripts recently (the above 2 bugs). That field is now copied into add-on's manifest file so we would not have to read manifest.json. Hope this helps.
Flags: needinfo?(yzenevich)
Thanks, those bugs were fixed by you and Mathieu.
So I guess this is Mathieu's call. Do you think this is a genuine bug or should I change the test here?
Flags: needinfo?(mpillard)
Per comment 3 and 4, the add-on setting page should display that my add-on modifies the system app, so that's a bug.
Flags: needinfo?(mpillard)
Attachment #8683151 - Flags: review?(npark)
Attachment #8683151 - Flags: review?(jlorenzo)
(In reply to Autolander from comment #9)
> Created attachment 8683151 [details] [review]
> [gaia] mwargers:1220742 > mozilla-b2g:master

This disables that part of the test, so the test will pass again. We can re-enable that part again as soon as this bug is fixed.
Comment on attachment 8683151 [details] [review]
[gaia] mwargers:1220742 > mozilla-b2g:master

OK to comment out this assertion, for now.
Attachment #8683151 - Flags: review?(jlorenzo) → review+
Attachment #8683151 - Flags: review?(npark) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Fred, you marked this bug as fixed. Does that mean, we can re-enable the part of the test that I enabled? Where was it fixed by any chance?
Flags: needinfo?(gasolin)
Ooh I saw the last comment is about merge code, so I think its fixed.

And all gip test cases are migrated to gij, so instead of .py test, we'd need .js test now?
Flags: needinfo?(gasolin)
(In reply to Fred Lin [:gasolin] from comment #14)
> Ooh I saw the last comment is about merge code, so I think its fixed.

Comment 12 is about commenting out some test code, so the test doesn't fail consistently on this bug. We still need someone to fix this.

> And all gip test cases are migrated to gij, so instead of .py test, we'd
> need .js test now?

Yes, although this is making use of an external site, so this would never run as part of Treeherder tier 1 anyway.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Firefox OS is not being worked on
Status: REOPENED → RESOLVED
Closed: 8 years ago6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: