fix: refs #7087 fixed some tests
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
PAU ROVIRA ROSALENY 2025-01-15 09:01:37 +01:00
parent 8e4a92b6be
commit 76968fe6bd
1 changed files with 5 additions and 3 deletions

View File

@ -62,12 +62,14 @@ describe('CardSummary', () => {
});
it('should respond to prop changes and refetch data', async () => {
const newUrl = 'CardSummary/35';
const newKey = 'cardSummaryKey/35';
const fetchSpy = vi.spyOn(vm.arrayData, 'fetch');
await wrapper.setProps({ url: 'newUrl', filter: { key: 'newValue' } });
await wrapper.setProps({ url: newUrl, filter: { key: newKey } });
expect(fetchSpy).toHaveBeenCalled();
expect(vm.store.url).toBe('newUrl');
expect(vm.store.filter).toEqual({ key: 'newValue' });
expect(vm.store.url).toBe(newUrl);
expect(vm.store.filter).toEqual({ key: newKey });
});
it('should return true if route path ends with /summary' , () => {