This repository has been archived by the owner on Apr 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ba2b720
commit 750f506
Showing
5 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/Shopsys/ShopBundle/Resources/scripts/frontend/plugins/chatbot.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
window._chatlio = window._chatlio || []; | ||
!function () { | ||
var t = document.getElementById("chatlio-widget-embed"); | ||
if (t && window.ChatlioReact && _chatlio.init) return void _chatlio.init(t, ChatlioReact); | ||
for (var e = function (t) { | ||
return function () { | ||
_chatlio.push([t].concat(arguments)) | ||
} | ||
}, i = ["configure", "identify", "track", "show", "hide", "isShown", "isOnline", "page", "open", "showOrHide"], a = 0; a < i.length; a++) _chatlio[i[a]] || (_chatlio[i[a]] = e(i[a])); | ||
var n = document.createElement("script"), c = document.getElementsByTagName("script")[0]; | ||
n.id = "chatlio-widget-embed", n.src = "https://w.chatlio.com/w.chatlio-widget.js", n.async = !0, n.setAttribute("data-embed-version", "2.3"); | ||
n.setAttribute('data-widget-id', '824874cb-7e8b-4a4e-5380-10c1697b3d08'); | ||
c.parentNode.insertBefore(n, c); | ||
}(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,13 +28,16 @@ public function testFormRemembersPaymentAndTransportWhenClickingBack( | |
$me->amOnPage('/tv-audio/'); | ||
$productListPage->addProductToCartByName('Defender 2.0 SPK-480'); | ||
$me->clickByText('Go to cart'); | ||
|
||
$me->scrollTo(['css' => '#cart_form_submit']); | ||
$me->clickByText('Continue to Order'); | ||
|
||
$orderPage->assertTransportIsNotSelected('Czech post'); | ||
$orderPage->selectTransport('Czech post'); | ||
$orderPage->assertPaymentIsNotSelected('Cash on delivery'); | ||
$orderPage->selectPayment('Cash on delivery'); | ||
$me->waitForAjax(); | ||
$me->scrollTo(['css' => '#transport_and_payment_form_save']); | ||
$me->clickByText('Continue in order'); | ||
$me->clickByText('Back to shipping and payment selection'); | ||
|
||
|
@@ -57,13 +60,16 @@ public function testFormRemembersPaymentAndTransportWhenGoingDirectlyToUrl( | |
$me->amOnPage('/tv-audio/'); | ||
$productListPage->addProductToCartByName('Defender 2.0 SPK-480'); | ||
$me->clickByText('Go to cart'); | ||
|
||
$me->scrollTo(['css' => '#cart_form_submit']); | ||
$me->clickByText('Continue to Order'); | ||
|
||
$orderPage->assertTransportIsNotSelected('Czech post'); | ||
$orderPage->selectTransport('Czech post'); | ||
$orderPage->assertPaymentIsNotSelected('Cash on delivery'); | ||
$orderPage->selectPayment('Cash on delivery'); | ||
$me->waitForAjax(); | ||
$me->scrollTo(['css' => '#transport_and_payment_form_save']); | ||
$me->clickByText('Continue in order'); | ||
$me->amOnPage('/order/'); | ||
|
||
|
@@ -83,15 +89,20 @@ public function testFormRemembersFirstName(ProductListPage $productListPage, Ord | |
$me->amOnPage('/tv-audio/'); | ||
$productListPage->addProductToCartByName('Defender 2.0 SPK-480'); | ||
$me->clickByText('Go to cart'); | ||
|
||
$me->scrollTo(['css' => '#cart_form_submit']); | ||
$me->clickByText('Continue to Order'); | ||
|
||
$orderPage->selectTransport('Czech post'); | ||
$orderPage->selectPayment('Cash on delivery'); | ||
$me->waitForAjax(); | ||
$me->scrollTo(['css' => '#transport_and_payment_form_save'], null, 100); | ||
$me->clickByText('Continue in order'); | ||
|
||
$orderPage->fillFirstName('Jan'); | ||
$me->clickByText('Back to shipping and payment selection'); | ||
$me->amOnPage('/order/'); | ||
$me->scrollTo(['css' => '#transport_and_payment_form_save'], null, 100); | ||
$me->clickByText('Continue in order'); | ||
|
||
$orderPage->assertFirstNameIsFilled('Jan'); | ||
|
@@ -139,17 +150,21 @@ private function testOrderCanBeCompleted( | |
$me->amOnPage('/tv-audio/'); | ||
$productListPage->addProductToCartByName('Defender 2.0 SPK-480'); | ||
$me->clickByText('Go to cart'); | ||
|
||
$me->scrollTo(['css' => '#cart_form_submit']); | ||
$me->clickByText('Continue to Order'); | ||
|
||
$orderPage->selectTransport('Czech post'); | ||
$orderPage->selectPayment('Cash on delivery'); | ||
$me->waitForAjax(); | ||
$me->scrollTo(['css' => '#transport_and_payment_form_save'], null, 100); | ||
$me->clickByText('Continue in order'); | ||
|
||
$orderPage->fillPersonalInfo('Karel', 'Novák', '[email protected]', '123456789'); | ||
$orderPage->fillBillingAddress('Koksární 10', 'Ostrava', '702 00'); | ||
$orderPage->acceptLegalConditions(); | ||
|
||
$me->scrollTo(['css' => '#order_personal_info_form_save'], null, 100); | ||
$me->clickByText('Finish the order'); | ||
|
||
$me->see('Order sent'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters