Skip to content
Snippets Groups Projects
Commit ac0bb8b0 authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

feature(init): init

parent 5ab24a09
Branches
Tags
1 merge request!1feature(init): init
Pipeline #243394 passed
......@@ -11,7 +11,7 @@ use Exception;
class Shopify extends WebDriver
{
public function loginAsAdmin()
public function loginAsAdmin(): void
{
$i = $this;
$isPl = false;
......@@ -64,4 +64,22 @@ class Shopify extends WebDriver
$i->saveSessionSnapshot('admin');
}
public function amOnPage($page): void
{
parent::amOnPage($page);
$this->loginOnFront();
}
public function loginOnFront(): void
{
$i = $this;
try {
$i->seeInCurrentUrl('password');
$i->fillField('password', $this->config['store_password']);
$i->click('button[type=submit]');
} catch (Exception $e) {
// do nothing
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment