Skip to content

Commit 8265944

Browse files
committed
Fix browser tests
1 parent 9f4bd03 commit 8265944

File tree

5 files changed

+15
-10
lines changed

5 files changed

+15
-10
lines changed

resources/js/Pages/Results.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
</form>
110110
</section>
111111
</section>
112-
<cdx-dialog class="confirmation-dialog"
112+
<cdx-dialog id="results-confirmation-dialog"
113113
:title="$i18n('confirmation-dialog-title')"
114114
v-model:open="confirmationDialog"
115115
:primary-action="{

tests/Browser/Components/DecisionDropdown.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(int $mismatchId)
1919
*/
2020
public function selector()
2121
{
22-
return "#mismatch-$this->mismatchId .wikit-Dropdown";
22+
return "#mismatch-$this->mismatchId .cdx-select-vue";
2323
}
2424

2525
/**
@@ -41,17 +41,17 @@ public function assert(Browser $browser)
4141
public function elements()
4242
{
4343
return [
44-
'@select-menu' => '.wikit-Dropdown__select',
45-
'@selected' => '.wikit-Dropdown__selectedOption',
46-
'@menu-items' => '.wikit-Dropdown__menu'
44+
'@select-menu' => '.cdx-select-vue__handle',
45+
'@selected' => '.cdx-select-vue__handle',
46+
'@menu-items' => '.cdx-menu__listbox'
4747
];
4848
}
4949

5050
public function selectPosition(Browser $browser, int $position, string $option)
5151
{
5252
$browser->click('@select-menu')
5353
->within('@menu-items', function ($menu) use ($position, $option) {
54-
$positionSelector = ".wikit-OptionsMenu__item:nth-child($position)";
54+
$positionSelector = ".cdx-menu-item:nth-child($position)";
5555
$menu->assertSeeIn($positionSelector, $option)
5656
->click($positionSelector);
5757
})

tests/Browser/ItemsFormTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ public function test_empty_item_list_yields_warning()
4848
->press('.submit-ids')
4949
->assertSee('Please provide the Item identifiers that should be checked.');
5050

51-
$this->assertStringContainsString('--warning', $browser->attribute('@items-input', 'class'));
51+
$this->assertStringContainsString(
52+
'--warning',
53+
$browser->attribute('@items-input-validation-message', 'class'));
5254
});
5355
}
5456

@@ -72,7 +74,9 @@ public function test_invalid_item_list_yields_error()
7274
->press('.submit-ids')
7375
->assertSee('One or more Item identifiers couldn\'t be processed.');
7476

75-
$this->assertStringContainsString('--error', $browser->attribute('@items-input', 'class'));
77+
$this->assertStringContainsString(
78+
'--error',
79+
$browser->attribute('@items-input-validation-message', 'class'));
7680
});
7781
}
7882

tests/Browser/Pages/HomePage.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ public function elements()
4040
{
4141
return [
4242
'@form' => '#items-form',
43-
'@items-input' => '@form textarea'
43+
'@items-input' => '@form textarea',
44+
'@items-input-validation-message' => '@form .wikit-TextArea .wikit-ValidationMessage'
4445
];
4546
}
4647
}

tests/Browser/Pages/ResultsPage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function elements()
4747
{
4848
return [
4949
'@back-button' => '.back-button',
50-
'@confirmation-dialog' => '.confirmation-dialog',
50+
'@confirmation-dialog' => '#results-confirmation-dialog',
5151
'@disable-confirmation' => '.disable-confirmation',
5252
'@error-section' => '#error-section',
5353
'@disable-confirmation-label' => '.disable-confirmation>.wikit-checkbox__label'

0 commit comments

Comments
 (0)