diff --git a/app/assets/javascripts/discourse/tests/modifiers/swipe-test.gjs b/app/assets/javascripts/discourse/tests/modifiers/swipe-test.gjs deleted file mode 100644 index 5abfaa8218d..00000000000 --- a/app/assets/javascripts/discourse/tests/modifiers/swipe-test.gjs +++ /dev/null @@ -1,106 +0,0 @@ -import { getOwner } from "@ember/application"; -import { clearRender, render, triggerEvent } from "@ember/test-helpers"; -import { setupRenderingTest } from "ember-qunit"; -import hbs from "htmlbars-inline-precompile"; -import { module, test } from "qunit"; - -module("Integration | Modifier | swipe", function (hooks) { - setupRenderingTest(hooks); - - hooks.beforeEach(function () { - getOwner(this).lookup("service:site").mobileView = true; - }); - - async function swipe() { - await triggerEvent("div", "touchstart", { - changedTouches: [{ screenX: 0, screenY: 0 }], - touches: [{ clientX: 0, clientY: 0 }], - }); - await triggerEvent("div", "touchmove", { - changedTouches: [{ screenX: 2, screenY: 2 }], - touches: [{ clientX: 2, clientY: 2 }], - }); - await triggerEvent("div", "touchmove", { - changedTouches: [{ screenX: 4, screenY: 4 }], - touches: [{ clientX: 4, clientY: 4 }], - }); - await triggerEvent("div", "touchmove", { - changedTouches: [{ screenX: 7, screenY: 7 }], - touches: [{ clientX: 7, clientY: 7 }], - }); - await triggerEvent("div", "touchmove", { - changedTouches: [{ screenX: 9, screenY: 9 }], - touches: [{ clientX: 9, clientY: 9 }], - }); - await triggerEvent("div", "touchend", { - changedTouches: [{ screenX: 10, screenY: 10 }], - touches: [{ clientX: 10, clientY: 10 }], - }); - } - - test("it calls onDidStartSwipe on touchstart", async function (assert) { - this.didStartSwipe = (state) => { - assert.ok(state, "didStartSwipe called with state"); - }; - - await render( - hbs`