Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2571506
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
10 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/tests/Browser/Login.php b/tests/Browser/Login.php
index dcc20ad3c..ea2321f9d 100644
--- a/tests/Browser/Login.php
+++ b/tests/Browser/Login.php
@@ -1,36 +1,47 @@
<?php
namespace Tests\Browser;
class Login extends DuskTestCase
{
protected function setUp()
{
parent::setUp();
\bootstrap::init_db();
\bootstrap::init_imap();
}
public function testLogin()
{
- // first test, we're already on the login page
+ // First test, we're already on the logon page
$this->browse(function ($browser) {
$browser->visit('/');
$browser->assertTitleContains($this->app->config->get('product_name'));
// task should be set to 'login'
$this->assertEnvEquals('task', 'login');
+ // Logon form
+ $browser->assertVisible('#logo');
+ $browser->assertVisible('#login-form');
$browser->assertVisible('#rcmloginuser');
$browser->assertVisible('#rcmloginpwd');
+ $browser->assertVisible('#rcmloginsubmit');
+ $browser->assertSee($this->app->config->get('product_name'));
+
+ // Support link
+ if ($url = $this->app->config->get('support_url')) {
+ $browser->assertSeeLink('Get support');
+ $this->assertStringStartsWith($url, $browser->attribute('.support-link', 'href'));
+ }
// test valid login
$this->go('mail');
// task should be set to 'mail' now
$this->assertEnvEquals('task', 'mail');
});
}
}
diff --git a/tests/Browser/Settings/About.php b/tests/Browser/Settings/About.php
index f687a9d1e..73c7df56a 100644
--- a/tests/Browser/Settings/About.php
+++ b/tests/Browser/Settings/About.php
@@ -1,19 +1,27 @@
<?php
namespace Tests\Browser\Settings;
class About extends \Tests\Browser\DuskTestCase
{
public function testAbout()
{
$this->browse(function ($browser) {
- $this->go('settings', 'about');
+ $this->go('settings');
- // check task and action
- $this->assertEnvEquals('task', 'settings');
- $this->assertEnvEquals('action', 'about');
+ $browser->click('#taskmenu a.about');
- $browser->assertVisible('#pluginlist');
+ $browser->assertSeeIn('.ui-dialog-title', 'About');
+ $browser->assertVisible('.ui-dialog #aboutframe');
+
+ $browser->withinFrame('#aboutframe', function ($browser) {
+ // check task and action
+ $this->assertEnvEquals('task', 'settings');
+ $this->assertEnvEquals('action', 'about');
+
+ $browser->assertSee($this->app->config->get('product_name'));
+ $browser->assertVisible('#pluginlist');
+ });
});
}
}
diff --git a/tests/Browser/Settings/Folders.php b/tests/Browser/Settings/Folders.php
index 82c0b7d2e..549922460 100644
--- a/tests/Browser/Settings/Folders.php
+++ b/tests/Browser/Settings/Folders.php
@@ -1,23 +1,33 @@
<?php
namespace Tests\Browser\Settings;
class Folders extends \Tests\Browser\DuskTestCase
{
public function testFolders()
{
$this->browse(function ($browser) {
$this->go('settings', 'folders');
// task should be set to 'settings' and action to 'folders'
$this->assertEnvEquals('task', 'settings');
$this->assertEnvEquals('action', 'folders');
$objects = $this->getObjects();
// these objects should be there always
$this->assertContains('quotadisplay', $objects);
$this->assertContains('subscriptionlist', $objects);
+
+ $browser->assertVisible('#settings-menu li.folders.selected');
+
+ // Folders list
+ $browser->assertVisible('#subscription-table li.mailbox.inbox');
+
+ // Toolbar menu
+ $browser->assertVisible('#toolbar-menu a.create:not(.disabled)');
+ $browser->assertVisible('#toolbar-menu a.delete.disabled');
+ $browser->assertVisible('#toolbar-menu a.purge.disabled');
});
}
}
diff --git a/tests/Browser/Settings/Identities.php b/tests/Browser/Settings/Identities.php
index d885f9edb..f3e3fd701 100644
--- a/tests/Browser/Settings/Identities.php
+++ b/tests/Browser/Settings/Identities.php
@@ -1,22 +1,32 @@
<?php
namespace Tests\Browser\Settings;
class Identities extends \Tests\Browser\DuskTestCase
{
public function testIdentities()
{
$this->browse(function ($browser) {
$this->go('settings', 'identities');
// check task and action
$this->assertEnvEquals('task', 'settings');
$this->assertEnvEquals('action', 'identities');
$objects = $this->getObjects();
// these objects should be there always
$this->assertContains('identitieslist', $objects);
+
+ $browser->assertVisible('#settings-menu li.identities.selected');
+
+ // Identities list
+ $browser->assertVisible('#identities-table tr:first-child.focused');
+ $browser->assertSeeIn('#identities-table tr:first-child td.mail', TESTS_USER);
+
+ // Toolbar menu
+ $browser->assertVisible('#toolbar-menu a.create:not(.disabled)');
+ $browser->assertVisible('#toolbar-menu a.delete.disabled');
});
}
}
diff --git a/tests/Browser/Settings/Preferences.php b/tests/Browser/Settings/Preferences.php
new file mode 100644
index 000000000..c0998311f
--- /dev/null
+++ b/tests/Browser/Settings/Preferences.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace Tests\Browser\Settings;
+
+class Preferences extends \Tests\Browser\DuskTestCase
+{
+ public function testPreferences()
+ {
+ $this->browse(function ($browser) {
+ $this->go('settings');
+
+ $objects = $this->getObjects();
+
+ $this->assertContains('sectionslist', $objects);
+
+ $browser->assertVisible('#settings-menu li.preferences.selected');
+
+ // Preferences actions
+ $browser->assertVisible('#sections-table');
+ $browser->assertSeeIn('#sections-table tr.general', 'User Interface');
+ $browser->assertSeeIn('#sections-table tr.mailbox', 'Mailbox View');
+ $browser->assertSeeIn('#sections-table tr.mailview', 'Displaying Messages');
+ $browser->assertSeeIn('#sections-table tr.compose', 'Composing Messages');
+ $browser->assertSeeIn('#sections-table tr.addressbook', 'Contacts');
+ $browser->assertSeeIn('#sections-table tr.folders', 'Special Folders');
+ $browser->assertSeeIn('#sections-table tr.server', 'Server Settings');
+ });
+ }
+}
diff --git a/tests/Browser/Settings/Responses.php b/tests/Browser/Settings/Responses.php
new file mode 100644
index 000000000..9de267aef
--- /dev/null
+++ b/tests/Browser/Settings/Responses.php
@@ -0,0 +1,32 @@
+<?php
+
+namespace Tests\Browser\Settings;
+
+class Responses extends \Tests\Browser\DuskTestCase
+{
+ public function testIdentities()
+ {
+ $this->browse(function ($browser) {
+ $this->go('settings', 'responses');
+
+ // check task and action
+ $this->assertEnvEquals('task', 'settings');
+ $this->assertEnvEquals('action', 'responses');
+
+ $objects = $this->getObjects();
+
+ // these objects should be there always
+ $this->assertContains('responseslist', $objects);
+
+ $browser->assertVisible('#settings-menu li.responses.selected');
+
+ // Responses list
+ $browser->assertPresent('#responses-table');
+ $browser->assertMissing('#responses-table tr');
+
+ // Toolbar menu
+ $browser->assertVisible('#toolbar-menu a.create:not(.disabled)');
+ $browser->assertVisible('#toolbar-menu a.delete.disabled');
+ });
+ }
+}
diff --git a/tests/Browser/Settings/Settings.php b/tests/Browser/Settings/Settings.php
index cfef01ceb..76b9ad148 100644
--- a/tests/Browser/Settings/Settings.php
+++ b/tests/Browser/Settings/Settings.php
@@ -1,20 +1,25 @@
<?php
namespace Tests\Browser\Settings;
class Settings extends \Tests\Browser\DuskTestCase
{
public function testSettings()
{
$this->browse(function ($browser) {
$this->go('settings');
// task should be set to 'settings'
$this->assertEnvEquals('task', 'settings');
- $objects = $this->getObjects();
+ $browser->assertSeeIn('#layout-sidebar .header', 'Settings');
- $this->assertContains('sectionslist', $objects);
+ // Sidebar menu
+ $browser->assertVisible('#settings-menu');
+ $browser->assertSeeIn('#settings-menu li.preferences', 'Preferences');
+ $browser->assertSeeIn('#settings-menu li.folders', 'Folders');
+ $browser->assertSeeIn('#settings-menu li.identities', 'Identities');
+ $browser->assertSeeIn('#settings-menu li.responses', 'Responses');
});
}
}
diff --git a/tests/Browser/phpunit.xml b/tests/Browser/phpunit.xml
index eb6ea316c..b9605ba59 100644
--- a/tests/Browser/phpunit.xml
+++ b/tests/Browser/phpunit.xml
@@ -1,27 +1,29 @@
<phpunit backupGlobals="false"
bootstrap="bootstrap.php"
colors="true">
<testsuites>
<testsuite name="Logon">
<file>Login.php</file>
<file>Logout.php</file>
</testsuite>
<testsuite name="Addressbook">
<file>Addressbook/Addressbook.php</file>
<file>Addressbook/Import.php</file>
</testsuite>
<testsuite name="Settings">
- <file>Settings/About.php</file>
+ <file>Settings/Settings.php</file>
+ <file>Settings/Preferences.php</file>
<file>Settings/Folders.php</file>
<file>Settings/Identities.php</file>
- <file>Settings/Settings.php</file>
+ <file>Settings/Responses.php</file>
+ <file>Settings/About.php</file>
</testsuite>
<testsuite name="Mail">
<file>Mail/Mail.php</file>
<file>Mail/CheckRecent.php</file>
<file>Mail/Compose.php</file>
<file>Mail/Getunread.php</file>
<file>Mail/List.php</file>
</testsuite>
</testsuites>
</phpunit>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Mar 19, 8:42 AM (13 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
457666
Default Alt Text
(10 KB)
Attached To
Mode
R3 roundcubemail
Attached
Detach File
Event Timeline
Log In to Comment