From 4cf049b9fa8b2a75be8a7baeed60470d9185d23d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Fri, 2 Jul 2021 16:36:45 +0200 Subject: [PATCH] Extract login/authentication in Login.php --- tests/Browser/Pages/ClientPortal/Login.php | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 tests/Browser/Pages/ClientPortal/Login.php diff --git a/tests/Browser/Pages/ClientPortal/Login.php b/tests/Browser/Pages/ClientPortal/Login.php new file mode 100644 index 000000000000..11125eba444a --- /dev/null +++ b/tests/Browser/Pages/ClientPortal/Login.php @@ -0,0 +1,51 @@ +assertPathIs($this->url()); + } + + /** + * Get the element shortcuts for the page. + * + * @return array + */ + public function elements() + { + return [ + '@element' => '#selector', + ]; + } + + public function auth(Browser $browser) + { + $browser + ->visitRoute('client.login') + ->type('email', 'user@example.com') + ->type('password', 'password') + ->press('Login'); + } +}