Add more in-browser tests
parent
a88798ab18
commit
895b6f54f3
@ -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');
|
||||
});
|
||||
}
|
||||
}
|
@ -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');
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue