Skip to content

Commit

Permalink
refactor: removed unnecesary eslint ignore & updated ProductTours test
Browse files Browse the repository at this point in the history
  • Loading branch information
BilalQamar95 committed Sep 4, 2024
1 parent a6a9096 commit d1e89ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,6 @@ class Calculator extends Component {
<li>arccsch(4x+y)</li>
</ul>
</td>
{ /* eslint-disable-next-line jsx-a11y/control-has-associated-label */ }
<td dir="auto" />
</tr>
<tr>
Expand Down
14 changes: 6 additions & 8 deletions src/product-tours/ProductTours.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
},
);
});
Expand Down

0 comments on commit d1e89ab

Please sign in to comment.