Skip to content

Commit

Permalink
FIX Increase wait time for ElementList and make minor improvement to …
Browse files Browse the repository at this point in the history
…FeatureContext
  • Loading branch information
raissanorth authored and ScopeyNZ committed Oct 16, 2018
1 parent 9d47bb6 commit d575a38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
10 changes: 1 addition & 9 deletions client/dist/js/bundle.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions tests/Behat/Context/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@ public function theFieldForBlockShouldContain($field, $blockNumber, $negate, $co
protected function getBlocks($modifier = '')
{
// Wait for the list to be visible
$this->getSession()->wait(3000, 'window.jQuery(".element-editor .elemental-editor__list").length > 0');
$this->getSession()->wait(5000, 'window.jQuery(".element-editor .elemental-editor__list").length > 0');

// Wait for blocks to be rendered
$this->getSession()->wait(3000, 'window.jQuery(".element-editor__element").length > 0');
$this->getSession()->wait(5000, 'window.jQuery(".element-editor__element").length > 0');

return $this->getSession()
->getPage()
Expand Down Expand Up @@ -373,7 +373,7 @@ protected function findFieldInBlock($block, $name)
{
$label = $block->findAll('xpath', sprintf('//label[contains(text(), \'%s\')]', $name));

assertNotNull($label, sprintf('Could not find a label for a field with the content "%s"', $name));
assertNotCount(0, $label, sprintf('Could not find a label for a field with the content "%s"', $name));
assertCount(
1,
$label,
Expand Down

0 comments on commit d575a38

Please sign in to comment.