Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/UsersTest.php
Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | public function testInfo(): void | ||||
// Test subscriptions | // Test subscriptions | ||||
$browser->with('@form', function (Browser $browser) { | $browser->with('@form', function (Browser $browser) { | ||||
$browser->assertSeeIn('div.row:nth-child(9) label', 'Subscriptions') | $browser->assertSeeIn('div.row:nth-child(9) label', 'Subscriptions') | ||||
->assertVisible('@skus.row:nth-child(9)') | ->assertVisible('@skus.row:nth-child(9)') | ||||
->with('@skus', function ($browser) { | ->with('@skus', function ($browser) { | ||||
$browser->assertElementsCount('tbody tr', 6) | $browser->assertElementsCount('tbody tr', 6) | ||||
// Mailbox SKU | // Mailbox SKU | ||||
->assertSeeIn('tbody tr:nth-child(1) td.name', 'User Mailbox') | ->assertSeeIn('tbody tr:nth-child(1) td.name', 'User Mailbox') | ||||
->assertSeeIn('tbody tr:nth-child(1) td.price', '4,44 CHF/month') | ->assertSeeIn('tbody tr:nth-child(1) td.price', '5,00 CHF/month') | ||||
->assertChecked('tbody tr:nth-child(1) td.selection input') | ->assertChecked('tbody tr:nth-child(1) td.selection input') | ||||
->assertDisabled('tbody tr:nth-child(1) td.selection input') | ->assertDisabled('tbody tr:nth-child(1) td.selection input') | ||||
->assertTip( | ->assertTip( | ||||
'tbody tr:nth-child(1) td.buttons button', | 'tbody tr:nth-child(1) td.buttons button', | ||||
'Just a mailbox' | 'Just a mailbox' | ||||
) | ) | ||||
// Storage SKU | // Storage SKU | ||||
->assertSeeIn('tbody tr:nth-child(2) td.name', 'Storage Quota') | ->assertSeeIn('tbody tr:nth-child(2) td.name', 'Storage Quota') | ||||
->assertSeeIn('tr:nth-child(2) td.price', '0,00 CHF/month') | ->assertSeeIn('tr:nth-child(2) td.price', '0,00 CHF/month') | ||||
->assertChecked('tbody tr:nth-child(2) td.selection input') | ->assertChecked('tbody tr:nth-child(2) td.selection input') | ||||
->assertDisabled('tbody tr:nth-child(2) td.selection input') | ->assertDisabled('tbody tr:nth-child(2) td.selection input') | ||||
->assertTip( | ->assertTip( | ||||
'tbody tr:nth-child(2) td.buttons button', | 'tbody tr:nth-child(2) td.buttons button', | ||||
'Some wiggle room' | 'Some wiggle room' | ||||
) | ) | ||||
->with(new QuotaInput('tbody tr:nth-child(2) .range-input'), function ($browser) { | ->with(new QuotaInput('tbody tr:nth-child(2) .range-input'), function ($browser) { | ||||
$browser->assertQuotaValue(2)->setQuotaValue(3); | $browser->assertQuotaValue(2)->setQuotaValue(3); | ||||
}) | }) | ||||
->assertSeeIn('tr:nth-child(2) td.price', '0,25 CHF/month') | ->assertSeeIn('tr:nth-child(2) td.price', '0,25 CHF/month') | ||||
// groupware SKU | // groupware SKU | ||||
->assertSeeIn('tbody tr:nth-child(3) td.name', 'Groupware Features') | ->assertSeeIn('tbody tr:nth-child(3) td.name', 'Groupware Features') | ||||
->assertSeeIn('tbody tr:nth-child(3) td.price', '5,55 CHF/month') | ->assertSeeIn('tbody tr:nth-child(3) td.price', '4,90 CHF/month') | ||||
->assertChecked('tbody tr:nth-child(3) td.selection input') | ->assertChecked('tbody tr:nth-child(3) td.selection input') | ||||
->assertEnabled('tbody tr:nth-child(3) td.selection input') | ->assertEnabled('tbody tr:nth-child(3) td.selection input') | ||||
->assertTip( | ->assertTip( | ||||
'tbody tr:nth-child(3) td.buttons button', | 'tbody tr:nth-child(3) td.buttons button', | ||||
'Groupware functions like Calendar, Tasks, Notes, etc.' | 'Groupware functions like Calendar, Tasks, Notes, etc.' | ||||
) | ) | ||||
// ActiveSync SKU | // ActiveSync SKU | ||||
->assertSeeIn('tbody tr:nth-child(4) td.name', 'Activesync') | ->assertSeeIn('tbody tr:nth-child(4) td.name', 'Activesync') | ||||
->assertSeeIn('tbody tr:nth-child(4) td.price', '1,00 CHF/month') | ->assertSeeIn('tbody tr:nth-child(4) td.price', '0,00 CHF/month') | ||||
->assertNotChecked('tbody tr:nth-child(4) td.selection input') | ->assertNotChecked('tbody tr:nth-child(4) td.selection input') | ||||
->assertEnabled('tbody tr:nth-child(4) td.selection input') | ->assertEnabled('tbody tr:nth-child(4) td.selection input') | ||||
->assertTip( | ->assertTip( | ||||
'tbody tr:nth-child(4) td.buttons button', | 'tbody tr:nth-child(4) td.buttons button', | ||||
'Mobile synchronization' | 'Mobile synchronization' | ||||
) | ) | ||||
// 2FA SKU | // 2FA SKU | ||||
->assertSeeIn('tbody tr:nth-child(5) td.name', '2-Factor Authentication') | ->assertSeeIn('tbody tr:nth-child(5) td.name', '2-Factor Authentication') | ||||
▲ Show 20 Lines • Show All 449 Lines • Show Last 20 Lines |