Skip to content

Commit

Permalink
Merge pull request #401 from alkem-io/server-4808
Browse files Browse the repository at this point in the history
updated to work with calloutsSet re codegen + compiling;
  • Loading branch information
techsmyth authored Dec 30, 2024
2 parents 6831912 + 80b24eb commit 8245d18
Show file tree
Hide file tree
Showing 63 changed files with 56,608 additions and 56,701 deletions.
42,256 changes: 21,313 additions & 20,943 deletions server-api/src/core/generated/alkemio-schema.ts

Large diffs are not rendered by default.

69,802 changes: 34,945 additions & 34,857 deletions server-api/src/core/generated/graphql.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from '@functional-api/journey/space/space.request.params';
import { getActivityLogOnCollaboration } from './activity-log-params';
import {
createCalloutOnCollaboration,
createCalloutOnCalloutsSet,
deleteCallout,
updateCalloutVisibility,
} from '@functional-api/callout/callouts.request.params';
Expand Down Expand Up @@ -88,10 +88,10 @@ describe('Activity logs - Subspace', () => {

test('should NOT return CALLOUT_PUBLISHED, when created', async () => {
// Arrange
const res = await createCalloutOnCollaboration(
const res = await createCalloutOnCalloutsSet(
baseScenario.subspace.collaboration.id
);
calloutId = res?.data?.createCalloutOnCollaboration.id ?? '';
calloutId = res?.data?.createCalloutOnCalloutsSet.id ?? '';

const resActivity = await getActivityLogOnCollaboration(
baseScenario.subspace.collaboration.id,
Expand Down Expand Up @@ -148,10 +148,10 @@ describe('Activity logs - Subspace', () => {

test.skip('should return CALLOUT_PUBLISHED, POST_CREATED, POST_COMMENT, DISCUSSION_COMMENT, WHITEBOARD_CREATED', async () => {
// Arrange
const res = await createCalloutOnCollaboration(
const res = await createCalloutOnCalloutsSet(
baseScenario.subspace.collaboration.id
);
calloutId = res?.data?.createCalloutOnCollaboration.id ?? '';
calloutId = res?.data?.createCalloutOnCalloutsSet.id ?? '';

await updateCalloutVisibility(calloutId, CalloutVisibility.Published);

Expand All @@ -172,7 +172,7 @@ describe('Activity logs - Subspace', () => {
);
messageRes?.data?.sendMessageToRoom.id;

const resDiscussion = await createCalloutOnCollaboration(
const resDiscussion = await createCalloutOnCalloutsSet(
baseScenario.subspace.collaboration.id,
{
framing: {
Expand All @@ -188,9 +188,9 @@ describe('Activity logs - Subspace', () => {
}
);
const calloutIdDiscussion =
resDiscussion?.data?.createCalloutOnCollaboration.id ?? '';
resDiscussion?.data?.createCalloutOnCalloutsSet.id ?? '';
const discussionCalloutCommentsId =
resDiscussion?.data?.createCalloutOnCollaboration?.comments?.id ?? '';
resDiscussion?.data?.createCalloutOnCalloutsSet?.comments?.id ?? '';

await updateCalloutVisibility(
calloutIdDiscussion,
Expand All @@ -202,7 +202,7 @@ describe('Activity logs - Subspace', () => {
'comment on discussion callout'
);

const resWhiteboard = await createCalloutOnCollaboration(
const resWhiteboard = await createCalloutOnCalloutsSet(
baseScenario.subspace.collaboration.id,
{
framing: {
Expand All @@ -218,7 +218,7 @@ describe('Activity logs - Subspace', () => {
}
);
const calloutIdWhiteboard =
resWhiteboard?.data?.createCalloutOnCollaboration.id ?? '';
resWhiteboard?.data?.createCalloutOnCalloutsSet.id ?? '';

await updateCalloutVisibility(
calloutIdWhiteboard,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from '@generated/alkemio-schema';
import { updateSpaceSettings } from '@functional-api/journey/space/space.request.params';
import {
createCalloutOnCollaboration,
createCalloutOnCalloutsSet,
deleteCallout,
updateCalloutVisibility,
} from '@functional-api/callout/callouts.request.params';
Expand Down Expand Up @@ -93,11 +93,11 @@ describe('Activity logs - Subsubspace', () => {

test('should NOT return CALLOUT_PUBLISHED, when created', async () => {
// Arrange
const res = await createCalloutOnCollaboration(
const res = await createCalloutOnCalloutsSet(
baseScenario.subsubspace.collaboration.id,
{ framing: { profile: { displayName: callDN } } }
);
calloutId = res?.data?.createCalloutOnCollaboration.id ?? '';
calloutId = res?.data?.createCalloutOnCalloutsSet.id ?? '';

const resActivity = await getActivityLogOnCollaboration(
baseScenario.subsubspace.collaboration.id,
Expand Down Expand Up @@ -151,11 +151,11 @@ describe('Activity logs - Subsubspace', () => {
// To be updated with the changes related to whiteboard callouts
test.skip('should return CALLOUT_PUBLISHED, POST_CREATED, POST_COMMENT, DISCUSSION_COMMENT, WHITEBOARD_CREATED', async () => {
// Arrange
const res = await createCalloutOnCollaboration(
const res = await createCalloutOnCalloutsSet(
baseScenario.subsubspace.collaboration.id,
{ framing: { profile: { displayName: callDN } } }
);
calloutId = res?.data?.createCalloutOnCollaboration.id ?? '';
calloutId = res?.data?.createCalloutOnCalloutsSet.id ?? '';

await updateCalloutVisibility(calloutId, CalloutVisibility.Published);

Expand All @@ -176,7 +176,7 @@ describe('Activity logs - Subsubspace', () => {
);
messageRes?.data?.sendMessageToRoom.id;

const resDiscussion = await createCalloutOnCollaboration(
const resDiscussion = await createCalloutOnCalloutsSet(
baseScenario.subsubspace.collaboration.id,
{
framing: {
Expand All @@ -192,7 +192,7 @@ describe('Activity logs - Subsubspace', () => {
}
);
const calloutIdDiscussion =
resDiscussion?.data?.createCalloutOnCollaboration.id ?? '';
resDiscussion?.data?.createCalloutOnCalloutsSet.id ?? '';

await updateCalloutVisibility(
calloutIdDiscussion,
Expand All @@ -204,7 +204,7 @@ describe('Activity logs - Subsubspace', () => {
'comment on discussion callout'
);

const resWhiteboard = await createCalloutOnCollaboration(
const resWhiteboard = await createCalloutOnCalloutsSet(
baseScenario.subsubspace.collaboration.id,
{
framing: {
Expand All @@ -220,7 +220,7 @@ describe('Activity logs - Subsubspace', () => {
}
);
const calloutIdWhiteboard =
resWhiteboard?.data?.createCalloutOnCollaboration.id ?? '';
resWhiteboard?.data?.createCalloutOnCalloutsSet.id ?? '';

await updateCalloutVisibility(
calloutIdWhiteboard,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
updateSpaceSettings,
} from '../journey/space/space.request.params';
import {
createCalloutOnCollaboration,
createCalloutOnCalloutsSet,
deleteCallout,
updateCalloutVisibility,
} from '@functional-api/callout/callouts.request.params';
Expand Down Expand Up @@ -84,10 +84,10 @@ describe('Activity logs - Space', () => {

test('should NOT return CALLOUT_PUBLISHED, when created', async () => {
// Arrange
const res = await createCalloutOnCollaboration(
const res = await createCalloutOnCalloutsSet(
baseScenario.space.collaboration.id
);
calloutId = res.data?.createCalloutOnCollaboration.id ?? '';
calloutId = res.data?.createCalloutOnCalloutsSet.id ?? '';

const resActivity = await getActivityLogOnCollaboration(
baseScenario.space.collaboration.id,
Expand Down Expand Up @@ -161,10 +161,10 @@ describe('Activity logs - Space', () => {
// To be updated with the changes related to whiteboard callouts
test.skip('should return CALLOUT_PUBLISHED, POST_CREATED, POST_COMMENT, DISCUSSION_COMMENT, WHITEBOARD_CREATED', async () => {
// Arrange
const res = await createCalloutOnCollaboration(
const res = await createCalloutOnCalloutsSet(
baseScenario.space.collaboration.id
);
calloutId = res.data?.createCalloutOnCollaboration.id ?? '';
calloutId = res.data?.createCalloutOnCalloutsSet.id ?? '';

await updateCalloutVisibility(calloutId, CalloutVisibility.Published);

Expand All @@ -185,7 +185,7 @@ describe('Activity logs - Space', () => {
);
messageRes?.data?.sendMessageToRoom.id;

const resDiscussion = await createCalloutOnCollaboration(
const resDiscussion = await createCalloutOnCalloutsSet(
baseScenario.space.collaboration.id,
{
framing: {
Expand All @@ -201,7 +201,7 @@ describe('Activity logs - Space', () => {
}
);
const calloutIdDiscussion =
resDiscussion.data?.createCalloutOnCollaboration.id ?? '';
resDiscussion.data?.createCalloutOnCalloutsSet.id ?? '';

await updateCalloutVisibility(
calloutIdDiscussion,
Expand All @@ -213,7 +213,7 @@ describe('Activity logs - Space', () => {
'comment on discussion callout'
);

const resWhiteboard = await createCalloutOnCollaboration(
const resWhiteboard = await createCalloutOnCalloutsSet(
baseScenario.space.collaboration.id,
{
framing: {
Expand All @@ -229,7 +229,7 @@ describe('Activity logs - Space', () => {
}
);
const calloutIdWhiteboard =
resWhiteboard.data?.createCalloutOnCollaboration.id ?? '';
resWhiteboard.data?.createCalloutOnCalloutsSet.id ?? '';

await updateCalloutVisibility(
calloutIdWhiteboard,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import { graphqlErrorWrapper } from '@utils/graphql.wrapper';
import { getGraphqlClient } from '@utils/graphqlClient';

export const createWhiteboardCollectionCallout = async (
collaborationID: string,
calloutsSetID: string,
nameID: string,
displayName: string,
userRole: TestUser = TestUser.GLOBAL_ADMIN
) => {
const graphqlClient = getGraphqlClient();
const callback = (authToken: string | undefined) =>
graphqlClient.CreateCalloutOnCollaboration(
graphqlClient.CreateCalloutOnCalloutsSet(
{
calloutData: {
collaborationID,
calloutsSetID,
nameID,
type: CalloutType.WhiteboardCollection,
visibility: CalloutVisibility.Published,
Expand Down
Loading

0 comments on commit 8245d18

Please sign in to comment.