-
Notifications
You must be signed in to change notification settings - Fork 4
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
Analysis Module: Implement Analysis Mutation to setup a new analysis #1516
base: develop
Are you sure you want to change the base?
Conversation
bbcda71
to
12ce2e0
Compare
752e009
to
b3ea86f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's verify.
db630f4
to
d68451c
Compare
d68451c
to
b505c2c
Compare
b505c2c
to
2f66047
Compare
startDate: Date | ||
endDate: Date! | ||
clonedFrom: ID | ||
analysisPillar: [AnalysisPillarGqlInputType!] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@subinasr @AdityaKhatri @sudan45 @sauravsapkota
Looking at this behavior, should we continue with this or modify the logic?
Basically, right now, while editing Analysis, one can remove one or multiple Analysis Pillar with one click.
Let discuss more on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thenav56, I think this is fine for now. I'll create an issue to handle this behavior in the frontend.
the-deep/client#2981
Let me know what you think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Remove
WritableNestedModelSerializer
- Write Custom logic to save and update
AnalysisPillar
@thenav56 @AdityaKhatri @subinasr @sudan45 @susilnem. Please check once.
projectId=self.project_without_af.id, | ||
) | ||
|
||
self.force_login(self.non_member_user) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to use member_user?
2f66047
to
682f97e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost done
self.assertEqual( | ||
content['data']['project']['analysisCreate']['result']['title'], | ||
minput['analysisData']['title'] | ||
) | ||
self.assertEqual( | ||
content['data']['project']['analysisCreate']['result']['teamLead']['id'], | ||
str(self.member_user.id) | ||
) | ||
self.assertEqual( | ||
content['data']['project']['analysisCreate']['result']['endDate'], | ||
str(minput['analysisData']['endDate']) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.assertEqual( | |
content['data']['project']['analysisCreate']['result']['title'], | |
minput['analysisData']['title'] | |
) | |
self.assertEqual( | |
content['data']['project']['analysisCreate']['result']['teamLead']['id'], | |
str(self.member_user.id) | |
) | |
self.assertEqual( | |
content['data']['project']['analysisCreate']['result']['endDate'], | |
str(minput['analysisData']['endDate']) | |
) | |
analysis_resp_data = content['data']['project']['analysisCreate']['result'] | |
self.assertEqual(analysis_resp_data['title'], minput['analysisData']['title']) | |
self.assertEqual(analysis_resp_data['teamLead']['id'], str(self.member_user.id)) | |
self.assertEqual(analysis_resp_data['endDate'], str(minput['analysisData']['endDate'])) |
minput = dict( | ||
analysisData=dict( | ||
title='Test Analysis', teamLead=self.member_user.id, endDate='2020-01-01' | ||
), | ||
projectId=self.project_with_af.id, | ||
) | ||
|
||
self.force_login(self.member_user) | ||
content = self.query_check(self.CREATE_MUTATION, variables=minput) | ||
self.assertIsNotNone(content['data']['project']['analysisCreate']['result']['id']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just use factory here.
minput = dict( | ||
analysisData=dict( | ||
title='Test Analysis', teamLead=self.member_user.id, endDate='2020-01-01' | ||
), | ||
projectId=self.project_with_af.id, | ||
) | ||
|
||
self.force_login(self.member_user) | ||
content = self.query_check(self.CREATE_MUTATION, variables=minput) | ||
self.assertIsNotNone(content['data']['project']['analysisCreate']['result']['id']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's just use factory here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor changes
05d71a4
to
cf8a770
Compare
cf8a770
to
56f7199
Compare
56f7199
to
9ec96c9
Compare
9ec96c9
to
355a5f5
Compare
e8a506e
to
49a7bc8
Compare
cb86e92
to
a5f03bb
Compare
Addresses
Changes
Convert REST API for Analysis CRUD to GraphQL mutation
This PR doesn't introduce any:
print
This PR contains valid: