Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ikuleshov committed Sep 19, 2024
1 parent f997657 commit ebc919e
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/components/ga4/EventBuilder/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,11 @@ describe("Event Builder", () => {
// change the expected values.
const ecInput = within(eventCategory).getByRole("combobox")
eventCategory.focus()
renderer.fireEvent.change(ecInput, { target: { value: "" } })
renderer.fireEvent.keyDown(eventCategory, { key: "ArrowDown" })
renderer.fireEvent.keyDown(eventCategory, { key: "ArrowDown" })
renderer.fireEvent.keyDown(eventCategory, { key: "Enter" })
renderer.fireEvent.change(ecInput, { target: { value: "All apps" } })

const enInput = within(eventName).getByRole("combobox")
eventCategory.focus()
renderer.fireEvent.change(enInput, { target: { value: "" } })
renderer.fireEvent.keyDown(eventName, { key: "ArrowDown" })
renderer.fireEvent.keyDown(eventName, { key: "ArrowDown" })
renderer.fireEvent.keyDown(eventName, { key: "Enter" })
renderer.fireEvent.change(enInput, { target: { value: "select_content" } })

await userEvent.type(timestampMicros, "1234", { delay: 1 })
nonPersonalizedAds.click()
Expand Down Expand Up @@ -190,16 +184,10 @@ describe("Event Builder", () => {
const ecInput = within(eventCategory).getByRole("combobox")
//eventCategory.focus()
renderer.fireEvent.change(ecInput, { target: { value: "All apps" } })
// renderer.fireEvent.keyDown(eventCategory, { key: "ArrowDown" })
// // renderer.fireEvent.keyDown(eventCategory, { key: "ArrowDown" })
// renderer.fireEvent.keyDown(eventCategory, { key: "Enter" })

const enInput = within(eventName).getByRole("combobox")
//eventCategory.focus()
renderer.fireEvent.change(enInput, { target: { value: "add_shipping_info" } })
// renderer.fireEvent.keyDown(eventName, { key: "ArrowDown" })
// // renderer.fireEvent.keyDown(eventName, { key: "ArrowDown" })
// renderer.fireEvent.keyDown(eventName, { key: "Enter" })
renderer.fireEvent.change(enInput, { target: { value: "select_content" } })

await userEvent.type(
timestampMicros,
Expand Down

0 comments on commit ebc919e

Please sign in to comment.