Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/UsersTest.php
Show First 20 Lines • Show All 324 Lines • ▼ Show 20 Lines | public function testInfo(): void | ||||
// Test creating a password reset link | // Test creating a password reset link | ||||
$link = preg_replace('|/[a-z0-9A-Z-]+$|', '', $link) . '/'; | $link = preg_replace('|/[a-z0-9A-Z-]+$|', '', $link) . '/'; | ||||
$browser->click('#pass-mode-link + label') | $browser->click('#pass-mode-link + label') | ||||
->assertMissing('#password') | ->assertMissing('#password') | ||||
->assertMissing('#password_confirmation') | ->assertMissing('#password_confirmation') | ||||
->waitFor('#password-link code') | ->waitFor('#password-link code') | ||||
->assertSeeIn('#password-link code', $link) | ->assertSeeIn('#password-link code', $link) | ||||
->assertSeeIn('#password-link div.form-text', "Press Submit to activate the link"); | ->assertSeeIn('#password-link div.form-text', "Press Submit to activate the link") | ||||
->pause(100); | |||||
// Test copy to clipboard | // Test copy to clipboard | ||||
/* TODO: Figure out how to give permission to do this operation | /* TODO: Figure out how to give permission to do this operation | ||||
$code = $john->verificationcodes()->first(); | $code = $john->verificationcodes()->first(); | ||||
$link .= $code->short_code . '-' . $code->code; | $link .= $code->short_code . '-' . $code->code; | ||||
$browser->assertMissing('#password-link button.text-danger') | $browser->assertMissing('#password-link button.text-danger') | ||||
->click('#password-link button:not(.text-danger)') | ->click('#password-link button:not(.text-danger)') | ||||
▲ Show 20 Lines • Show All 470 Lines • Show Last 20 Lines |