Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/UsersTest.php
Show First 20 Lines • Show All 255 Lines • ▼ Show 20 Lines | public function testInfo(): void | ||||
->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', '5,55 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.' | ||||
) | ) | ||||
// 2FA SKU | // ActiveSync SKU | ||||
->assertSeeIn('tbody tr:nth-child(4) td.name', '2-Factor Authentication') | ->assertSeeIn('tbody tr:nth-child(4) td.name', 'Activesync') | ||||
->assertSeeIn('tbody tr:nth-child(4) td.price', '0,00 CHF/month') | ->assertSeeIn('tbody tr:nth-child(4) td.price', '1,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', | ||||
'Two factor authentication for webmail and administration panel' | 'Mobile synchronization' | ||||
) | ) | ||||
// ActiveSync SKU | // 2FA SKU | ||||
->assertSeeIn('tbody tr:nth-child(5) td.name', 'Activesync') | ->assertSeeIn('tbody tr:nth-child(5) td.name', '2-Factor Authentication') | ||||
->assertSeeIn('tbody tr:nth-child(5) td.price', '1,00 CHF/month') | ->assertSeeIn('tbody tr:nth-child(5) td.price', '0,00 CHF/month') | ||||
->assertNotChecked('tbody tr:nth-child(5) td.selection input') | ->assertNotChecked('tbody tr:nth-child(5) td.selection input') | ||||
->assertEnabled('tbody tr:nth-child(5) td.selection input') | ->assertEnabled('tbody tr:nth-child(5) td.selection input') | ||||
->assertTip( | ->assertTip( | ||||
'tbody tr:nth-child(5) td.buttons button', | 'tbody tr:nth-child(5) td.buttons button', | ||||
'Mobile synchronization' | 'Two factor authentication for webmail and administration panel' | ||||
) | ) | ||||
->click('tbody tr:nth-child(5) td.selection input'); | ->click('tbody tr:nth-child(4) td.selection input'); | ||||
}) | }) | ||||
->assertMissing('@skus table + .hint') | ->assertMissing('@skus table + .hint') | ||||
->click('button[type=submit]'); | ->click('button[type=submit]'); | ||||
}) | }) | ||||
->with(new Toast(Toast::TYPE_SUCCESS), function (Browser $browser) { | ->with(new Toast(Toast::TYPE_SUCCESS), function (Browser $browser) { | ||||
$browser->assertToastTitle('') | $browser->assertToastTitle('') | ||||
->assertToastMessage('User data updated successfully') | ->assertToastMessage('User data updated successfully') | ||||
->closeToast(); | ->closeToast(); | ||||
▲ Show 20 Lines • Show All 265 Lines • ▼ Show 20 Lines | public function testDiscountedPrices(): void | ||||
// Storage SKU | // Storage SKU | ||||
->assertSeeIn('tr:nth-child(2) td.price', '0,00 CHF/month¹') | ->assertSeeIn('tr:nth-child(2) td.price', '0,00 CHF/month¹') | ||||
->with($quota_input, function (Browser $browser) { | ->with($quota_input, function (Browser $browser) { | ||||
$browser->setQuotaValue(100); | $browser->setQuotaValue(100); | ||||
}) | }) | ||||
->assertSeeIn('tr:nth-child(2) td.price', '21,56 CHF/month¹') | ->assertSeeIn('tr:nth-child(2) td.price', '21,56 CHF/month¹') | ||||
// groupware SKU | // groupware SKU | ||||
->assertSeeIn('tbody tr:nth-child(3) td.price', '4,99 CHF/month¹') | ->assertSeeIn('tbody tr:nth-child(3) td.price', '4,99 CHF/month¹') | ||||
// 2FA SKU | |||||
->assertSeeIn('tbody tr:nth-child(4) td.price', '0,00 CHF/month¹') | |||||
// ActiveSync SKU | // ActiveSync SKU | ||||
->assertSeeIn('tbody tr:nth-child(5) td.price', '0,90 CHF/month¹'); | ->assertSeeIn('tbody tr:nth-child(4) td.price', '0,90 CHF/month¹') | ||||
// 2FA SKU | |||||
->assertSeeIn('tbody tr:nth-child(5) td.price', '0,00 CHF/month¹'); | |||||
}) | }) | ||||
->assertSeeIn('@skus table + .hint', '¹ applied discount: 10% - Test voucher'); | ->assertSeeIn('@skus table + .hint', '¹ applied discount: 10% - Test voucher'); | ||||
}); | }); | ||||
}); | }); | ||||
// Packages on new user page | // Packages on new user page | ||||
$this->browse(function (Browser $browser) { | $this->browse(function (Browser $browser) { | ||||
$browser->visit(new UserList()) | $browser->visit(new UserList()) | ||||
Show All 13 Lines |