refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s

This commit is contained in:
Kroonk
2026-05-22 16:19:55 +02:00
parent 38cc4c09ca
commit a213a1dba0
2215 changed files with 242567 additions and 6015 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class DashboardValidate2fa extends Page
{
use DatabaseTransactions;
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/dashboard';
}
/**
* Assert that the browser is on the page.
*
* @param Browser $browser
* @return void
*/
public function assert(Browser $browser)
{
$browser->assertPathIs($this->url());
}
/**
* Get the element shortcuts for the page.
*
* @return array
*/
public function elements()
{
return [
'verify' => "button[name='verify']",
'otp' => '#one_time_password',
];
}
}

View File

@@ -0,0 +1,43 @@
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class HomePage extends Page
{
use DatabaseTransactions;
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/';
}
/**
* Assert that the browser is on the page.
*
* @return void
*/
public function assert(Browser $browser)
{
//
}
/**
* Get the element shortcuts for the page.
*
* @return array
*/
public function elements()
{
return [
'@element' => '#selector',
];
}
}

View File

@@ -0,0 +1,44 @@
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ImportVCardUpload extends Page
{
use DatabaseTransactions;
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/settings/import/upload';
}
/**
* Assert that the browser is on the page.
*
* @param Browser $browser
* @return void
*/
public function assert(Browser $browser)
{
$browser->assertPathIs($this->url());
}
/**
* Get the element shortcuts for the page.
*
* @return array
*/
public function elements()
{
return [
'upload' => '#upload',
];
}
}

View File

@@ -0,0 +1,21 @@
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Page as BasePage;
abstract class Page extends BasePage
{
/**
* Get the global element shortcuts for the site.
*
* @return array
*/
public static function siteElements()
{
return [
'@link' => "a[@href='link']",
'alert' => '.alert',
];
}
}

View File

@@ -0,0 +1,45 @@
<?php
namespace Tests\Browser\Pages\Settings;
use Laravel\Dusk\Browser;
use Tests\Browser\Pages\Page;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class SettingsPersonnalization extends Page
{
use DatabaseTransactions;
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/settings/personalization';
}
/**
* Assert that the browser is on the page.
*
* @param Browser $browser
* @return void
*/
public function assert(Browser $browser)
{
$browser->assertPathIs($this->url());
}
/**
* Get the element shortcuts for the page.
*
* @return array
*/
public function elements()
{
return [
'@reminder-rule-label' => '.reminder-rule-7 > span',
];
}
}

View File

@@ -0,0 +1,44 @@
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class SettingsDAV extends Page
{
use DatabaseTransactions;
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/settings/dav';
}
/**
* Assert that the browser is on the page.
*
* @param Browser $browser
* @return void
*/
public function assert(Browser $browser)
{
$browser->assertPathIs($this->url());
}
/**
* Get the element shortcuts for the page.
*
* @return array
*/
public function elements()
{
return [
'dav_url_base' => '#dav_url_base',
];
}
}

View File

@@ -0,0 +1,54 @@
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class SettingsSecurity extends Page
{
use DatabaseTransactions;
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/settings/security';
}
/**
* Assert that the browser is on the page.
*
* @param Browser $browser
* @return void
*/
public function assert(Browser $browser)
{
$browser->assertPathIs($this->url());
}
/**
* Get the element shortcuts for the page.
*
* @return array
*/
public function elements()
{
return [
'two_factor_link' => "a:contains('Enable Two Factor Authentication')",
'barcode' => '#barcode',
'secretkey' => '#secretkey',
'buttonVerify' => "button[name='verify']",
'enableVerify' => '#verify1',
'disableVerify' => '#verify2',
'otpenable' => '#one_time_password1',
'otpdisable' => '#one_time_password2',
'enableModal' => '#enableModal',
'disableModal' => '#disableModal',
'registerModal' => '#registerModal',
];
}
}

View File

@@ -0,0 +1,45 @@
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class SettingsSecurity2faDisable extends Page
{
use DatabaseTransactions;
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/settings/security/2fa-disable';
}
/**
* Assert that the browser is on the page.
*
* @param Browser $browser
* @return void
*/
public function assert(Browser $browser)
{
$browser->assertPathIs($this->url());
}
/**
* Get the element shortcuts for the page.
*
* @return array
*/
public function elements()
{
return [
'verify' => "button[name='verify']",
'otp' => '#one_time_password',
];
}
}

View File

@@ -0,0 +1,47 @@
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class SettingsSecurity2faEnable extends Page
{
use DatabaseTransactions;
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/settings/security/2fa-enable';
}
/**
* Assert that the browser is on the page.
*
* @param Browser $browser
* @return void
*/
public function assert(Browser $browser)
{
$browser->assertPathIs($this->url());
}
/**
* Get the element shortcuts for the page.
*
* @return array
*/
public function elements()
{
return [
'barcode' => '#barcode',
'secretkey' => '#secretkey',
'verify' => "button[name='verify']",
'otp' => '#one_time_password',
];
}
}

View File

@@ -0,0 +1,44 @@
<?php
namespace Tests\Browser\Pages;
use Laravel\Dusk\Browser;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class Validate2fa extends Page
{
use DatabaseTransactions;
/**
* Get the URL for the page.
*
* @return string
*/
public function url()
{
return '/validate2fa';
}
/**
* Assert that the browser is on the page.
*
* @param Browser $browser
* @return void
*/
public function assert(Browser $browser)
{
$browser->assertPathIs($this->url());
}
/**
* Get the element shortcuts for the page.
*
* @return array
*/
public function elements()
{
return [
'@element' => '#selector',
];
}
}