Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertOrderNotVisibleOnMyAccount.php
Go to the documentation of this file.
1 <?php
8 
10 use Magento\Customer\Test\Page\CustomerAccountIndex;
12 use Magento\Sales\Test\Page\OrderHistory;
13 use Magento\Mtf\Constraint\AbstractConstraint;
14 
18 class AssertOrderNotVisibleOnMyAccount extends AbstractConstraint
19 {
30  public function processAssert(
31  OrderInjectable $order,
32  Customer $customer,
33  CustomerAccountIndex $customerAccountIndex,
34  OrderHistory $orderHistory,
35  $status
36  ) {
37  $filter = [
38  'id' => $order->getId(),
39  'status' => $status,
40  ];
41  $this->objectManager->create(
42  \Magento\Customer\Test\TestStep\LoginCustomerOnFrontendStep::class,
43  ['customer' => $customer]
44  )->run();
45  $customerAccountIndex->getAccountMenuBlock()->openMenuItem('My Orders');
46  \PHPUnit\Framework\Assert::assertFalse(
47  $orderHistory->getOrderHistoryBlock()->isVisible()
48  && $orderHistory->getOrderHistoryBlock()->isOrderVisible($filter),
49  'Order with following data \'' . implode(', ', $filter) . '\' is present in Orders block on frontend.'
50  );
51  }
52 
58  public function toString()
59  {
60  return 'Sales order absent in orders on frontend.';
61  }
62 }
$customer
Definition: customers.php:11
$order
Definition: order.php:55
$status
Definition: order_status.php:8
taxRateField this edit on("click.mselect-delete", ".mselect-delete", function() { if(!confirm('<?=/*@escapeNotVerified */__( 'Do you really want to delete this tax rate?') ?>')) { return;} var that=$(this), select=that.closest('.mselect-list').prev(), rateValue=that.parent().find( 'input[type="checkbox"]').val();$( 'body').trigger( 'processStart');var ajaxOptions={ type:'POST', data:{ tax_calculation_rate_id:rateValue, form_key:$( 'input[name="form_key"]').val() }, dataType:'json', url:'<?=/*@escapeNotVerified */$block->getTaxRateDeleteUrl() ?>', success:function(result, status) { $( 'body').trigger( 'processStop');if(result.success) { that.parent().remove();select.find( 'option').each(function() { if(this.value===rateValue) { $(this).remove();} });select.trigger( 'change.hiddenSelect');} else { if(result.error_message) alert({ content:result.error_message });else alert({ content:'<?=/*@escapeNotVerified */__( 'An error occurred') ?>' });} }, error:function() { $( 'body').trigger( 'processStop');alert({ content:'<?=/*@escapeNotVerified */__( 'An error occurred') ?>' });} };$.ajax(ajaxOptions);}) .on( 'click.mselectAdd'
Definition: edit.phtml:164
processAssert(OrderInjectable $order, Customer $customer, CustomerAccountIndex $customerAccountIndex, OrderHistory $orderHistory, $status)