@@ -111,15 +111,15 @@ private void doInit() throws IOException, CommandException
111111 InsertRowsCommand rateTypeInsert = new InsertRowsCommand ("targetedms" , "rateType" );
112112 rateTypeInsert .setRows (Arrays .asList (
113113 Map .of ("Name" , "DefaultRate" , "SetupFee" , 50 ),
114- Map .of ("Name" , "BigSpenderRate" , "SetupFee" , 50 )
114+ Map .of ("Name" , "BigSpenderRate" , "SetupFee" , 66 )
115115 ));
116116 List <Map <String , Object >> rateTypes = rateTypeInsert .execute (createDefaultConnection (), getProjectName ()).getRows ();
117117
118118 InsertRowsCommand paymentMethodInsert = new InsertRowsCommand ("targetedms" , "paymentMethod" );
119119 paymentMethodInsert .setRows (Arrays .asList (
120- Map .of ("UWBudgetNumber" , "1111" , "Name" , PAYMENT_METHOD_1 ),
121- Map .of ("UWBudgetNumber" , "2222" , "Name" , PAYMENT_METHOD_2 ),
122- Map .of ("UWBudgetNumber" , "3333" , "Name" , PAYMENT_METHOD_3 ) // Intentionally not associated with a project
120+ Map .of ("UWBudgetNumber" , "1111" , "Name" , PAYMENT_METHOD_1 , "RateType" , rateTypes . get ( 0 ). get ( "Id" ) ),
121+ Map .of ("UWBudgetNumber" , "2222" , "Name" , PAYMENT_METHOD_2 , "RateType" , rateTypes . get ( 1 ). get ( "Id" ) ),
122+ Map .of ("UWBudgetNumber" , "3333" , "Name" , PAYMENT_METHOD_3 , "RateType" , rateTypes . get ( 0 ). get ( "Id" ) ) // Intentionally not associated with a project
123123 ));
124124 List <Map <String , Object >> paymentMethods = paymentMethodInsert .execute (createDefaultConnection (), getProjectName ()).getRows ();
125125
@@ -142,7 +142,9 @@ private void doInit() throws IOException, CommandException
142142 InsertRowsCommand instrumentRateInsert = new InsertRowsCommand ("targetedms" , "instrumentRate" );
143143 instrumentRateInsert .setRows (Arrays .asList (
144144 Map .of ("Instrument" , instruments .get (0 ).get ("Id" ), "rateType" , rateTypes .get (0 ).get ("Id" ), "fee" , 100 ),
145- Map .of ("Instrument" , instruments .get (1 ).get ("Id" ), "rateType" , rateTypes .get (1 ).get ("Id" ), "fee" , 110 )
145+ Map .of ("Instrument" , instruments .get (0 ).get ("Id" ), "rateType" , rateTypes .get (1 ).get ("Id" ), "fee" , 211 ),
146+ Map .of ("Instrument" , instruments .get (1 ).get ("Id" ), "rateType" , rateTypes .get (0 ).get ("Id" ), "fee" , 100 ),
147+ Map .of ("Instrument" , instruments .get (1 ).get ("Id" ), "rateType" , rateTypes .get (1 ).get ("Id" ), "fee" , 330 )
146148 ));
147149 List <Map <String , Object >> instrumentRates = instrumentRateInsert .execute (createDefaultConnection (), getProjectName ()).getRows ();
148150 }
@@ -301,11 +303,12 @@ public void testSchedule() throws IOException, CommandException
301303 waitAndClickAndWait (Locator .linkWithText ("Instrument billing report" ));
302304 assertTextPresent ("$950.00" , 8 );
303305 // Two rows, one for each of the two payment methods
304- assertTextPresent ("$3,680.00" , 2 );
306+ assertTextPresent ("$3,350.00" , 1 );
307+ assertTextPresent ("$10,956.00" , 1 );
305308 assertTextPresent (PAYMENT_METHOD_1 , 5 );
306309 assertTextPresent (PAYMENT_METHOD_2 , 1 );
307- // Verify the 40/60 split
308- assertTextPresent ("$1,472 .00" , "$2,208.00 " );
310+ // Verify the 40/60 split (though odd since they're different rate types)
311+ assertTextPresent ("$1,340 .00" , "$6,573.60 " );
309312
310313 goToDashboard ();
311314 clickAndWait (Locator .linkWithText ("Monthly instrument billing report" ));
@@ -314,7 +317,7 @@ public void testSchedule() throws IOException, CommandException
314317 clickButton ("Submit" );
315318 // Only some hours should be in the range for this billing report
316319 assertTextPresent ("17.0" , 2 );
317- assertTextPresent ("$748 .00" , "$1,122 .00" );
320+ assertTextPresent ("$680 .00" , "$3,366 .00" );
318321 }
319322
320323 private void attemptScheduleInsertExpectingFailure (Map <String , Object > row , String expected ) throws IOException
0 commit comments