final touch on test_dashboard
This commit is contained in:
@@ -65,7 +65,7 @@ function app = test_dashboard(options)
|
|||||||
app.TotalLabel = makeMetricLabel(headerGrid, "Total", 7);
|
app.TotalLabel = makeMetricLabel(headerGrid, "Total", 7);
|
||||||
|
|
||||||
app.FilterDropDown = uidropdown(headerGrid, ...
|
app.FilterDropDown = uidropdown(headerGrid, ...
|
||||||
"Items", {'All', 'Implemented', 'Placeholder', 'Missing', 'Standalone'}, ...
|
"Items", {'All', 'Implemented', 'Missing', 'Standalone'}, ...
|
||||||
"Value", 'All', ...
|
"Value", 'All', ...
|
||||||
"ValueChangedFcn", @filterChanged);
|
"ValueChangedFcn", @filterChanged);
|
||||||
app.FilterDropDown.Layout.Row = 2;
|
app.FilterDropDown.Layout.Row = 2;
|
||||||
@@ -176,8 +176,6 @@ function app = test_dashboard(options)
|
|||||||
switch string(app.FilterDropDown.Value)
|
switch string(app.FilterDropDown.Value)
|
||||||
case "Implemented"
|
case "Implemented"
|
||||||
filtered = filtered(filtered.Status == "Implemented", :);
|
filtered = filtered(filtered.Status == "Implemented", :);
|
||||||
case "Placeholder"
|
|
||||||
filtered = filtered(filtered.Status == "Placeholder", :);
|
|
||||||
case "Missing"
|
case "Missing"
|
||||||
filtered = filtered(filtered.Status == "Missing", :);
|
filtered = filtered(filtered.Status == "Missing", :);
|
||||||
case "Standalone"
|
case "Standalone"
|
||||||
@@ -192,7 +190,6 @@ function app = test_dashboard(options)
|
|||||||
|
|
||||||
function updateSummary(inventory)
|
function updateSummary(inventory)
|
||||||
implementedCount = nnz(inventory.Status == "Implemented");
|
implementedCount = nnz(inventory.Status == "Implemented");
|
||||||
placeholderCount = nnz(inventory.Status == "Placeholder");
|
|
||||||
missingCount = nnz(inventory.Status == "Missing");
|
missingCount = nnz(inventory.Status == "Missing");
|
||||||
passedCount = nnz(inventory.LastRun == "Passed");
|
passedCount = nnz(inventory.LastRun == "Passed");
|
||||||
failedCount = nnz(inventory.LastRun == "Failed");
|
failedCount = nnz(inventory.LastRun == "Failed");
|
||||||
@@ -200,7 +197,7 @@ function app = test_dashboard(options)
|
|||||||
totalCount = height(inventory);
|
totalCount = height(inventory);
|
||||||
|
|
||||||
app.ImplementedLabel.Text = sprintf("Implemented: %d", implementedCount);
|
app.ImplementedLabel.Text = sprintf("Implemented: %d", implementedCount);
|
||||||
app.PlaceholderLabel.Text = sprintf("Placeholder: %d", placeholderCount);
|
app.PlaceholderLabel.Text = "Placeholder: hidden";
|
||||||
app.MissingLabel.Text = sprintf("Missing: %d", missingCount);
|
app.MissingLabel.Text = sprintf("Missing: %d", missingCount);
|
||||||
app.PassedLabel.Text = sprintf("Passed: %d", passedCount);
|
app.PassedLabel.Text = sprintf("Passed: %d", passedCount);
|
||||||
app.FailedLabel.Text = sprintf("Failed: %d", failedCount);
|
app.FailedLabel.Text = sprintf("Failed: %d", failedCount);
|
||||||
@@ -661,16 +658,16 @@ function inventory = buildInventory(repoRoot, testsRoot)
|
|||||||
tags = "";
|
tags = "";
|
||||||
testFileName = "";
|
testFileName = "";
|
||||||
else
|
else
|
||||||
matchedTestFiles(end + 1, 1) = testFile; %#ok<AGROW>
|
|
||||||
source = fileread(testFile);
|
source = fileread(testFile);
|
||||||
if contains(source, "assumeFail(")
|
if contains(source, "assumeFail(")
|
||||||
status = "Placeholder";
|
continue
|
||||||
else
|
else
|
||||||
|
matchedTestFiles(end + 1, 1) = testFile; %#ok<AGROW>
|
||||||
status = "Implemented";
|
status = "Implemented";
|
||||||
end
|
|
||||||
tags = strjoin(extractTestTags(source), ", ");
|
tags = strjoin(extractTestTags(source), ", ");
|
||||||
[~, testFileName] = fileparts(testFile);
|
[~, testFileName] = fileparts(testFile);
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
targetLabel = fullfile('Classes', relativeDirText, [classNameText, '.m']);
|
targetLabel = fullfile('Classes', relativeDirText, [classNameText, '.m']);
|
||||||
targetLabel = strrep(targetLabel, "\", "/");
|
targetLabel = strrep(targetLabel, "\", "/");
|
||||||
@@ -698,7 +695,7 @@ function inventory = buildInventory(repoRoot, testsRoot)
|
|||||||
|
|
||||||
source = fileread(testFile);
|
source = fileread(testFile);
|
||||||
if contains(source, "assumeFail(")
|
if contains(source, "assumeFail(")
|
||||||
status = "Placeholder";
|
continue
|
||||||
else
|
else
|
||||||
status = "Implemented";
|
status = "Implemented";
|
||||||
end
|
end
|
||||||
@@ -733,6 +730,8 @@ function inventory = buildInventory(repoRoot, testsRoot)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
inventory = inventory(inventory.Status ~= "Placeholder", :);
|
||||||
|
|
||||||
statusOrder = containers.Map( ...
|
statusOrder = containers.Map( ...
|
||||||
{'Implemented', 'Missing', 'Placeholder'}, ...
|
{'Implemented', 'Missing', 'Placeholder'}, ...
|
||||||
{1, 2, 3});
|
{1, 2, 3});
|
||||||
|
|||||||
Reference in New Issue
Block a user