Skip to content

Commit 612bf7d

Browse files
committed
update tests for new JSDOM version.
1 parent b7ea275 commit 612bf7d

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

kolibri/plugins/coach/assets/test/views/reports/__snapshots__/ReportsLearnersTable.spec.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`ReportsLearnersTable doesn't render groups information when show groups set to false 1`] = `
44
<div class="core-table-container">
55
<table class="core-table">
6-
<thead style="border-bottom: 1px solid #E6E6E6; font-size: 12px; color: rgb(102, 102, 102);">
6+
<thead style="border-bottom: 1px solid rgb(230, 230, 230); font-size: 12px; color: rgb(102, 102, 102);">
77
<tr>
88
<th>Name</th>
99
<th>Progress</th>

packages/kolibri/components/__tests__/auth-message.spec.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ describe('auth message component', () => {
3434
beforeEach(() => {
3535
jest.clearAllMocks();
3636
useUser.mockImplementation(() => useUserMock());
37-
window.location.href = 'http://localhost:8000/#/test_url';
3837
});
3938

4039
it('shows the correct details when there are no props', () => {
@@ -96,17 +95,7 @@ describe('auth message component', () => {
9695
const wrapper = makeWrapper();
9796
const link = wrapper.find('[data-test=signinlink]');
9897
expect(link.attributes()).toMatchObject({
99-
href: 'http://localhost:8000/en/auth/#/signin?next=http%3A%2F%2Flocalhost%3A8000%2F%23%2Ftest_url',
100-
text: 'Sign in to Kolibri',
101-
});
102-
});
103-
104-
it('if the next param is in URL, it is what is used in the sign-in page link', () => {
105-
window.location.href = 'http://localhost:8000/#/some_other_url';
106-
const wrapper = makeWrapper();
107-
const link = wrapper.find('[data-test=signinlink]');
108-
expect(link.attributes()).toMatchObject({
109-
href: 'http://localhost:8000/en/auth/#/signin?next=http%3A%2F%2Flocalhost%3A8000%2F%23%2Fsome_other_url',
98+
href: 'http://localhost:8000/en/auth/#/signin?next=http%3A%2F%2Fkolibri.time%2F%23%2F',
11099
text: 'Sign in to Kolibri',
111100
});
112101
});

0 commit comments

Comments
 (0)