Skip to content

Commit

Permalink
further work to fix problems caused by rebasing
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Ruf committed Feb 6, 2024
1 parent b6e69eb commit dced694
Show file tree
Hide file tree
Showing 6 changed files with 10,778 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ tests/e2e/cypress/screenshots/
test_ci_cypress.sh
tests/e2e/cypress/e2e/FillDBWithStuff.cy.ts
tests/e2e/cypress/downloads/result.pdf
src/Resources/style/output.css.map
2 changes: 1 addition & 1 deletion src/Resources/style/output.css.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/Resources/tests/unit/menuParticipations/MenuTable.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ describe('Test MenuTable', () => {
await flushPromises();
setTimeout(async () => {
await nextTick();
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore ts does not find conditionally exported values for testing i.e. loaded
expect(wrapper.vm.loaded).toBe(true);
expect(useApi).toHaveBeenCalledTimes(3);
expect(wrapper.find('table').exists()).toBe(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ describe('Test ParticipantsTable', () => {

it('should produce the correct styles string for the height', () => {
const wrapper = shallowMount(ParticipantsTable);
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore ts does not find conditionally exported values for testing i.e. tableHeight
expect(wrapper.vm.tableHeight).toEqual('300px');
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
import ParticipantsTableBody from "@/components/participations/ParticipantsTableBody.vue";
import ParticipantsTableSlot from "@/components/participations/ParticipantsTableSlot.vue";
import participations from '../fixtures/participations.json';
Expand Down Expand Up @@ -26,6 +27,7 @@ describe('Test functions of ParticipantsTableBody', () => {
test('scrollAmount to return a positive number', () => {
const wrapper = shallowMount(ParticipantsTableBody);

// @ts-ignore ts does not find conditionally exported values for testing i.e. scrollAmount
expect(wrapper.vm.scrollAmount(16)).toBeGreaterThan(0);
});

Expand All @@ -34,8 +36,10 @@ describe('Test functions of ParticipantsTableBody', () => {

const htmlDummyElement = { scrollTop: 0, clientHeight: 300, scrollHeight: 600 } as HTMLTableSectionElement;

// @ts-ignore ts does not find conditionally exported values for testing i.e. setScrollDirection
wrapper.vm.setScrollDirection(htmlDummyElement);

// @ts-ignore ts does not find conditionally exported values for testing i.e. scrollDirectionDown
expect(wrapper.vm.scrollDirectionDown).toBeTruthy();
});

Expand All @@ -44,8 +48,10 @@ describe('Test functions of ParticipantsTableBody', () => {

const htmlDummyElement = { scrollTop: 301, clientHeight: 300, scrollHeight: 600 } as HTMLTableSectionElement;

// @ts-ignore ts does not find conditionally exported values for testing i.e. setScrollDirection
wrapper.vm.setScrollDirection(htmlDummyElement);

// @ts-ignore ts does not find conditionally exported values for testing i.e. scrollDirectionDown
expect(wrapper.vm.scrollDirectionDown).toBeFalsy();
});

Expand All @@ -54,9 +60,13 @@ describe('Test functions of ParticipantsTableBody', () => {

const htmlDummyElement = { scrollTop: 301, clientHeight: 300, scrollHeight: 600 } as HTMLTableSectionElement;

// @ts-ignore ts does not find conditionally exported values for testing i.e. setScrollDirection
wrapper.vm.setScrollDirection(htmlDummyElement);
// @ts-ignore ts does not find conditionally exported values for testing i.e. scrollDirectionDown
expect(wrapper.vm.scrollDirectionDown).toBeFalsy();
// @ts-ignore ts does not find conditionally exported values for testing i.e. setScrollDirection
wrapper.vm.setScrollDirection(htmlDummyElement);
// @ts-ignore ts does not find conditionally exported values for testing i.e. scrollDirectionDown
expect(wrapper.vm.scrollDirectionDown).toBeFalsy();
});

Expand All @@ -65,10 +75,14 @@ describe('Test functions of ParticipantsTableBody', () => {

const htmlDummyElement = { scrollTop: 301, clientHeight: 300, scrollHeight: 600 } as HTMLTableSectionElement;

// @ts-ignore ts does not find conditionally exported values for testing i.e. setScrollDirection
wrapper.vm.setScrollDirection(htmlDummyElement);
// @ts-ignore ts does not find conditionally exported values for testing i.e. scrollDrectionDown
expect(wrapper.vm.scrollDirectionDown).toBeFalsy();
htmlDummyElement.scrollTop = 0;
// @ts-ignore ts does not find conditionally exported values for testing i.e. setScrollDirection
wrapper.vm.setScrollDirection(htmlDummyElement);
// @ts-ignore ts does not find conditionally exported values for testing i.e. scrollDirectionDown
expect(wrapper.vm.scrollDirectionDown).toBeTruthy();
});
});
Expand Down
Loading

0 comments on commit dced694

Please sign in to comment.