# -*- coding: utf-8 -*-
# $Id$
"""
Test Manager WUI - Test Cases.
"""
__copyright__ = \
"""
Copyright (C) 2012-2014 Oracle Corporation
This file is part of VirtualBox Open Source Edition (OSE), as
available from http://www.virtualbox.org. This file is free software;
General Public License (GPL) as published by the Free Software
Foundation, in version 2 as it comes in the "COPYING" file of the
VirtualBox OSE distribution. VirtualBox OSE is distributed in the
hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
The contents of this file may alternatively be used under the terms
of the Common Development and Distribution License Version 1.0
(CDDL) only, as it comes in the "COPYING.CDDL" file of the
VirtualBox OSE distribution, in which case the provisions of the
CDDL are applicable instead of those of the GPL.
You may elect to license modified versions of this file under the
terms and conditions of either the GPL or the CDDL or both.
"""
# Validation Kit imports.
from testmanager.webui.wuicontentbase import WuiFormContentBase, WuiListContentBase, WuiTmLink, WuiRawHtml;
"""
WUI test case list content generator.
"""
self._asColumnHeaders = \
[
'Name', 'Active', 'Default Timeout', 'Base Command / Variations', 'Validation Kit Files',
'Test Case Prereqs', 'Global Resources', 'Actions'
];
self._asColumnAttribs = \
[
'', '', '', '', '',
'valign="top"', 'valign="top"', 'align="center"'
];
aoRet = \
[
];
# Base command and variations.
break;
sHtml = ' <table class="tminnertbl" width=100%>\n' \
' <tr>\n' \
' <th>';
if not fNoGang:
sHtml += '<th>Gang Size</th>';
sHtml += 'Timeout</th><th>Additional Arguments</b></th>\n' \
' </tr>\n'
sHtml += '<tr>';
if not fNoGang:
sHtml += '<td>%s</td><td>%s</td></tr>\n' \
sHtml += ' </table>'
# Next.
# Show dependency on other testcases
if oEntry.aoDepTestCases not in (None, []):
sHtml = ' <ul class="tmshowall">\n'
sHtml += ' <li class="tmshowall"><a href="%s?%s=%s&%s=%s">%s</a></li>\n' \
% (WuiAdmin.ksScriptName,
sHtml += ' </ul>\n'
else:
sHtml = '<ul class="tmshowall"><li class="tmshowall">None</li></ul>\n'
# Show dependency on global resources
if oEntry.aoDepGlobalResources not in (None, []):
sHtml = ' <ul class="tmshowall">\n'
sHtml += ' <li class="tmshowall"><a href="%s?%s=%s&%s=%s">%s</a></li>\n' \
% (WuiAdmin.ksScriptName,
sHtml += ' </ul>\n'
else:
sHtml = '<ul class="tmshowall"><li class="tmshowall">None</li></ul>\n'
# Show actions that can be taken.
return aoRet;
"""
WUI user account content generator.
"""
sTitle = 'New Test Case';
else:
# Read additional bits form the DB.
self._aoAllTestCases = oDepLogic.getApplicableDepTestCaseData(-1 if oData.idTestCase is None else oData.idTestCase);
oForm.addWideText (TestCaseData.ksParam_sTestBoxReqExpr, oData.sTestBoxReqExpr, 'TestBox requirements (python)');
oForm.addWideText (TestCaseData.ksParam_sBuildReqExpr, oData.sBuildReqExpr, 'Build requirement (python)');
oForm.addText (TestCaseData.ksParam_sValidationKitZips, oData.sValidationKitZips, 'Test suite files')
oForm.addListOfTestCaseArgs(TestCaseDataEx.ksParam_aoTestCaseArgs, oData.aoTestCaseArgs, 'Argument variations')
aoTestCaseDeps = [];
continue;
break;
oForm.addListOfTestCases(TestCaseDataEx.ksParam_aoDepTestCases, aoTestCaseDeps, 'Depends on test cases')
aoGlobalResrcDeps = [];
break;
oForm.addListOfResources(TestCaseDataEx.ksParam_aoDepGlobalResources, aoGlobalResrcDeps, 'Depends on resources')
return True;