From d1e89abe69fc2b8c3f18c6dca692928baa1d4969 Mon Sep 17 00:00:00 2001 From: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com> Date: Wed, 4 Sep 2024 16:56:08 +0500 Subject: [PATCH] refactor: removed unnecesary eslint ignore & updated ProductTours test --- .../course/content-tools/calculator/Calculator.jsx | 1 - src/product-tours/ProductTours.test.jsx | 14 ++++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/courseware/course/content-tools/calculator/Calculator.jsx b/src/courseware/course/content-tools/calculator/Calculator.jsx index f84fe27d39..202e6124b3 100644 --- a/src/courseware/course/content-tools/calculator/Calculator.jsx +++ b/src/courseware/course/content-tools/calculator/Calculator.jsx @@ -341,7 +341,6 @@ class Calculator extends Component {
  • arccsch(4x+y)
  • - { /* eslint-disable-next-line jsx-a11y/control-has-associated-label */ } diff --git a/src/product-tours/ProductTours.test.jsx b/src/product-tours/ProductTours.test.jsx index b8b1995410..e65292de31 100644 --- a/src/product-tours/ProductTours.test.jsx +++ b/src/product-tours/ProductTours.test.jsx @@ -13,7 +13,7 @@ import { waitForElementToBeRemoved } from '@testing-library/dom'; import * as popper from '@popperjs/core'; import { - fireEvent, initializeMockApp, logUnhandledRequests, render, screen, waitFor, + fireEvent, initializeMockApp, logUnhandledRequests, render, screen, } from '../setupTest'; import initializeStore from '../store'; import { appendBrowserTimezoneToUrl, executeThunk } from '../utils'; @@ -295,15 +295,13 @@ describe('Courseware Tour', () => { const container = await loadContainer(); const sequenceNavButtons = container.querySelectorAll('nav.sequence-navigation a, nav.sequence-navigation button'); const sequenceNextButton = sequenceNavButtons[4]; - waitFor(() => { - expect(sequenceNextButton).toHaveTextContent('Next'); - fireEvent.click(sequenceNextButton); + expect(sequenceNextButton).toHaveTextContent('Next'); + fireEvent.click(sequenceNextButton); - expect(global.location.href).toEqual(`http://localhost/course/${courseId}/${defaultSequenceBlock.id}/${unitBlocks[1].id}`); + expect(global.location.href).toEqual(`http://localhost/course/${courseId}/${defaultSequenceBlock.id}/${unitBlocks[1].id}`); - const checkpoint = container.querySelectorAll('#pgn__checkpoint'); - expect(checkpoint).toHaveLength(showCoursewareTour ? 1 : 0); - }); + const checkpoint = container.querySelectorAll('#pgn__checkpoint'); + expect(checkpoint).toHaveLength(showCoursewareTour ? 1 : 0); }, ); });