Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AssertWebsiteOnStoreForm.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Backend\Test\Page\Adminhtml\NewGroupIndex;
10 use Magento\Backend\Test\Page\Adminhtml\StoreIndex;
11 use Magento\Store\Test\Fixture\Website;
12 use Magento\Mtf\Constraint\AbstractConstraint;
13 
18 class AssertWebsiteOnStoreForm extends AbstractConstraint
19 {
20  /* tags */
21  const SEVERITY = 'low';
22  /* end tags */
23 
32  public function processAssert(StoreIndex $storeIndex, NewGroupIndex $newGroupIndex, Website $website)
33  {
34  $websiteName = $website->getName();
35  $storeIndex->open()->getGridPageActions()->createStoreGroup();
36  \PHPUnit\Framework\Assert::assertTrue(
37  $newGroupIndex->getEditFormGroup()->isWebsiteVisible($websiteName),
38  'Website \'' . $websiteName . '\' is not present on Store Group Form in Website dropdown.'
39  );
40  }
41 
47  public function toString()
48  {
49  return 'Website is visible on Store Group Form in Website dropdown.';
50  }
51 }
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(StoreIndex $storeIndex, NewGroupIndex $newGroupIndex, Website $website)