Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/UsersTest.php
Show First 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | public function testInfo(): void | ||||
->assertSeeIn('div.row:nth-child(2) label', 'First name') | ->assertSeeIn('div.row:nth-child(2) label', 'First name') | ||||
->assertValue('div.row:nth-child(2) input[type=text]', $this->profile['first_name']) | ->assertValue('div.row:nth-child(2) input[type=text]', $this->profile['first_name']) | ||||
->assertSeeIn('div.row:nth-child(3) label', 'Last name') | ->assertSeeIn('div.row:nth-child(3) label', 'Last name') | ||||
->assertValue('div.row:nth-child(3) input[type=text]', $this->profile['last_name']) | ->assertValue('div.row:nth-child(3) input[type=text]', $this->profile['last_name']) | ||||
->assertSeeIn('div.row:nth-child(4) label', 'Email') | ->assertSeeIn('div.row:nth-child(4) label', 'Email') | ||||
->assertValue('div.row:nth-child(4) input[type=text]', 'john@kolab.org') | ->assertValue('div.row:nth-child(4) input[type=text]', 'john@kolab.org') | ||||
->assertDisabled('div.row:nth-child(4) input[type=text]') | ->assertDisabled('div.row:nth-child(4) input[type=text]') | ||||
->assertSeeIn('div.row:nth-child(5) label', 'Email aliases') | ->assertSeeIn('div.row:nth-child(5) label', 'Email aliases') | ||||
->assertVisible('div.row:nth-child(5) .listinput-widget') | ->assertVisible('div.row:nth-child(5) .list-input') | ||||
->with(new ListInput('#aliases'), function (Browser $browser) { | ->with(new ListInput('#aliases'), function (Browser $browser) { | ||||
$browser->assertListInputValue(['john.doe@kolab.org']) | $browser->assertListInputValue(['john.doe@kolab.org']) | ||||
->assertValue('@input', ''); | ->assertValue('@input', ''); | ||||
}) | }) | ||||
->assertSeeIn('div.row:nth-child(6) label', 'Password') | ->assertSeeIn('div.row:nth-child(6) label', 'Password') | ||||
->assertValue('div.row:nth-child(6) input[type=password]', '') | ->assertValue('div.row:nth-child(6) input[type=password]', '') | ||||
->assertSeeIn('div.row:nth-child(7) label', 'Confirm password') | ->assertSeeIn('div.row:nth-child(7) label', 'Confirm password') | ||||
->assertValue('div.row:nth-child(7) input[type=password]', '') | ->assertValue('div.row:nth-child(7) input[type=password]', '') | ||||
▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | public function testNewUser(): void | ||||
->assertSeeIn('div.row:nth-child(1) label', 'First name') | ->assertSeeIn('div.row:nth-child(1) label', 'First name') | ||||
->assertValue('div.row:nth-child(1) input[type=text]', '') | ->assertValue('div.row:nth-child(1) input[type=text]', '') | ||||
->assertSeeIn('div.row:nth-child(2) label', 'Last name') | ->assertSeeIn('div.row:nth-child(2) label', 'Last name') | ||||
->assertValue('div.row:nth-child(2) input[type=text]', '') | ->assertValue('div.row:nth-child(2) input[type=text]', '') | ||||
->assertSeeIn('div.row:nth-child(3) label', 'Email') | ->assertSeeIn('div.row:nth-child(3) label', 'Email') | ||||
->assertValue('div.row:nth-child(3) input[type=text]', '') | ->assertValue('div.row:nth-child(3) input[type=text]', '') | ||||
->assertEnabled('div.row:nth-child(3) input[type=text]') | ->assertEnabled('div.row:nth-child(3) input[type=text]') | ||||
->assertSeeIn('div.row:nth-child(4) label', 'Email aliases') | ->assertSeeIn('div.row:nth-child(4) label', 'Email aliases') | ||||
->assertVisible('div.row:nth-child(4) .listinput-widget') | ->assertVisible('div.row:nth-child(4) .list-input') | ||||
->with(new ListInput('#aliases'), function (Browser $browser) { | ->with(new ListInput('#aliases'), function (Browser $browser) { | ||||
$browser->assertListInputValue([]) | $browser->assertListInputValue([]) | ||||
->assertValue('@input', ''); | ->assertValue('@input', ''); | ||||
}) | }) | ||||
->assertSeeIn('div.row:nth-child(5) label', 'Password') | ->assertSeeIn('div.row:nth-child(5) label', 'Password') | ||||
->assertValue('div.row:nth-child(5) input[type=password]', '') | ->assertValue('div.row:nth-child(5) input[type=password]', '') | ||||
->assertSeeIn('div.row:nth-child(6) label', 'Confirm password') | ->assertSeeIn('div.row:nth-child(6) label', 'Confirm password') | ||||
->assertValue('div.row:nth-child(6) input[type=password]', '') | ->assertValue('div.row:nth-child(6) input[type=password]', '') | ||||
▲ Show 20 Lines • Show All 231 Lines • Show Last 20 Lines |