Squish: Move wizard into plugin

Avoids a soft assert when parsing the wizards without having
the Squish plugin enabled.
As the Squish wizard is using customized wizard generators
that are only available if Squish is loaded we should limit
the presence of the wizard file to this case.

Change-Id: I091c1e429f28b07679245abdc9a638135af84761
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Christian Stenger
2022-09-30 08:37:46 +02:00
parent 1c8a1b9d82
commit c42ae96ba8
3 changed files with 2 additions and 0 deletions

View File

@@ -8,5 +8,6 @@
<file>images/jumpTo@2x.png</file>
<file>images/data.png</file>
<file>images/data@2x.png</file>
<file>wizard/wizard.json</file>
</qresource>
</RCC>

View File

@@ -105,6 +105,7 @@ void SquishPluginPrivate::initializeMenuEntries()
bool SquishPlugin::initialize(const QStringList &, QString *)
{
dd = new SquishPluginPrivate;
ProjectExplorer::JsonWizardFactory::addWizardPath(":/squish/wizard/");
return true;
}

View File

@@ -0,0 +1,107 @@
{
"version": 1,
"supportedProjectTypes": [ "Squish" ],
"id": "S.SquishTestSuite",
"category": "T.Squish",
"trDescription": "Creates a new Squish test suite.",
"trDisplayName": "Squish Test Suite",
"trDisplayCategory": "Squish",
"iconText": "STS",
"enabled": "%{JS: value('Plugins').indexOf('Squish') >= 0}",
"options":
[
{
"key": "SquishSuiteName",
"value": "%{JS: '%{SuiteName}'.startsWith('suite_') ? '%{SuiteName}' : 'suite_%{SuiteName}'}"
},
{
"key": "TargetPath",
"value": "%{Path}/%{SquishSuiteName}"
},
{
"key": "AUT",
"value": "%{ChosenAUT}"
},
{
"key": "Language",
"value": "%{ChosenLanguage}"
},
{
"key": "Toolkit",
"value": "%{ChosenToolkit}"
}
],
"pages":
[
{
"trDisplayName": "Location",
"trShortTitle": "Location",
"trSubTitle": "Specify name of the Test suite and directory where to create the Squish test suite.",
"typeId": "Fields",
"data" :
[
{
"name": "SuiteName",
"trDisplayName": "Test Suite Name:",
"type": "LineEdit"
},
{
"name": "Path",
"trDisplayName": "Test Suite folder's parent folder:",
"type": "PathChooser",
"data":
{
"kind": "existingDirectory",
"basePath": "%{InitialPath}",
"path": "%{InitialPath}"
}
}
]
},
{
"trDisplayName": "Setup",
"trShortTitle": "Setup",
"trSubTitle": "Choose the GUI toolkit used by the application you want to create Squish Test Suite for.",
"typeId": "SquishToolkits",
"data": {}
},
{
"trDisplayName": "Script Language",
"trShortTitle": "Language",
"trSubTitle": "Choose the scripting language to be used for the Test Suite's test scripts.",
"typeId": "SquishScriptLanguage",
"data": {}
},
{
"trDisplayName": "Application Under Test",
"trShortTitle": "AUT",
"trSubTitle": "Choose the application (AUT) that you want this Test Suite to test.",
"typeId": "SquishAUT",
"data": {}
},
{
"trDisplayName": "Summary",
"trShortTitle": "Summary",
"typeId": "Summary",
"data":
{
"hideProjectUi": true
}
}
],
"generators":
[
{
"typeId": "SquishSuiteGenerator",
"data": {
"mode": "TestSuite",
"aut": "%{AUT}",
"language": "%{Language}",
"toolkit": "%{Toolkit}"
}
}
]
}