Skip to content

Commit

Permalink
fix parsley tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SupaJoon committed Apr 26, 2024
1 parent 5c4c1b7 commit 95ec8d9
Show file tree
Hide file tree
Showing 4 changed files with 212 additions and 148 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,51 +124,67 @@ exports[`Snapshot Tests DetailsMenu.stories Default 1`] = `
class="css-1sg2lsz"
>
<div
class="css-1b84j75 leafygreen-ui-90q1a7"
aria-labelledby="Range Lower Bound"
class="leafygreen-ui-1br9h7w css-1b84j75"
data-lgid="lg-text_input"
>
<div
class="leafygreen-ui-lzja97"
class="leafygreen-ui-1iyoj2o"
/>
<div
class="leafygreen-ui-1c0ck9t"
>
<input
aria-invalid="false"
aria-labelledby="Range Lower Bound"
autocomplete="on"
class="leafygreen-ui-lkup3q"
data-cy="range-lower-bound"
id="textinput-3"
min="0"
placeholder="0"
required=""
type="number"
value=""
/>
<div
class="lg-ui-icon-selector-0000 leafygreen-ui-dhxvhh"
/>
class="leafygreen-ui-1ago99h"
>
<input
aria-describedby=""
aria-disabled="false"
aria-invalid="false"
aria-labelledby="Range Lower Bound"
autocomplete="on"
class="lg-ui-form-field-input-0000 leafygreen-ui-1ago99h"
data-cy="range-lower-bound"
id="lg-form-field-input-25"
min="0"
placeholder="0"
required=""
type="number"
value=""
/>
</div>
</div>
</div>
<div
class="css-1b84j75 leafygreen-ui-90q1a7"
aria-labelledby="Range Upper Bound"
class="leafygreen-ui-1br9h7w css-1b84j75"
data-lgid="lg-text_input"
>
<div
class="leafygreen-ui-lzja97"
class="leafygreen-ui-1iyoj2o"
/>
<div
class="leafygreen-ui-1c0ck9t"
>
<input
aria-invalid="false"
aria-labelledby="Range Upper Bound"
autocomplete="on"
class="leafygreen-ui-lkup3q"
data-cy="range-upper-bound"
id="textinput-4"
min="0"
placeholder="100"
required=""
type="number"
value=""
/>
<div
class="lg-ui-icon-selector-0000 leafygreen-ui-dhxvhh"
/>
class="leafygreen-ui-1ago99h"
>
<input
aria-describedby=""
aria-disabled="false"
aria-invalid="false"
aria-labelledby="Range Upper Bound"
autocomplete="on"
class="lg-ui-form-field-input-0000 leafygreen-ui-1ago99h"
data-cy="range-upper-bound"
id="lg-form-field-input-29"
min="0"
placeholder="100"
required=""
type="number"
value=""
/>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -524,12 +540,12 @@ exports[`Snapshot Tests DetailsMenu.stories WithDownloadedLog 1`] = `
role="tablist"
>
<button
aria-controls="tab-panel-20"
aria-controls="tab-panel-36"
aria-selected="true"
class="leafygreen-ui-oq6if2"
data-cy="search-and-filter-tab"
data-text="Search & Filter"
id="tab-21"
id="tab-37"
name="Search & Filter"
role="tab"
tabindex="0"
Expand All @@ -541,12 +557,12 @@ exports[`Snapshot Tests DetailsMenu.stories WithDownloadedLog 1`] = `
</div>
</button>
<button
aria-controls="tab-panel-22"
aria-controls="tab-panel-38"
aria-selected="false"
class="leafygreen-ui-1vvp6ij"
data-cy="log-viewing-tab"
data-text="Log Viewing"
id="tab-23"
id="tab-39"
name="Log Viewing"
role="tab"
tabindex="-1"
Expand All @@ -568,9 +584,9 @@ exports[`Snapshot Tests DetailsMenu.stories WithDownloadedLog 1`] = `
</div>
<div>
<div
aria-labelledby="tab-21"
aria-labelledby="tab-37"
data-cy="search-and-filter-tab"
id="tab-panel-20"
id="tab-panel-36"
role="tabpanel"
>
<div
Expand Down Expand Up @@ -623,51 +639,67 @@ exports[`Snapshot Tests DetailsMenu.stories WithDownloadedLog 1`] = `
class="css-1sg2lsz"
>
<div
class="css-1b84j75 leafygreen-ui-90q1a7"
aria-labelledby="Range Lower Bound"
class="leafygreen-ui-1br9h7w css-1b84j75"
data-lgid="lg-text_input"
>
<div
class="leafygreen-ui-lzja97"
class="leafygreen-ui-1iyoj2o"
/>
<div
class="leafygreen-ui-1c0ck9t"
>
<input
aria-invalid="false"
aria-labelledby="Range Lower Bound"
autocomplete="on"
class="leafygreen-ui-lkup3q"
data-cy="range-lower-bound"
id="textinput-7"
min="0"
placeholder="0"
required=""
type="number"
value=""
/>
<div
class="lg-ui-icon-selector-0000 leafygreen-ui-dhxvhh"
/>
class="leafygreen-ui-1ago99h"
>
<input
aria-describedby=""
aria-disabled="false"
aria-invalid="false"
aria-labelledby="Range Lower Bound"
autocomplete="on"
class="lg-ui-form-field-input-0000 leafygreen-ui-1ago99h"
data-cy="range-lower-bound"
id="lg-form-field-input-59"
min="0"
placeholder="0"
required=""
type="number"
value=""
/>
</div>
</div>
</div>
<div
class="css-1b84j75 leafygreen-ui-90q1a7"
aria-labelledby="Range Upper Bound"
class="leafygreen-ui-1br9h7w css-1b84j75"
data-lgid="lg-text_input"
>
<div
class="leafygreen-ui-lzja97"
class="leafygreen-ui-1iyoj2o"
/>
<div
class="leafygreen-ui-1c0ck9t"
>
<input
aria-invalid="false"
aria-labelledby="Range Upper Bound"
autocomplete="on"
class="leafygreen-ui-lkup3q"
data-cy="range-upper-bound"
id="textinput-8"
min="0"
placeholder="100"
required=""
type="number"
value=""
/>
<div
class="lg-ui-icon-selector-0000 leafygreen-ui-dhxvhh"
/>
class="leafygreen-ui-1ago99h"
>
<input
aria-describedby=""
aria-disabled="false"
aria-invalid="false"
aria-labelledby="Range Upper Bound"
autocomplete="on"
class="lg-ui-form-field-input-0000 leafygreen-ui-1ago99h"
data-cy="range-upper-bound"
id="lg-form-field-input-63"
min="0"
placeholder="100"
required=""
type="number"
value=""
/>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -986,9 +1018,9 @@ exports[`Snapshot Tests DetailsMenu.stories WithDownloadedLog 1`] = `
</div>
</div>
<div
aria-labelledby="tab-23"
aria-labelledby="tab-39"
data-cy="log-viewing-tab"
id="tab-panel-22"
id="tab-panel-38"
role="tabpanel"
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ describe("searchbar", () => {
"aria-disabled",
"true",
);
expect(screen.getByDataCy("searchbar-input")).toBeDisabled();
expect(screen.getByDataCy("searchbar-input")).toHaveAttribute(
"aria-disabled",
"true",
);
});
it("should be able to paginate forwards by pressing Enter and keep focus", async () => {
const user = userEvent.setup();
Expand Down
Loading

0 comments on commit 95ec8d9

Please sign in to comment.