@@ -185,4 +185,4 @@
},
mixins: [formHandler]
}
-
\ No newline at end of file
+
diff --git a/resources/assets/vue/components/bookings/forms/confirmBookingComponent.vue b/resources/assets/vue/components/bookings/forms/confirmBookingComponent.vue
index 5897646c..2cb67ca0 100644
--- a/resources/assets/vue/components/bookings/forms/confirmBookingComponent.vue
+++ b/resources/assets/vue/components/bookings/forms/confirmBookingComponent.vue
@@ -1,10 +1,10 @@
-
+
-
+
@@ -37,4 +37,4 @@
},
mixins: [ModalFormHandler]
}
-
\ No newline at end of file
+
diff --git a/tests/Browser/DryRun/CreateBookingTest.php b/tests/Browser/DryRun/CreateBookingTest.php
new file mode 100644
index 00000000..98a47da7
--- /dev/null
+++ b/tests/Browser/DryRun/CreateBookingTest.php
@@ -0,0 +1,68 @@
+browse(function (Browser $browser) {
+ $browser->visit('http://localhost:86')
+ ->pause(500)
+ ->typeSlowly('email', 'junkit.mah@bioloop.com.my')
+ ->typeSlowly('password', '123456abcabc')
+ ->click('#sign-in')
+ ->pause(5000)
+ ->assertPathIs('/dashboard');
+ });
+ }
+
+ /**
+ * @test
+ * @depends testLogin
+ */
+ public function testCreateBooking()
+ {
+ $this->browse(function (Browser $browser) {
+ $browser->waitForLocation('/dashboard')
+ ->waitForText('X1 Service')
+ ->typeSlowly('cc_sending', '10000')
+ ->pause(5000)
+ ->waitForText('Transfer Now',5000)
+ ->click('#transfer-now')
+ ->whenAvailable('#select-account-modal', function ($modal) {
+ $modal->pause(1000)
+ ->press('#select-list')
+ ->press('#select-option')
+ ->pause(5000)
+ ->click('#confirm-new-booking');
+ #->click('#cancel-new-booking');
+ })
+ ->pause(7000)
+ ->typeSlowly('stock_code', '123')
+ ->typeSlowly('desc', 'Product A')
+ ->typeSlowly('unit_price', '100')
+ ->pause(7000)
+ ->click('#add-quantity')
+ ->click('#add-quantity')
+ ->pause(7000)
+ ->click('#minus-quantity')
+ ->click('#minus-quantity')
+ ->pause(7000)
+ ->typeSlowly('quantity', '5')
+ ->pause(7000)
+ ->click('#add-product')
+ ->pause(7000)
+ ->click('#save-purchase-order')
+ ->pause(10000);
+ //Assert if booking created successfully
+
+ });
+ }
+}
diff --git a/tests/Browser/DryRun/LoginTe.php b/tests/Browser/DryRun/LoginTe.php
new file mode 100644
index 00000000..13ebc523
--- /dev/null
+++ b/tests/Browser/DryRun/LoginTe.php
@@ -0,0 +1,26 @@
+browse(function (Browser $browser) {
+ $browser->visit('http://localhost:86')
+ ->pause(500)
+ ->type('email', 'junkit.mah@bioloop.com.my')
+ ->type('password', '123456abcabc')
+ ->click('#sign-in')
+ ->pause(5000)
+ ->assertPathIs('/dashboard');
+ });
+ }
+}
diff --git a/tests/Browser/Pages/HomePage.php b/tests/Browser/Pages/HomePage.php
new file mode 100644
index 00000000..26bf174f
--- /dev/null
+++ b/tests/Browser/Pages/HomePage.php
@@ -0,0 +1,41 @@
+ '#selector',
+ ];
+ }
+}
diff --git a/tests/Browser/Pages/Page.php b/tests/Browser/Pages/Page.php
new file mode 100644
index 00000000..f8d76222
--- /dev/null
+++ b/tests/Browser/Pages/Page.php
@@ -0,0 +1,20 @@
+ '#selector',
+ ];
+ }
+}
diff --git a/tests/Browser/console/.gitignore b/tests/Browser/console/.gitignore
new file mode 100644
index 00000000..d6b7ef32
--- /dev/null
+++ b/tests/Browser/console/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/tests/Browser/screenshots/.gitignore b/tests/Browser/screenshots/.gitignore
new file mode 100644
index 00000000..d6b7ef32
--- /dev/null
+++ b/tests/Browser/screenshots/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/tests/Browser/source/.gitignore b/tests/Browser/source/.gitignore
new file mode 100644
index 00000000..d6b7ef32
--- /dev/null
+++ b/tests/Browser/source/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/tests/DuskTestCase.php b/tests/DuskTestCase.php
new file mode 100644
index 00000000..2aabaad9
--- /dev/null
+++ b/tests/DuskTestCase.php
@@ -0,0 +1,59 @@
+addArguments([
+ '--no-sandbox'
+ ]);
+
+
+ return RemoteWebDriver::create(
+ //'http://localhost:86',
+ 'http://localhost:9515',
+ DesiredCapabilities::chrome()->setCapability(
+ ChromeOptions::CAPABILITY, $options
+ )
+ );
+ }
+
+ /**
+ * Determine whether the Dusk command has disabled headless mode.
+ *
+ * @return bool
+ */
+ protected function hasHeadlessDisabled()
+ {
+ return true;
+ //isset($_SERVER['DUSK_HEADLESS_DISABLED']) ||
+ //isset($_ENV['DUSK_HEADLESS_DISABLED']);
+ }
+}