Skip to content

Commit

Permalink
Skyline: Better error message for TestSmallMoleculesDocumentGrid fail…
Browse files Browse the repository at this point in the history
…ures
  • Loading branch information
brendanx67 committed Oct 9, 2023
1 parent 5b3dbaa commit bdd781f
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,16 @@ private void CheckDocumentGridAndColumns(string docName,
WaitForClosedForm<DocumentGridForm>();
var documentGrid = ShowDialog<DocumentGridForm>(() => SkylineWindow.ShowDocumentGrid(true));
RunUI(() => documentGrid.ChooseView(viewName));
WaitForCondition(() => (documentGrid.RowCount == rowCount)); // Let it initialize
WaitForConditionUI(() => (documentGrid.RowCount == rowCount),
() => string.Format("Expecting row count <{0}>, actual <{1}>", rowCount, documentGrid.RowCount)); // Let it initialize
int iteration = 0;
WaitForCondition(() =>
WaitForConditionUI(() =>
{
bool result = documentGrid.ColumnCount == colCount;
if (!result && iteration++ > 9)
Assert.AreNotEqual(colCount, documentGrid.ColumnCount); // Put breakpoint on this line, if you have changed columns and need to update the numbers
return result;
}); // Let it initialize
}, () => string.Format("Expecting column count <{0}>, actual <{1}>", colCount, documentGrid.ColumnCount)); // Let it initialize

var colProductIonFormula = documentGrid.FindColumn(PropertyPath.Parse("ProductIonFormula"));
var colProductNeutralFormula = documentGrid.FindColumn(PropertyPath.Parse("ProductNeutralFormula"));
Expand Down

0 comments on commit bdd781f

Please sign in to comment.