From 51ec0ffec844655e46f0ee71fd6c89d7599ec99a Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 11 Feb 2022 14:02:29 +0100 Subject: [PATCH] removed dependency by moving click handler part of #2462 --- frontend/src/js/popups/quote-rate-popup.js | 5 +++++ frontend/src/js/test/test-ui.js | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/js/popups/quote-rate-popup.js b/frontend/src/js/popups/quote-rate-popup.js index e58d6f504..95b0aef10 100644 --- a/frontend/src/js/popups/quote-rate-popup.js +++ b/frontend/src/js/popups/quote-rate-popup.js @@ -2,6 +2,7 @@ import * as DB from "../db"; import * as Loader from "../elements/loader"; import * as Notifications from "../elements/notifications"; import axiosInstance from "../axios-instance"; +import * as TestWords from "./../test/test-words"; let rating = 0; @@ -216,3 +217,7 @@ $("#quoteRatePopup .stars .star").mouseout((e) => { $("#quoteRatePopup .submitButton").click((e) => { submit(); }); + +$(".pageTest #rateQuoteButton").click(async (event) => { + show(TestWords.randomQuote); +}); diff --git a/frontend/src/js/test/test-ui.js b/frontend/src/js/test/test-ui.js index 1b0ba939f..f2381daa8 100644 --- a/frontend/src/js/test/test-ui.js +++ b/frontend/src/js/test/test-ui.js @@ -9,7 +9,6 @@ import * as Caret from "./caret"; import * as OutOfFocus from "./out-of-focus"; import * as Replay from "./replay"; import * as Misc from "../misc"; -import * as QuoteRatePopup from "../popups/quote-rate-popup"; import * as PageController from "./../controllers/page-controller"; import * as SlowTimer from "../states/slow-timer"; import * as ReportQuotePopup from "../popups/quote-report-popup"; @@ -807,10 +806,6 @@ $(".pageTest #copyWordsListButton").click(async (event) => { } }); -$(".pageTest #rateQuoteButton").click(async (event) => { - QuoteRatePopup.show(TestWords.randomQuote); -}); - $(".pageTest #reportQuoteButton").click(async (event) => { ReportQuotePopup.show({ quoteId: parseInt(TestWords.randomQuote.id),