|
|
|
@ -103,7 +103,7 @@ describe("QuestionPhone IP country detection and shimmer", () => { |
|
|
|
expect(input.classList.contains("shimmer-bg")).toBe(false); |
|
|
|
|
|
|
|
await act(async () => { |
|
|
|
flutterListeners.forEach((l) => |
|
|
|
flutterListeners.forEach((l) => { |
|
|
|
l({ |
|
|
|
action: "get_location", |
|
|
|
success: true, |
|
|
|
@ -111,8 +111,8 @@ describe("QuestionPhone IP country detection and shimmer", () => { |
|
|
|
country: "Iran", |
|
|
|
country_code: "IR", |
|
|
|
}, |
|
|
|
}), |
|
|
|
); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
await waitFor(() => { |
|
|
|
@ -128,12 +128,12 @@ describe("QuestionPhone IP country detection and shimmer", () => { |
|
|
|
const { container } = render(<QuestionPhone question={phoneQuestion1} />); |
|
|
|
|
|
|
|
await act(async () => { |
|
|
|
flutterListeners.forEach((l) => |
|
|
|
flutterListeners.forEach((l) => { |
|
|
|
l({ |
|
|
|
action: "get_location", |
|
|
|
success: false, |
|
|
|
}), |
|
|
|
); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
await waitFor(() => { |
|
|
|
@ -173,7 +173,7 @@ describe("QuestionPhone IP country detection and shimmer", () => { |
|
|
|
); |
|
|
|
|
|
|
|
await act(async () => { |
|
|
|
flutterListeners.forEach((l) => |
|
|
|
flutterListeners.forEach((l) => { |
|
|
|
l({ |
|
|
|
action: "get_location", |
|
|
|
success: true, |
|
|
|
@ -181,8 +181,8 @@ describe("QuestionPhone IP country detection and shimmer", () => { |
|
|
|
country: "Iran", |
|
|
|
country_code: "IR", |
|
|
|
}, |
|
|
|
}), |
|
|
|
); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
await waitFor(() => { |
|
|
|
@ -213,7 +213,7 @@ describe("QuestionPhone IP country detection and shimmer", () => { |
|
|
|
fireEvent.change(input, { target: { value: "7400123456" } }); |
|
|
|
|
|
|
|
await act(async () => { |
|
|
|
flutterListeners.forEach((l) => |
|
|
|
flutterListeners.forEach((l) => { |
|
|
|
l({ |
|
|
|
action: "get_location", |
|
|
|
success: true, |
|
|
|
@ -221,8 +221,8 @@ describe("QuestionPhone IP country detection and shimmer", () => { |
|
|
|
country: "Iran", |
|
|
|
country_code: "IR", |
|
|
|
}, |
|
|
|
}), |
|
|
|
); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
expect(screen.getByDisplayValue("7400 123456")).toBeDefined(); |
|
|
|
@ -255,7 +255,7 @@ describe("QuestionPhone IP country detection and shimmer", () => { |
|
|
|
expect(input.placeholder).toBe("7400 123456"); |
|
|
|
|
|
|
|
await act(async () => { |
|
|
|
flutterListeners.forEach((l) => |
|
|
|
flutterListeners.forEach((l) => { |
|
|
|
l({ |
|
|
|
action: "get_location", |
|
|
|
success: true, |
|
|
|
@ -263,8 +263,8 @@ describe("QuestionPhone IP country detection and shimmer", () => { |
|
|
|
country: "Iran", |
|
|
|
country_code: "IR", |
|
|
|
}, |
|
|
|
}), |
|
|
|
); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
await waitFor(() => { |
|
|
|
|