Browse Source

Merge pull request #1674 from vuejs/e2e-test

ci: fix failing e2e test
Kia King Ishii 5 years ago
parent
commit
4ebfaf98d0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/shopping-cart/api/shop.js

+ 1 - 1
examples/shopping-cart/api/shop.js

@@ -15,7 +15,7 @@ export default {
   buyProducts (products, cb, errorCb) {
   buyProducts (products, cb, errorCb) {
     setTimeout(() => {
     setTimeout(() => {
       // simulate random checkout failure.
       // simulate random checkout failure.
-      (Math.random() > 0.5 || navigator.userAgent.indexOf('PhantomJS') > -1)
+      (Math.random() > 0.5 || navigator.webdriver)
         ? cb()
         ? cb()
         : errorCb()
         : errorCb()
     }, 100)
     }, 100)