Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
notbakaneko committed Apr 11, 2023
1 parent 5e5da6d commit d5d6110
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/Browser/BeatmapDiscussionPostsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@

class BeatmapDiscussionPostsTest extends DuskTestCase
{
private $new_reply_widget_selector = '.beatmap-discussion-post--new-reply';
private const NEW_REPLY_SELECTOR = '.beatmap-discussion-new-reply';

private Beatmap $beatmap;
private BeatmapDiscussion $beatmapDiscussion;
private BeatmapDiscussionPost $beatmapDiscussionPost;
private Beatmapset $beatmapset;
private User $mapper;
private User $user;


public function testConcurrentPostAfterResolve()
{
Expand All @@ -41,7 +49,7 @@ public function testConcurrentPostAfterResolve()

protected function writeReply(Browser $browser, $reply)
{
$browser->with($this->new_reply_widget_selector, function ($new_reply) use ($reply) {
$browser->with(static::NEW_REPLY_SELECTOR, function ($new_reply) use ($reply) {
$new_reply->press('Respond')
->waitFor('textarea')
->type('textarea', $reply);
Expand All @@ -50,7 +58,7 @@ protected function writeReply(Browser $browser, $reply)

protected function postReply(Browser $browser, $action)
{
$browser->with($this->new_reply_widget_selector, function ($new_reply) use ($action) {
$browser->with(static::NEW_REPLY_SELECTOR, function ($new_reply) use ($action) {
switch ($action) {
case 'resolve':
$new_reply->press('Reply and Resolve');
Expand Down

0 comments on commit d5d6110

Please sign in to comment.