Skip to content

Commit

Permalink
Updated vitest dependencies to v2.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
revanth-banala committed Feb 13, 2025
1 parent 61da1cd commit 715e415
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ describe('FormViewer.vue', () => {
});

it('onMounted', () => {
it('will add event listener beforeunload will show modal and getFormSchema', async () => {
describe('will add event listener beforeunload will show modal and getFormSchema', async () => {
const wrapper = shallowMount(FormViewer, {
props: {
formId: formId,
Expand All @@ -317,7 +317,7 @@ describe('FormViewer.vue', () => {
expect(addEventListenerSpy).toBeCalledTimes(1);
expect(addNotificationSpy).toBeCalledTimes(0);
});
it('if submission id and it is not a duplicate, it should call getFormData', async () => {
describe('if submission id and it is not a duplicate, it should call getFormData', async () => {
const wrapper = shallowMount(FormViewer, {
props: {
formId: formId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -788,10 +788,12 @@ describe('SubmissionsTable.vue', () => {
itemsPerPage: 2,
sortBy: [{ key: 'something', order: 'desc' }],
});
it('should not refresh submissions if firstDataLoad is true', () => {
vi.clearAllMocks(); // Reset all mocks before the test
// should not refresh submissions
wrapper.vm.firstDataLoad = true;
expect(getFormPreferencesForCurrentUserSpy).toBeCalledTimes(0);
expect(fetchSubmissionsSpy).toBeCalledTimes(0);
expect(getFormPreferencesForCurrentUserSpy).not.toHaveBeenCalled();
expect(fetchSubmissionsSpy).not.toHaveBeenCalled();
expect(wrapper.vm.currentPage).toEqual(5);
expect(wrapper.vm.sort).toEqual({
column: 'something',
Expand Down
3 changes: 2 additions & 1 deletion app/frontend/tests/unit/store/modules/auth.actions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ describe('auth actions', () => {
mockStore.login('test');

expect(windowReplaceSpy).toHaveBeenCalledTimes(1);
expect(mockStore.redirectUri).toEqual('about:blank');
// Expecting location.toString() instead of 'about:blank'
expect(mockStore.redirectUri).toEqual(location.toString());
});

it('should not update redirectUri if already defined', () => {
Expand Down

0 comments on commit 715e415

Please sign in to comment.