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

Add React hooks calls and integration tests for real-time updates (#88) #118

Merged
merged 10 commits into from
Jun 30, 2021

Conversation

@codeofmochi codeofmochi self-assigned this Jun 23, 2021
@codeofmochi codeofmochi added the feature New feature or request label Jun 23, 2021
@codeofmochi codeofmochi added this to the Sprint 3 milestone Jun 23, 2021
@codeofmochi codeofmochi linked an issue Jun 23, 2021 that may be closed by this pull request
@codeofmochi codeofmochi changed the title Add websockets support for real-time updates Add websockets support for real-time updates (#88) Jun 23, 2021
@codeofmochi codeofmochi changed the title Add websockets support for real-time updates (#88) Add React hooks calls and integration tests for real-time updates (#88) Jun 24, 2021
Copy link
Contributor

@pyphilia pyphilia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

cypress/integration/ws/ws.spec.js Show resolved Hide resolved
Copy link
Contributor

@pyphilia pyphilia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@codeofmochi
Copy link
Contributor Author

Regarding #118 (comment)

The goal will be to use https://github.com/graasp/graasp-websockets/blob/master/src/interfaces/constants.ts when the codebase of this repo will be switched to TypeScript. Since only service-api is compiled to JS in the dist bundle of graasp-websockets when installed, exported constants are not visible: it compiles to the following

__exportStar(require("./interfaces/constants"), exports);
__exportStar(require("./interfaces/message"), exports);

However "./interfaces/constants" and "./interfaces/message" are not compiled in the local node_modules, thus the constants simply do not exist and are not exported to be consumed. We could find a way to force the compilation from graasp-websockets side but this would imply a non-standard build with an additional step somewhere.

Since this issue only involves tests, it will be much easier to use these constants directly from Typescript when graasp-compose will be rewritten, and there will be no issue since the compiler will simply consume the constants source in TS.

@codeofmochi codeofmochi mentioned this pull request Jun 30, 2021
@codeofmochi codeofmochi merged commit cb8335c into master Jun 30, 2021
@codeofmochi codeofmochi deleted the 88/websockets branch June 30, 2021 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrate graasp-websockets in graasp-compose
2 participants