コード例 #1
0
 /**
  * @param int $count
  *
  * @Given /^the grid should contain (\d+) elements?$/
  */
 public function theGridShouldContainElement($count)
 {
     $count = (int) $count;
     $this->wait();
     if (0 === $count) {
         assertTrue($this->datagrid->isGridEmpty());
         return;
     }
     if ($count > 10) {
         $this->iChangePageSize(100);
     }
     assertEquals($count, $actualCount = $this->datagrid->getToolbarCount(), sprintf('Expecting to see %d record(s) in the datagrid toolbar, actually saw %d', $count, $actualCount));
     assertEquals($count, $actualCount = $this->datagrid->countRows(), sprintf('Expecting to see %d row(s) in the datagrid, actually saw %d.', $count, $actualCount));
 }
コード例 #2
0
 /**
  * @param array $entities
  *
  * @Then /^I should not see products? (.*)$/
  * @Then /^I should not see attributes? (?!(.*)in group )(.*)$/
  * @Then /^I should not see channels? (.*)$/
  * @Then /^I should not see locales? (.*)$/
  * @Then /^I should not see (?:import|export) profiles? (.*)$/
  * @Then /^I should not see (?:(?:entit|currenc)(?:y|ies)) (.*)$/
  * @Then /^I should not see group(?: type)?s? (.*)$/
  * @Then /^I should not see association (?:types? )?(.*)$/
  * @Then /^I should not see famil(?:y|ies) (.*)$/
  */
 public function iShouldNotSeeEntities($entities)
 {
     if ($this->datagrid->isGridEmpty()) {
         return;
     }
     foreach ($this->getMainContext()->listToArray($entities) as $entity) {
         if ($this->datagrid->hasRow($entity)) {
             throw $this->createExpectationException(sprintf('Entity "%s" should not be seen', $entity));
         }
     }
 }
コード例 #3
0
 /**
  * @param array $entities
  *
  * @throws ExpectationException
  *
  * @Then /^I should not see products? (.*)$/
  * @Then /^I should not see attributes? (?!(.*)in group )(.*)$/
  * @Then /^I should not see channels? (.*)$/
  * @Then /^I should not see locales? (.*)$/
  * @Then /^I should not see (?:import|export) profiles? (.*)$/
  * @Then /^I should not see (?:(?:entit|currenc)(?:y|ies)) (.*)$/
  * @Then /^I should not see group(?: type)?s? (.*)$/
  * @Then /^I should not see association (?:types? )?(.*)$/
  * @Then /^I should not see famil(?:y|ies) (.*)$/
  */
 public function iShouldNotSeeEntities($entities)
 {
     $entitiesArray = $this->getMainContext()->listToArray($entities);
     $this->spin(function () use($entitiesArray) {
         if ($this->datagrid->isGridEmpty()) {
             return true;
         }
         foreach ($entitiesArray as $entity) {
             if ($this->datagrid->hasRow($entity)) {
                 return false;
             }
         }
         return true;
     }, sprintf('Expected not to see "%s"', $entities));
 }