Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/UsersTest.php
Show First 20 Lines • Show All 274 Lines • ▼ Show 20 Lines | public function testInfo(): void | ||||
$expected = ['activesync', 'groupware', 'mailbox', 'storage', 'storage', 'storage']; | $expected = ['activesync', 'groupware', 'mailbox', 'storage', 'storage', 'storage']; | ||||
$this->assertUserEntitlements($john, $expected); | $this->assertUserEntitlements($john, $expected); | ||||
// Test subscriptions interaction | // Test subscriptions interaction | ||||
$browser->with('@form', function (Browser $browser) { | $browser->with('@form', function (Browser $browser) { | ||||
$browser->with('@skus', function ($browser) { | $browser->with('@skus', function ($browser) { | ||||
// Uncheck 'groupware', expect activesync unchecked | // Uncheck 'groupware', expect activesync unchecked | ||||
$browser->click('@sku-input-groupware') | $browser->click('#sku-input-groupware') | ||||
->assertNotChecked('@sku-input-groupware') | ->assertNotChecked('#sku-input-groupware') | ||||
->assertNotChecked('@sku-input-activesync') | ->assertNotChecked('#sku-input-activesync') | ||||
->assertEnabled('@sku-input-activesync') | ->assertEnabled('#sku-input-activesync') | ||||
->assertNotReadonly('@sku-input-activesync') | ->assertNotReadonly('#sku-input-activesync') | ||||
// Check 'activesync', expect an alert | // Check 'activesync', expect an alert | ||||
->click('@sku-input-activesync') | ->click('#sku-input-activesync') | ||||
->assertDialogOpened('Activesync requires Groupware Features.') | ->assertDialogOpened('Activesync requires Groupware Features.') | ||||
->acceptDialog() | ->acceptDialog() | ||||
->assertNotChecked('@sku-input-activesync') | ->assertNotChecked('#sku-input-activesync') | ||||
// Check '2FA', expect 'activesync' unchecked and readonly | // Check '2FA', expect 'activesync' unchecked and readonly | ||||
->click('@sku-input-2fa') | ->click('#sku-input-2fa') | ||||
->assertChecked('@sku-input-2fa') | ->assertChecked('#sku-input-2fa') | ||||
->assertNotChecked('@sku-input-activesync') | ->assertNotChecked('#sku-input-activesync') | ||||
->assertReadonly('@sku-input-activesync') | ->assertReadonly('#sku-input-activesync') | ||||
// Uncheck '2FA' | // Uncheck '2FA' | ||||
->click('@sku-input-2fa') | ->click('#sku-input-2fa') | ||||
->assertNotChecked('@sku-input-2fa') | ->assertNotChecked('#sku-input-2fa') | ||||
->assertNotReadonly('@sku-input-activesync'); | ->assertNotReadonly('#sku-input-activesync'); | ||||
}); | }); | ||||
}); | }); | ||||
}); | }); | ||||
} | } | ||||
/** | /** | ||||
* Test user adding page | * Test user adding page | ||||
* | * | ||||
▲ Show 20 Lines • Show All 251 Lines • Show Last 20 Lines |