Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/DistlistTest.php
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | public function testList(): void | ||||
->submitLogon('john@kolab.org', 'simple123', true) | ->submitLogon('john@kolab.org', 'simple123', true) | ||||
->on(new Dashboard()) | ->on(new Dashboard()) | ||||
->assertMissing('@links .link-distlists'); | ->assertMissing('@links .link-distlists'); | ||||
}); | }); | ||||
// Test that Distribution lists page is not accessible without the 'distlist' entitlement | // Test that Distribution lists page is not accessible without the 'distlist' entitlement | ||||
$this->browse(function (Browser $browser) { | $this->browse(function (Browser $browser) { | ||||
$browser->visit('/distlists') | $browser->visit('/distlists') | ||||
->assertErrorPage(404); | ->assertErrorPage(403); | ||||
}); | }); | ||||
// Create a single group, add beta+distlist entitlements | // Create a single group, add beta+distlist entitlements | ||||
$john = $this->getTestUser('john@kolab.org'); | $john = $this->getTestUser('john@kolab.org'); | ||||
$this->addDistlistEntitlement($john); | $this->addDistlistEntitlement($john); | ||||
$group = $this->getTestGroup('group-test@kolab.org'); | $group = $this->getTestGroup('group-test@kolab.org'); | ||||
$group->assignToWallet($john->wallets->first()); | $group->assignToWallet($john->wallets->first()); | ||||
Show All 18 Lines | class DistlistTest extends TestCaseDusk | ||||
* | * | ||||
* @depends testList | * @depends testList | ||||
*/ | */ | ||||
public function testCreateUpdateDelete(): void | public function testCreateUpdateDelete(): void | ||||
{ | { | ||||
// Test that the page is not available accessible without the 'distlist' entitlement | // Test that the page is not available accessible without the 'distlist' entitlement | ||||
$this->browse(function (Browser $browser) { | $this->browse(function (Browser $browser) { | ||||
$browser->visit('/distlist/new') | $browser->visit('/distlist/new') | ||||
->assertErrorPage(404); | ->assertErrorPage(403); | ||||
}); | }); | ||||
// Add beta+distlist entitlements | // Add beta+distlist entitlements | ||||
$john = $this->getTestUser('john@kolab.org'); | $john = $this->getTestUser('john@kolab.org'); | ||||
$this->addDistlistEntitlement($john); | $this->addDistlistEntitlement($john); | ||||
$this->browse(function (Browser $browser) { | $this->browse(function (Browser $browser) { | ||||
// Create a group | // Create a group | ||||
▲ Show 20 Lines • Show All 144 Lines • Show Last 20 Lines |