diff --git a/modules/receipt/config/install/commerce_pos_receipt.settings.yml b/modules/receipt/config/install/commerce_pos_receipt.settings.yml
index c05db45..dffe30e 100644
--- a/modules/receipt/config/install/commerce_pos_receipt.settings.yml
+++ b/modules/receipt/config/install/commerce_pos_receipt.settings.yml
@@ -1,7 +1,3 @@
-dependencies:
- module:
- - commerce_pos_receipt
- - commerce_pos
header: "(logo??)
Company Name/Store#
Address line 1
Address line 2
Phone #"
footer: "Thanks for shopping at CompanyName!
Return Policy --
Exchange Policy --
Company Motto
Website --
(optional)
Visit our website for a chance to --"
header_format: "html"
diff --git a/tests/src/FunctionalJavascript/PosFormTest.php b/tests/src/FunctionalJavascript/PosFormTest.php
index 4bf2d1c..3a71712 100644
--- a/tests/src/FunctionalJavascript/PosFormTest.php
+++ b/tests/src/FunctionalJavascript/PosFormTest.php
@@ -23,6 +23,7 @@ class PosFormTest extends JavascriptTestBase {
*/
public static $modules = [
'commerce_pos',
+ 'commerce_pos_receipt',
];
/**
@@ -225,6 +226,7 @@ class PosFormTest extends JavascriptTestBase {
// Clicking finish will bring us back to the order item screen - processing
// a new order.
$this->click('input[name="commerce-pos-finish"]');
+ $this->waitForAjaxToFinish();
$web_assert->pageTextContains('Total $0.00');
$web_assert->pageTextNotContains('Cash');
$web_assert->pageTextNotContains('To Pay');
@@ -261,4 +263,12 @@ class PosFormTest extends JavascriptTestBase {
$this->assertCount(1, $results);
}
+ /**
+ * Waits for jQuery to become active and animations to complete.
+ */
+ protected function waitForAjaxToFinish() {
+ $condition = "(0 === jQuery.active && 0 === jQuery(':animated').length)";
+ $this->assertJsCondition($condition, 10000);
+ }
+
}