diff --git a/mozilla/webtools/testopia/template/en/default/testopia/run/show.html.tmpl b/mozilla/webtools/testopia/template/en/default/testopia/run/show.html.tmpl
index 03856a233e3..2d6b50c69d5 100644
--- a/mozilla/webtools/testopia/template/en/default/testopia/run/show.html.tmpl
+++ b/mozilla/webtools/testopia/template/en/default/testopia/run/show.html.tmpl
@@ -421,10 +421,12 @@ Ext.onReady(function(){
submitEdits('status', item.text);
if (item.text == 'STOPPED'){
Ext.getCmp('caserun_grid_tb').disable();
+ Ext.getCmp('summary_tb').disable();
}
else {
if (Ext.getCmp('caserun_grid').getSelectionModel().getCount() > 0){
Ext.getCmp('caserun_grid_tb').enable();
+ Ext.getCmp('summary_tb').enable();
}
}
}
diff --git a/mozilla/webtools/testopia/testopia/js/case.js b/mozilla/webtools/testopia/testopia/js/case.js
index d213ab622ed..4db8212fd42 100644
--- a/mozilla/webtools/testopia/testopia/js/case.js
+++ b/mozilla/webtools/testopia/testopia/js/case.js
@@ -135,12 +135,12 @@ CaseGrid = function(params, cfg){
allowBlank: false
}))
},
- {header: "Author", width: 150, sortable: true, dataIndex: 'author'},
+ {header: "Author", width: 150, sortable: true, dataIndex: 'author', hidden: true},
{header: "Default Tester", width: 150, sortable: true, dataIndex: 'tester',
editor: new Ext.grid.GridEditor(new UserLookup({hiddenName:'tester'})),
renderer: TestopiaComboRenderer.createDelegate(this)},
- {header: "Created", width: 110, sortable: true, dataIndex: 'creation_date'},
- {header: "Last Modified", width: 110, sortable: true, dataIndex: 'modified'},
+ {header: "Created", width: 110, sortable: true, dataIndex: 'creation_date', hidden: true},
+ {header: "Last Modified", width: 110, sortable: true, dataIndex: 'modified', hidden: true},
{header: "Priority", width: 100, sortable: true, dataIndex: 'priority',
editor: new Ext.grid.GridEditor(
new PriorityCombo({
@@ -167,14 +167,14 @@ CaseGrid = function(params, cfg){
{header: "Status", width: 100, sortable: true, dataIndex: 'status',
editor: new Ext.grid.GridEditor(new CaseStatusCombo('status')),
renderer: TestopiaComboRenderer.createDelegate(this)},
- {header: "Requirement", width: 40, sortable: true, dataIndex: 'requirement',
+ {header: "Requirement", width: 40, sortable: true, dataIndex: 'requirement', hidden: true,
editor: new Ext.grid.GridEditor(
new Ext.form.TextField({
name: 'requirement'
}))
},
- {header: "Plan", width: 40, sortable: true, dataIndex: 'plan_id', renderer: tutil.plan_link, groupRenderer: function(v){return v;}},
- {header: "Run Count", width: 40, sortable: false, dataIndex: 'run_count'}
+ {header: "Plan", width: 40, sortable: true, dataIndex: 'plan_id', hidden: true, renderer: tutil.plan_link, groupRenderer: function(v){return v;}},
+ {header: "Run Count", width: 40, sortable: false, dataIndex: 'run_count', hidden: true}
];
this.view = new Ext.grid.GroupingView({
forceFit: true,
@@ -188,6 +188,7 @@ CaseGrid = function(params, cfg){
id: cfg.id || 'case_grid',
loadMask: {msg:'Loading Test Cases...'},
layout: 'fit',
+ stripeRows:true,
region: 'center',
autoExpandColumn: "case_summary",
autoScroll: true,
diff --git a/mozilla/webtools/testopia/testopia/js/caserun.js b/mozilla/webtools/testopia/testopia/js/caserun.js
index 68ec665e8cb..bf788f340ce 100755
--- a/mozilla/webtools/testopia/testopia/js/caserun.js
+++ b/mozilla/webtools/testopia/testopia/js/caserun.js
@@ -404,7 +404,7 @@ CaseRunGrid = function(params, run){
editor: new Ext.grid.GridEditor(
new UserLookup({id: 'caserun_assignee'})
),renderer: TestopiaComboRenderer.createDelegate(this)},
- {header: "Tested By", width: 150, sortable: true, dataIndex: 'testedby'},
+ {header: "Tested By", width: 150, sortable: true, dataIndex: 'testedby', hidden: true},
{header: "Closed", width: 90, sortable: true, dataIndex: 'close_date'},
{header: "Status", width: 30, sortable: true, dataIndex: 'status', align: 'center', renderer: t.statusIcon},
{header: "Priority", width: 60, sortable: true, dataIndex: 'priority',
@@ -437,11 +437,6 @@ CaseRunGrid = function(params, run){
}
];
- var imgButtonTpl = new Ext.Template(
- '
' +
- ' | ' +
- '
');
-
this.form = new Ext.form.BasicForm('testopia_helper_frm', {});
this.bbar = new TestopiaPager('caserun', this.store);
this.tbar = new Ext.Toolbar({
@@ -563,7 +558,6 @@ CaseRunGrid = function(params, run){
icon: 'testopia/img/edit.png',
iconCls: 'img_button_16x',
tooltip: 'Edit Selected Test Case',
-// disabled: true,
handler: function(){
editFirstSelection(Ext.getCmp('caserun_grid'));
}
@@ -573,7 +567,6 @@ CaseRunGrid = function(params, run){
id: 'caserun_grid_delete_btn',
icon: 'testopia/img/delete.png',
iconCls: 'img_button_16x',
-// disabled: true,
tooltip: 'Remove Selected Test Cases from This Run',
handler: this.deleteList.createDelegate(this)
},
@@ -618,10 +611,11 @@ CaseRunGrid = function(params, run){
}
},'rowselect': function (sm,n,r){
Ext.getCmp('case_details_panel').enable();
- Ext.getCmp('tb_build').enable();
- Ext.getCmp('tb_environment').enable();
- Ext.getCmp('update_bugs').enable();
if (Ext.getCmp('run_status_cycle').text == 'RUNNING'){
+ Ext.getCmp('summary_tb').enable();
+ Ext.getCmp('tb_build').enable();
+ Ext.getCmp('tb_environment').enable();
+ Ext.getCmp('update_bugs').enable();
var items = sm.grid.getTopToolbar().items.items;
for (var i=0; i < items.length; i++){
items[i].enable();
@@ -1068,8 +1062,7 @@ CaseRun = function(){
Ext.getCmp('effect_editor').setValue(r[0].get('results'));
Ext.getCmp('setup_editor').setValue(r[0].get('setup'));
Ext.getCmp('breakdown_editor').setValue(r[0].get('breakdown'));
- Ext.getCmp('summary_tb').items.items[0].destroy();
- Ext.getCmp('summary_tb').add(new Ext.Toolbar.TextItem('Case ' + r[0].get('case_id') + ' - ' + r[0].get('summary')));
+ Ext.getCmp('summary_tb').items.items[7].td.innerHTML = '' +'Case ' + r[0].get('case_id') + ' - ' + r[0].get('summary');
});
appendNote = function(){
@@ -1104,8 +1097,83 @@ CaseRun = function(){
}
var summary_tb = new Ext.Toolbar({
id: 'summary_tb',
- items: [new Ext.Toolbar.TextItem('')]
- })
+ disabled: true,
+ items: [new Ext.Button({
+ template:imgButtonTpl,
+ text: 'testopia/img/IDLE.gif',
+ tooltip: 'Mark as IDLE (Not Run)',
+ handler: function(){
+ TestopiaUpdateMultiple('caserun', { status_id: 1, ids: getSelectedObjects(Ext.getCmp('caserun_grid'),'caserun_id')}, Ext.getCmp('caserun_grid'));
+ }
+ }),new Ext.Button({
+ template:imgButtonTpl,
+ text: 'testopia/img/PASSED.gif',
+ tooltip: 'Mark as PASSED',
+ handler: function(){
+ TestopiaUpdateMultiple('caserun', { status_id: 2, ids: getSelectedObjects(Ext.getCmp('caserun_grid'),'caserun_id'), update_bug: Ext.getCmp('update_bugs').getValue()}, Ext.getCmp('caserun_grid'));
+ }
+ }),new Ext.Button({
+ template:imgButtonTpl,
+ text: 'testopia/img/FAILED.gif',
+ tooltip: 'Mark as FAILED',
+ handler: function(){
+ TestopiaUpdateMultiple('caserun', { status_id: 3, ids: getSelectedObjects(Ext.getCmp('caserun_grid'),'caserun_id'), update_bug: Ext.getCmp('update_bugs').getValue()}, Ext.getCmp('caserun_grid'));
+ }
+ }),new Ext.Button({
+ template:imgButtonTpl,
+ text: 'testopia/img/RUNNING.gif',
+ tooltip: 'Mark as RUNNING',
+ handler: function(){
+ var reassign = 0;
+ var isowner = 1;
+ var sel = Ext.getCmp('caserun_grid').getSelectionModel().getSelections();
+ for (var i=0; i < sel.length; i++){
+ if (sel[i].get('assignee') != user_login){
+ isowner = 0;
+ break;
+ }
+ }
+ if (isowner == 0){
+ Ext.Msg.show({
+ title: "Reassign Test Case?",
+ msg: 'Setting this test case to Running will lock it so that only the assignee can update it. Would you like to make yourself the assignee?',
+ buttons: Ext.MessageBox.YESNO,
+ icon: Ext.MessageBox.QUESTION,
+ fn: function(btn){
+ if (btn == 'yes'){
+ reassign = 1;
+ }
+ TestopiaUpdateMultiple('caserun', { status_id: 4, reassign: reassign, ids: getSelectedObjects(Ext.getCmp('caserun_grid'),'caserun_id')}, Ext.getCmp('caserun_grid'));
+ }
+ });
+ }
+ else {
+ TestopiaUpdateMultiple('caserun', { status_id: 4, reassign: reassign, ids: getSelectedObjects(Ext.getCmp('caserun_grid'),'caserun_id')}, Ext.getCmp('caserun_grid'));
+ }
+ }
+ }),new Ext.Button({
+ template:imgButtonTpl,
+ text: 'testopia/img/PAUSED.gif',
+ tooltip: 'Mark as PAUSED',
+ handler: function(){
+ TestopiaUpdateMultiple('caserun', { status_id: 5, ids: getSelectedObjects(Ext.getCmp('caserun_grid'),'caserun_id')}, Ext.getCmp('caserun_grid'));
+ }
+ }),new Ext.Button({
+ template:imgButtonTpl,
+ text: 'testopia/img/BLOCKED.gif',
+ tooltip: 'Mark as BLOCKED',
+ handler: function(){
+ TestopiaUpdateMultiple('caserun', { status_id: 6, ids: getSelectedObjects(Ext.getCmp('caserun_grid'),'caserun_id')}, Ext.getCmp('caserun_grid'));
+ }
+ }),new Ext.Button({
+ template:imgButtonTpl,
+ text: 'testopia/img/ERROR.gif',
+ tooltip: 'Mark as ERROR',
+ handler: function(){
+ TestopiaUpdateMultiple('caserun', { status_id: 7, ids: getSelectedObjects(Ext.getCmp('caserun_grid'),'caserun_id')}, Ext.getCmp('caserun_grid'));
+ }
+ }),new Ext.Toolbar.TextItem('')]
+ });
CaseRun.superclass.constructor.call(this,{
id: 'case_details_panel',
layout: 'fit',
diff --git a/mozilla/webtools/testopia/testopia/js/plan.js b/mozilla/webtools/testopia/testopia/js/plan.js
index cea177db18a..1ff65e96b7f 100644
--- a/mozilla/webtools/testopia/testopia/js/plan.js
+++ b/mozilla/webtools/testopia/testopia/js/plan.js
@@ -133,6 +133,7 @@ PlanGrid = function(params,cfg){
id: cfg.id || 'plan_grid',
layout: 'fit',
region: 'center',
+ stripeRows:true,
loadMask: {msg:'Loading Test Plans...'},
autoExpandColumn: "plan_name",
autoScroll: true,
diff --git a/mozilla/webtools/testopia/testopia/js/run.js b/mozilla/webtools/testopia/testopia/js/run.js
index 860f5cf597f..a6108dd3dab 100644
--- a/mozilla/webtools/testopia/testopia/js/run.js
+++ b/mozilla/webtools/testopia/testopia/js/run.js
@@ -81,20 +81,19 @@ RunGrid = function(params, cfg){
this.columns = [
{header: "Run ID", width: 30, dataIndex: "run_id", id: "run_id", sortable: true, renderer: tutil.runLink, hideable: false},
- {header: "Plan ID", width: 30, dataIndex: "plan_id", sortable: true, renderer: tutil.planLink},
{header: "Summary", width: 220, dataIndex: "summary", id: "run_name", sortable: true,
editor: new Ext.grid.GridEditor(
new Ext.form.TextField({
allowBlank: false
})
)},
- {header: "Manager Name", width: 150, dataIndex: "manager", id:"manager_name_col", sortable: true,
+ {header: "Manager Name", width: 150, dataIndex: "manager", id:"manager_name_col", sortable: true, hidden: true,
editor: new Ext.grid.GridEditor(new UserLookup({hiddenName:'manager'})),
renderer: TestopiaComboRenderer.createDelegate(this)
},
- {header: "Start Date", width: 110, dataIndex: "start_date", sortable: true},
- {header: "Stop Date", width: 110, dataIndex: "stop_date", sortable: true},
- {header: "Build", width: 30, dataIndex: "build", id: "build_col", sortable: true,
+ {header: "Start Date", width: 110, dataIndex: "start_date", sortable: true, hidden: true},
+ {header: "Stop Date", width: 110, dataIndex: "stop_date", sortable: true, hidden: true},
+ {header: "Build", width: 110, dataIndex: "build", id: "build_col", sortable: true,
editor: new Ext.grid.GridEditor(
bcombo,
{listeners: {
@@ -123,9 +122,9 @@ RunGrid = function(params, cfg){
),renderer: TestopiaComboRenderer.createDelegate(this)
},
- {header: "Status", width: 110, dataIndex:"status",id: "status",sortable: true},
- {header: "Case Count", width: 30, dataIndex: "case_count", sortable: false},
- {header: "Product Version", width: 50, dataIndex: "product_version", id: "product_version",sortable: true,
+ {header: "Status", width: 50, dataIndex:"status",id: "status",sortable: true},
+ {header: "Case Count", width: 30, dataIndex: "case_count", sortable: false, hidden: true},
+ {header: "Product Version", width: 150, dataIndex: "product_version", id: "product_version",sortable: true, hidden: true,
editor: new Ext.grid.GridEditor(
vcombo,
{listeners: {
@@ -139,6 +138,7 @@ RunGrid = function(params, cfg){
}}
),renderer: TestopiaComboRenderer.createDelegate(this)
},
+ {header: "Plan ID", width: 30, dataIndex: "plan_id", sortable: true, hidden: true, renderer: tutil.planLink},
{header: "Complete", width: 110, dataIndex:"complete_pct",sortable: false, hideable: true,
renderer: function(v,m,r){
var val = '';
@@ -167,6 +167,7 @@ RunGrid = function(params, cfg){
loadMask: {msg:'Loading Test Runs...'},
autoExpandColumn: "run_summary",
autoScroll: true,
+ stripeRows:true,
sm: new Ext.grid.RowSelectionModel({
singleSelect: false,
listeners: {'rowselect':function(sm,i,r){
diff --git a/mozilla/webtools/testopia/testopia/js/util.js b/mozilla/webtools/testopia/testopia/js/util.js
index bf13a7ce78f..c004d841bac 100755
--- a/mozilla/webtools/testopia/testopia/js/util.js
+++ b/mozilla/webtools/testopia/testopia/js/util.js
@@ -62,7 +62,10 @@ Ext.grid.CheckColumn.prototype = {
return '
';
}
};
-
+var imgButtonTpl = new Ext.Template(
+ '' +
+ ' | ' +
+ '
');
TestopiaUtil = function(){
this.statusIcon = function (name){
return '
';