public async Task GivenACompleteOrderExists() { var completeOrder = new CompleteOrder(Test, Context); await completeOrder.GivenTheOrderIsCompleteEnoughSoThatTheCompleteOrderButtonIsEnabled("yes"); var order = await OrderHelpers.GetFullOrderTrackedAsync(Context.Get <Order>(ContextKeys.CreatedOrder).CallOffId, DbContext); var result = order.Complete(); if (!result) { throw new DbUpdateException($"Order {order.CallOffId} not completed"); } await DbContext.SaveChangesAsync(); var completedOrder = await OrderHelpers.GetFullOrderAsync(order.CallOffId, DbContext); completedOrder.Completed.Should().NotBeNull(); Test.Driver.Navigate().Refresh(); }