Skip to content

Commit

Permalink
Fixup CI
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismccord committed Sep 22, 2023
1 parent f769479 commit cea8616
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions assets/test/js_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ describe("JS", () => {

expect(Array.from(modal.classList)).toEqual(["modal"])
JS.exec("click", click.getAttribute("phx-click"), view, click)
window.requestAnimationFrame(() => {
setTimeout(() => {
expect(Array.from(modal.classList)).toEqual(["modal", "fade-out"])
done()
})
}, 200)
})

test("with multiple selector", done => {
test("with multiple selector", () => {
let view = setupView(`
<div id="modal1" class="modal">modal</div>
<div id="modal2" class="modal">modal</div>
Expand All @@ -158,11 +158,11 @@ describe("JS", () => {
expect(Array.from(modal1.classList)).toEqual(["modal"])
expect(Array.from(modal2.classList)).toEqual(["modal"])
JS.exec("click", click.getAttribute("phx-click"), view, click)
window.requestAnimationFrame(() => {
setTimeout(() => {
expect(Array.from(modal1.classList)).toEqual(["modal", "fade-out"])
expect(Array.from(modal2.classList)).toEqual(["modal", "fade-out"])
done()
})
}, 200)
})
})

Expand Down
2 changes: 1 addition & 1 deletion assets/test/view_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ describe("View + DOM", function(){
expect(view.el.innerHTML).toBe(html)

let formEl = document.getElementById("form")
formEl.submit = () => done()
Object.getPrototypeOf(formEl).submit = done
let updatedHtml = "<form id=\"form\" phx-submit=\"submit\" phx-trigger-action><input type=\"text\"></form>"
view.update({s: [updatedHtml]}, [])

Expand Down

0 comments on commit cea8616

Please sign in to comment.