Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redefine galleryApi endpoint by introducing library for SignalR testing #107

Open
wants to merge 43 commits into
base: main
Choose a base branch
from

Conversation

JanSafronov
Copy link

@JanSafronov JanSafronov commented Jun 4, 2024

Redefine getGalleryPhotos endpoint of galleryApi by coalescing HubConnectionBuilder and useCypressSignalRMock (They build a hub connection) from Cypress testing library.

Whenever in testing mode, useCypressSignalRMock will not be null and hence a mocked SignalR hub will be instantiated for testing purposes.

Implicity this is coded as

const socket = MockHubConnectionBuild("testhub", {
    enableForVitest: true,
}) ?? new HubConnectionBuilder().withUrl(`${import.meta.env.VITE_GALLERY_SERVICE_URL}/hubs/gallery?galleryId=${galleryId}`).build();

This inherits/includes feature 1 branch given in #87

JanSafronov and others added 30 commits May 17, 2024 03:46
Merge changes from author
Merge changes from author
Merge changes from author
@JanSafronov
Copy link
Author

@Olszewskidev This allow to run integration tests for UI packages when hub connection is needed..

@JanSafronov JanSafronov changed the title Redefine galleryApi endpoint by introducing library for testing Redefine galleryApi endpoint by introducing library for SignalR testing Jun 4, 2024
@Olszewskidev
Copy link
Owner

Thanks for your changes and adjustments. LensUp takes part in 100 Commits challange (Polish competitions) - https://100commitow.pl/

I will check your PR's after this challange (we are at the end)
Btw you can give me a star on github if you want. The number of stars affects the competition result.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants