Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple failures from Travis on build PRESTASHOP_TEST_TYPE=e2e EXTRA_TESTS=functional #14384

matks opened this issue Jun 26, 2019 · 2 comments


Copy link

@matks matks commented Jun 26, 2019

We have a insane number of CI builds failing because of a random occurrence of a test failure:

Guest Checkout
  1) "before all" hook
26 passing (27.50s)
1 failing
1) "before all" hook:
element (#blockcart-modal) still not visible after 2500ms
running chrome on Windows 7
Error: element (#blockcart-modal) still not visible after 2500ms
    at Object.<anonymous> (node_modules/webdriverio/lib/commands/waitForVisible.js:56:19)
    at Object.safeExecute (node_modules/webdriverio/lib/utils/safeExecute.js:19:24)
    at Object.resolve (node_modules/webdriverio/lib/webdriverio.js:87:29)
    at node_modules/webdriverio/lib/webdriverio.js:227:32
    at _rejected (node_modules/webdriverio/node_modules/q/q.js:830:24)
    at node_modules/webdriverio/node_modules/q/q.js:856:30
    at Promise.when (node_modules/webdriverio/node_modules/q/q.js:1108:31)
    at Promise.promise.promiseDispatch (node_modules/webdriverio/node_modules/q/q.js:774:41)
    at node_modules/webdriverio/node_modules/q/q.js:590:44
    at runSingle (node_modules/webdriverio/node_modules/q/q.js:123:13)
npm ERR! Test failed.  See above for more details.

@Quetzacoalt91 already checked in localhost, test pass. And re-running the build often fixes the issue.

We need to fix it.

@matks matks added Critical TE labels Jun 26, 2019

This comment has been minimized.

Copy link

@Quetzacoalt91 Quetzacoalt91 commented Jun 26, 2019

Here are additional details:

We often see that the selenium tests fail for the same reason. The modal after clicking on "Add to cart" is never displayed. Here is the screenshot taken on Travis when the error occurs:


This is not caused by an exception as we may think, but a product with customizable data. It has been altered by the script prepare-shop.php:

$customizableProduct = new Product(1, false, $language->id);
// Hijack the "_deleteOldLabels" method to remove existing labels
// (shouldn't be any but I want this script to be idempotent)
$refl = new ReflectionClass('Product');
$meth = $refl->getMethod('_deleteOldLabels');
// First, create the label
$customizableProduct->createLabels(($fileFields = 0), ($textFields = 1));
$fields = $customizableProduct->getCustomizationFields();
$id_customization_field = current(current(current($fields)))['id_customization_field'];
// And inform the product that it has become customizable
$customizableProduct->customizable = 1;
$customizableProduct->text_fields = 1;
// Then define it. There is unfortunately no API, so we encode the data in $_POST...
$_POST[implode('_', ['label', 1, $id_customization_field, $language->id, $shop->id])] = 'my field';
$_POST[implode('_', ['require', 1, $id_customization_field])] = true;
echo "- added a required customizable text field to product #1\n";

However, it appears that during the test, we sometime don't select the proper product. Although tyhe selector is correct. Maybe the products are filtered during a few milliseconds which makes the click incorrect?


This comment has been minimized.

Copy link
Contributor Author

@matks matks commented Jul 4, 2019

Issue was fixed by disabling the bad test. Better solution will be implemented in #14497.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.