Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Browser/Components/QuotaInput.php
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | class QuotaInput extends BaseComponent | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function setQuotaValue($browser, $value) | public function setQuotaValue($browser, $value) | ||||
{ | { | ||||
// Use keyboard because ->value() does not work here | // Use keyboard because ->value() does not work here | ||||
$browser->click('@input')->keys('@input', '{home}'); | $browser->click('@input')->keys('@input', '{home}'); | ||||
$num = $value - 2; | $num = $value - 5; | ||||
while ($num > 0) { | while ($num > 0) { | ||||
$browser->keys('@input', '{arrow_right}'); | $browser->keys('@input', '{arrow_right}'); | ||||
$num--; | $num--; | ||||
} | } | ||||
$browser->assertSeeIn('@label', "$value GB"); | $browser->assertSeeIn('@label', "$value GB"); | ||||
} | } | ||||
} | } |