Skip to content

Commit 7424aae

Browse files
committed
Disable filter during run
1 parent 841d549 commit 7424aae

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

PlsqlDeveloperUtPlsqlPlugin/utPLSQL.UI/TestRunnerWindow.cs

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ public TestRunnerWindow(object pluginIntegration, string username, string passwo
4444
testRunner.Connect(username, password, database);
4545

4646
InitializeComponent();
47+
}
4748

49+
private void CreateDataSourceAndConfigureGridColumns()
50+
{
4851
viewTestResults = new BindingListView<TestResult>(testResults);
4952
gridResults.DataSource = viewTestResults;
5053

@@ -102,6 +105,8 @@ public async Task RunTestsAsync(string type, string owner, string name, string p
102105

103106
txtStatus.BeginInvoke((MethodInvoker)delegate
104107
{
108+
EnableFilter();
109+
105110
txtStatus.Text = totalNumberOfTests > 0 ? "Finished" : "No tests found";
106111
});
107112

@@ -122,6 +127,14 @@ public async Task RunTestsAsync(string type, string owner, string name, string p
122127
}
123128
}
124129

130+
private void EnableFilter()
131+
{
132+
cbSuccess.Enabled = true;
133+
cbFailure.Enabled = true;
134+
cbError.Enabled = true;
135+
cbDisabled.Enabled = true;
136+
}
137+
125138
private Action<@event> CollectResults(bool coverage)
126139
{
127140
return @event =>
@@ -139,8 +152,8 @@ private Action<@event> CollectResults(bool coverage)
139152
progressBar.Step = Steps;
140153

141154
CreateTestResults(@event);
142-
viewTestResults = new BindingListView<TestResult>(testResults);
143-
gridResults.DataSource = viewTestResults;
155+
156+
CreateDataSourceAndConfigureGridColumns();
144157

145158
if (gridResults.Rows.Count > 0)
146159
{
@@ -182,7 +195,10 @@ private Action<@event> CollectResults(bool coverage)
182195

183196
if (!coverage)
184197
{
198+
EnableFilter();
199+
185200
txtStatus.Text = totalNumberOfTests > 0 ? "Finished" : "No tests found";
201+
186202
Running = false;
187203
}
188204
});
@@ -299,6 +315,11 @@ private void ResetComponents()
299315
progressBar.Minimum = 0;
300316
progressBar.Maximum = 100;
301317
progressBar.Value = 0;
318+
319+
cbSuccess.Enabled = false;
320+
cbFailure.Enabled = false;
321+
cbError.Enabled = false;
322+
cbDisabled.Enabled = false;
302323
}
303324

304325
private void UpdateTestResult(@event @event)

0 commit comments

Comments
 (0)