123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620 |
- define(["amber/boot", "require", "helios/Helios-Commands-Tools"], function($boot,requirejs){"use strict";
- var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
- var $pkg = $core.addPackage("Helios-Commands-SUnit");
- $pkg.transport = {"type":"amd","amdNamespace":"helios"};
- $core.addClass("HLSUnitCommand", $globals.HLToolCommand, "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitCommand.comment="I group the commands pertaining to Helios-SUnit (`HLSUnitModel`)";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "isValidFor:",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: ["aModel"],
- source: "isValidFor: aModel\x0a\x09^ aModel isKindOf: HLSUnitModel",
- referencedClasses: ["HLSUnitModel"],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["isKindOf:"]
- }, function ($methodClass){ return function (aModel){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv(aModel)._isKindOf_($globals.HLSUnitModel);
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isValidFor:",{aModel:aModel})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.HLSUnitCommand.a$cls);
- $core.addClass("HLSUnitInvertSelectedCommand", $globals.HLSUnitCommand, "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitInvertSelectedCommand.comment="I group the commands that invert selections";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'i'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "i";
- }; }),
- $globals.HLSUnitInvertSelectedCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^'Invert selection'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "Invert selection";
- }; }),
- $globals.HLSUnitInvertSelectedCommand.a$cls);
- $core.addClass("HLSUnitInvertSelectedClassesCommand", $globals.HLSUnitInvertSelectedCommand, "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitInvertSelectedClassesCommand.comment="Invert the currently selected classes on a `HLSUnitModel`";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "category",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "category\x0a\x09^'Classes'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "Classes";
- }; }),
- $globals.HLSUnitInvertSelectedClassesCommand);
- $core.addMethod(
- $core.method({
- selector: "execute",
- protocol: "executing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09self model invertSelectedClasses",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["invertSelectedClasses", "model"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv($self._model())._invertSelectedClasses();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.HLSUnitInvertSelectedClassesCommand);
- $core.addMethod(
- $core.method({
- selector: "isActive",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isActive\x0a\x09^model selectedPackages notEmpty",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["notEmpty", "selectedPackages"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($recv($self.model)._selectedPackages())._notEmpty();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isActive",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.HLSUnitInvertSelectedClassesCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'c'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "c";
- }; }),
- $globals.HLSUnitInvertSelectedClassesCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Invert selected classes'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "Invert selected classes";
- }; }),
- $globals.HLSUnitInvertSelectedClassesCommand.a$cls);
- $core.addClass("HLSUnitInvertSelectedPackagesCommand", $globals.HLSUnitInvertSelectedCommand, "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitInvertSelectedPackagesCommand.comment="Invert the currently selected packages on a `HLSUnitModel`";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "category",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "category\x0a\x09^'Packages'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "Packages";
- }; }),
- $globals.HLSUnitInvertSelectedPackagesCommand);
- $core.addMethod(
- $core.method({
- selector: "execute",
- protocol: "executing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09self model invertSelectedPackages",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["invertSelectedPackages", "model"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv($self._model())._invertSelectedPackages();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.HLSUnitInvertSelectedPackagesCommand);
- $core.addMethod(
- $core.method({
- selector: "isActive",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isActive\x0a\x09^true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return true;
- }; }),
- $globals.HLSUnitInvertSelectedPackagesCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'p'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "p";
- }; }),
- $globals.HLSUnitInvertSelectedPackagesCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Invert selected packages'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "Invert selected packages";
- }; }),
- $globals.HLSUnitInvertSelectedPackagesCommand.a$cls);
- $core.addClass("HLSUnitRunTests", $globals.HLSUnitCommand, "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitRunTests.comment="Run the test cases in the currently selected classes on a `HLSUnitModel`";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "execute",
- protocol: "executing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09self model runTests",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["runTests", "model"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv($self._model())._runTests();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.HLSUnitRunTests);
- $core.addMethod(
- $core.method({
- selector: "isActive",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isActive\x0a\x09^true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return true;
- }; }),
- $globals.HLSUnitRunTests);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^'r'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "r";
- }; }),
- $globals.HLSUnitRunTests.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^'Run Tests'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "Run Tests";
- }; }),
- $globals.HLSUnitRunTests.a$cls);
- $core.addClass("HLSUnitSelectAllCommand", $globals.HLSUnitCommand, "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitSelectAllCommand.comment="I group the select all commands";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'a'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "a";
- }; }),
- $globals.HLSUnitSelectAllCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Select all'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "Select all";
- }; }),
- $globals.HLSUnitSelectAllCommand.a$cls);
- $core.addClass("HLSUnitSelectAllClassesCommand", $globals.HLSUnitSelectAllCommand, "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitSelectAllClassesCommand.comment="Select all available test classes based on what packages are selected on a `HLSUnitModel`";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "category",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "category\x0a\x09^'Classes'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "Classes";
- }; }),
- $globals.HLSUnitSelectAllClassesCommand);
- $core.addMethod(
- $core.method({
- selector: "execute",
- protocol: "executing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09self model selectAllClasses",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["selectAllClasses", "model"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv($self._model())._selectAllClasses();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.HLSUnitSelectAllClassesCommand);
- $core.addMethod(
- $core.method({
- selector: "isActive",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isActive\x0a\x09^model selectedPackages notEmpty",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["notEmpty", "selectedPackages"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- return $recv($recv($self.model)._selectedPackages())._notEmpty();
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"isActive",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.HLSUnitSelectAllClassesCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'c'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "c";
- }; }),
- $globals.HLSUnitSelectAllClassesCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Select all classes'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "Select all classes";
- }; }),
- $globals.HLSUnitSelectAllClassesCommand.a$cls);
- $core.addClass("HLSUnitSelectAllPackagesCommand", $globals.HLSUnitSelectAllCommand, "Helios-Commands-SUnit");
- //>>excludeStart("ide", pragmas.excludeIdeData);
- $globals.HLSUnitSelectAllPackagesCommand.comment="Select all packages with test cases on a `HLSUnitModel`";
- //>>excludeEnd("ide");
- $core.addMethod(
- $core.method({
- selector: "category",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "category\x0a\x09^'Packages'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "Packages";
- }; }),
- $globals.HLSUnitSelectAllPackagesCommand);
- $core.addMethod(
- $core.method({
- selector: "execute",
- protocol: "executing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "execute\x0a\x09self model selectAllPackages",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: ["selectAllPackages", "model"]
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- return $core.withContext(function($ctx1) {
- //>>excludeEnd("ctx");
- $recv($self._model())._selectAllPackages();
- return self;
- //>>excludeStart("ctx", pragmas.excludeDebugContexts);
- }, function($ctx1) {$ctx1.fill(self,"execute",{})});
- //>>excludeEnd("ctx");
- }; }),
- $globals.HLSUnitSelectAllPackagesCommand);
- $core.addMethod(
- $core.method({
- selector: "isActive",
- protocol: "testing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "isActive\x0a\x09^true",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return true;
- }; }),
- $globals.HLSUnitSelectAllPackagesCommand);
- $core.addMethod(
- $core.method({
- selector: "key",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "key\x0a\x09^ 'p'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "p";
- }; }),
- $globals.HLSUnitSelectAllPackagesCommand.a$cls);
- $core.addMethod(
- $core.method({
- selector: "label",
- protocol: "accessing",
- //>>excludeStart("ide", pragmas.excludeIdeData);
- args: [],
- source: "label\x0a\x09^ 'Select all packages'",
- referencedClasses: [],
- //>>excludeEnd("ide");
- pragmas: [],
- messageSends: []
- }, function ($methodClass){ return function (){
- var self=this,$self=this;
- return "Select all packages";
- }; }),
- $globals.HLSUnitSelectAllPackagesCommand.a$cls);
- });
|