mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
More complex report and review seeding
This commit is contained in:
parent
0b7a0496a2
commit
8cc05ab910
@ -657,6 +657,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
authenticatedUser = await huey.toJson()
|
authenticatedUser = await huey.toJson()
|
||||||
|
// report resource first time
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
mutate({
|
mutate({
|
||||||
mutation: reportMutation,
|
mutation: reportMutation,
|
||||||
@ -690,6 +691,14 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
reasonDescription: 'This post is bigoted',
|
reasonDescription: 'This post is bigoted',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
mutate({
|
||||||
|
mutation: reportMutation,
|
||||||
|
variables: {
|
||||||
|
resourceId: 'p2',
|
||||||
|
reasonCategory: 'doxing',
|
||||||
|
reasonDescription: 'OMG my data !!!',
|
||||||
|
},
|
||||||
|
}),
|
||||||
mutate({
|
mutate({
|
||||||
mutation: reportMutation,
|
mutation: reportMutation,
|
||||||
variables: {
|
variables: {
|
||||||
@ -699,7 +708,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
// report content a second time
|
// report resource a second time
|
||||||
authenticatedUser = await dewey.toJson()
|
authenticatedUser = await dewey.toJson()
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
mutate({
|
mutate({
|
||||||
@ -726,6 +735,14 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
reasonDescription: '',
|
reasonDescription: '',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
mutate({
|
||||||
|
mutation: reportMutation,
|
||||||
|
variables: {
|
||||||
|
resourceId: 'p2',
|
||||||
|
reasonCategory: 'intentional_intimidation_stalking_persecution',
|
||||||
|
reasonDescription: '',
|
||||||
|
},
|
||||||
|
}),
|
||||||
mutate({
|
mutate({
|
||||||
mutation: reportMutation,
|
mutation: reportMutation,
|
||||||
variables: {
|
variables: {
|
||||||
@ -737,7 +754,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
])
|
])
|
||||||
authenticatedUser = null
|
authenticatedUser = null
|
||||||
|
|
||||||
// only review after report !!!
|
// only review resource after report !!!
|
||||||
const reviewMutation = gql`
|
const reviewMutation = gql`
|
||||||
mutation($resourceId: ID!, $disable: Boolean, $closed: Boolean) {
|
mutation($resourceId: ID!, $disable: Boolean, $closed: Boolean) {
|
||||||
review(resourceId: $resourceId, disable: $disable, closed: $closed) {
|
review(resourceId: $resourceId, disable: $disable, closed: $closed) {
|
||||||
@ -750,8 +767,16 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
disable: true,
|
disable: true,
|
||||||
closed: false,
|
closed: false,
|
||||||
}
|
}
|
||||||
|
// review resource first time
|
||||||
authenticatedUser = await bobDerBaumeister.toJson()
|
authenticatedUser = await bobDerBaumeister.toJson()
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
mutate({
|
||||||
|
mutation: reviewMutation,
|
||||||
|
variables: {
|
||||||
|
...disableVariables,
|
||||||
|
resourceId: 'p2',
|
||||||
|
},
|
||||||
|
}),
|
||||||
mutate({
|
mutate({
|
||||||
mutation: reviewMutation,
|
mutation: reviewMutation,
|
||||||
variables: {
|
variables: {
|
||||||
@ -768,6 +793,86 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
|
// second review of resource and close claim
|
||||||
|
authenticatedUser = await peterLustig.toJson()
|
||||||
|
await Promise.all([
|
||||||
|
mutate({
|
||||||
|
mutation: reviewMutation,
|
||||||
|
variables: {
|
||||||
|
...disableVariables,
|
||||||
|
resourceId: 'p2',
|
||||||
|
disable: false,
|
||||||
|
closed: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
])
|
||||||
|
authenticatedUser = null
|
||||||
|
|
||||||
|
// report resource after closing of the claim
|
||||||
|
authenticatedUser = await bobDerBaumeister.toJson()
|
||||||
|
await Promise.all([
|
||||||
|
mutate({
|
||||||
|
mutation: reportMutation,
|
||||||
|
variables: {
|
||||||
|
resourceId: 'p2',
|
||||||
|
reasonCategory: 'doxing',
|
||||||
|
reasonDescription: "That's my friends privat data!",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
])
|
||||||
|
// report resource second time after closing of the claim
|
||||||
|
authenticatedUser = await jennyRostock.toJson()
|
||||||
|
await Promise.all([
|
||||||
|
mutate({
|
||||||
|
mutation: reportMutation,
|
||||||
|
variables: {
|
||||||
|
resourceId: 'p2',
|
||||||
|
reasonCategory: 'doxing',
|
||||||
|
reasonDescription: "I think it is my friends data!",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
])
|
||||||
|
authenticatedUser = null
|
||||||
|
|
||||||
|
// third review of resource and close claim
|
||||||
|
authenticatedUser = await bobDerBaumeister.toJson()
|
||||||
|
await Promise.all([
|
||||||
|
mutate({
|
||||||
|
mutation: reviewMutation,
|
||||||
|
variables: {
|
||||||
|
...disableVariables,
|
||||||
|
resourceId: 'p2',
|
||||||
|
disable: true,
|
||||||
|
closed: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
])
|
||||||
|
authenticatedUser = null
|
||||||
|
|
||||||
|
// report resource after second closing of the claim
|
||||||
|
authenticatedUser = await huey.toJson()
|
||||||
|
await Promise.all([
|
||||||
|
mutate({
|
||||||
|
mutation: reportMutation,
|
||||||
|
variables: {
|
||||||
|
resourceId: 'p2',
|
||||||
|
reasonCategory: 'doxing',
|
||||||
|
reasonDescription: "That's my privat data!",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
])
|
||||||
|
// report resource second time after second closing of the claim
|
||||||
|
authenticatedUser = await jennyRostock.toJson()
|
||||||
|
await Promise.all([
|
||||||
|
mutate({
|
||||||
|
mutation: reportMutation,
|
||||||
|
variables: {
|
||||||
|
resourceId: 'p2',
|
||||||
|
reasonCategory: 'doxing',
|
||||||
|
reasonDescription: "I think it is my friends data again!",
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
])
|
||||||
authenticatedUser = null
|
authenticatedUser = null
|
||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user