fix: Timezone Select invalid labels as DST unsupported in spacetime (#14056)
* Fix: Timezone Select invalid labels as DST unsupported in spacetime * Missed a _ -> (empty string) replace causing invalid TZs * fix: getTimezone tests didnt support DST
This commit is contained in:
1 parent
12e171823b
commit
e3a5ce5f6e
3 files changed
+45
-27
No files matched your search
@@ -107,12 +107,9 @@ describe("Test TimezoneSelect", () => {
|
||||
expect(menuListEl).toHaveClass(classNames.menuList());
|
||||
expect(menuEl).toHaveClass(classNames.menu());
|
||||
|
||||
expect(screen.getByText(optionMockValues[1])).toBeInTheDocument();
|
||||
|
||||
// TODO America/Juneau and America/Toronto failing
|
||||
// for (const mockText of optionMockValues) {
|
||||
// expect(screen.getByText(mockText)).toBeInTheDocument();
|
||||
// }
|
||||
for (const mockText of optionMockValues) {
|
||||
expect(screen.getByText(mockText)).toBeInTheDocument();
|
||||
}
|
||||
});
|
||||
|
||||
test("Should render with the correct CSS when provided with className prop", async () => {
|
||||
@@ -142,13 +139,12 @@ describe("Test TimezoneSelect", () => {
|
||||
const element = screen.getByLabelText("Test");
|
||||
element.focus();
|
||||
fireEvent.keyDown(element, { key: "ArrowDown", code: "ArrowDown" });
|
||||
// TODO: optionMockValues[3] was failing
|
||||
screen.getByText(optionMockValues[1]);
|
||||
screen.getByText(optionMockValues[3]);
|
||||
|
||||
const inputEl = screen.getByRole("combobox", { hidden: true }).parentElement;
|
||||
const menuIsOpenEl = inputEl?.parentElement?.nextSibling;
|
||||
expect(menuIsOpenEl).toHaveClass("rotate-180 transition-transform ");
|
||||
const opt = screen.getByText(optionMockValues[1]);
|
||||
const opt = screen.getByText(optionMockValues[3]);
|
||||
fireEvent.click(opt);
|
||||
fireEvent.keyDown(element, { key: "ArrowDown", code: "ArrowDown" });
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user