File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,18 +72,17 @@ public String getEndDate()
7272 return elementCache ().endDate .get ();
7373 }
7474
75- public PeptideSummaryWebPart apply (boolean wait )
75+ public PeptideSummaryWebPart apply ()
7676 {
77- if (wait )
78- {
79- doAndWaitForElementToRefresh (() -> elementCache ().applyButton .findElement (this ).click (),
80- elementCache ().heatmapLoc , getWrapper ().defaultWaitForPage );
81- }
82- else
83- {
84- elementCache ().applyButton .findElement (this ).click ();
85- }
77+ doAndWaitForElementToRefresh (() -> elementCache ().applyButton .findElement (this ).click (),
78+ elementCache ().heatmapLoc , getWrapper ().defaultWaitForPage );
79+ return this ;
80+ }
8681
82+ public PeptideSummaryWebPart applyExpectingError (String error )
83+ {
84+ elementCache ().applyButton .findElement (this ).click ();
85+ getWrapper ().assertTextPresent (error );
8786 return this ;
8887 }
8988
Original file line number Diff line number Diff line change @@ -87,15 +87,13 @@ public void testHeatMapColorAndValues()
8787
8888 log ("Verify invalid date combos produce helpful errors" );
8989 peptideSummaryHeatMap .setCustomDateRange ("2013-08-15" , "2013-08-01" );
90- peptideSummaryHeatMap .apply (false );
91- assertTextPresent ("Please choose a start date that is before the end date." );
90+ peptideSummaryHeatMap .applyExpectingError ("Please choose a start date that is before the end date." );
9291 peptideSummaryHeatMap .setCustomDateRange (null , "2013-08-01" );
93- peptideSummaryHeatMap .apply (false );
94- assertTextPresent ("Please select both start and end dates." );
92+ peptideSummaryHeatMap .applyExpectingError ("Please select both start and end dates." );
9593
9694 log ("Verify Custom date range" );
9795 peptideSummaryHeatMap .setCustomDateRange ("2013-08-01" , "2013-08-15" );
98- peptideSummaryHeatMap .apply (true );
96+ peptideSummaryHeatMap .apply ();
9997 verifyDataCustomRange (peptideSummaryHeatMap );
10098
10199 log ("Verify Custom -> standard -> custom toggling" );
You can’t perform that action at this time.
0 commit comments