Test output of GCLI addon command

RESOLVED FIXED in Firefox 24

Status

RESOLVED FIXED
7 years ago
3 months ago

People

(Reporter: miker, Assigned: miker)

Tracking

unspecified
Firefox 24
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Joe wants us to extract some of the nested functions up a level.
  exec: function(args, context) {
    function foo() {
    }

    foo();
  }

Can be re-written:

  exec: function(args, context) {
    this.foo();
  },
  foo: function() {
  }
We should also back-fill some unit tests.
I've added some which I'll send you.
Summary: Polish needed in GCLI addons command → Polish needed in GCLI addons command and some extra unit tests needed
Created attachment 641453 [details] [diff] [review]
Patch v1

I have moved functions back a level where they are not shared. I have also sorted the addon autocomplete list.
Attachment #641453 - Flags: review?(jwalker)
Comment on attachment 641453 [details] [diff] [review]
Patch v1

Review of attachment 641453 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. I think we could also add tests that do:

>> addon list
  // check for the default addon

>> addon list theme
  // not there
  // perhaps repeat this for all the addon types. It's easy cut and paste code anyway

>> addon disable Default

>> addon list
  // Can we easily check it's disabled?

>> addon enable Default
  // Can we easily check it's enabled?
Created attachment 641497 [details] [diff] [review]
v2

The tests fail because outputMatch cannot be checked when a command is async. Joe said that I should write tests that should work and he will fix the testing framework.
Attachment #641497 - Flags: review?(jwalker)
Created separate bug for async test issues (bug 773313)
For some strange reason I can't r+ v2. However consider it r+ed.
Attachment #641497 - Flags: review?(jwalker) → review+
Whiteboard: [gclicommands] → [gclicommands][review+]
This is in need of an un-bitrot, and maybe we could convert to helpers.check while we're at it.
New component triage. Filter on "Lobster Thermidor aux crevettes with a Mornay sauce"
Component: Developer Tools → Developer Tools: Graphic Commandline and Toolbar
Most of this has already been tidied / fixed as parts of other bugs.

The tests can now check results though so I will add that.
Assignee: nobody → mratcliffe
Status: NEW → ASSIGNED
Whiteboard: [gclicommands][review+] → [gclicommands]
Created attachment 754786 [details] [diff] [review]
Test addon command output

So, we now test the output of the addon command.

Try:
https://tbpl.mozilla.org/?tree=Try&rev=a7ad1b01aaf6
Attachment #641453 - Attachment is obsolete: true
Attachment #641497 - Attachment is obsolete: true
Attachment #754786 - Flags: review?(jwalker)
Updating bug title
Summary: Polish needed in GCLI addons command and some extra unit tests needed → Test output of GCLI addon command
Whiteboard: [gclicommands] → [gclicommands][has-patch]
Attachment #754786 - Flags: review?(jwalker) → review+
Whiteboard: [gclicommands][has-patch] → [land-in-fx-team]
https://hg.mozilla.org/integration/fx-team/rev/16984bcc47ee
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/16984bcc47ee
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 24

Updated

6 months ago
Product: Firefox → DevTools

Updated

3 months ago
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.