PalisadoesFoundation / talawa

Community Organization Management Software. Click on the link below to see our documentation.
https://docs.talawa.io/
GNU General Public License v3.0
310 stars 440 forks source link

Unittests for widget organization_list.dart #1294

Open palisadoes opened 2 years ago

palisadoes commented 2 years ago

We will need unittests done for all methods, classes and functions found in this file.

Any widgets referenced in this file must also have unittests done

organization_list.dart 

This file can be found in the lib/widgets directory

Parent Issue:

PR Acceptance Criteria

vedantkulkarni commented 2 years ago

Hi can I work on this one?

Ayush0Chaudhary commented 1 year ago

Can you assign this issue to me @palisadoes ?? As no activity from vedant

peanutbutter003 commented 1 year ago

@palisadoes can you assign this issue to me??

noman2002 commented 1 year ago

Unassigned due to inactivity.

github-actions[bot] commented 1 year ago

This issue did not get any activity in the past 10 days and will be closed in 365 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

nidhin29 commented 9 months ago

Can you assign this to me

palisadoes commented 9 months ago

As mentioned in Slack, this week contributor @aashimawadhwa is handling all new issue assignments and seeking reviewers for PRs. Please work with them to coordinate these activities.

nidhin29 commented 9 months ago

@aashimawadhwa ma'am can you assign this to me

nidhin29 commented 9 months ago

No response

aashimawadhwa commented 9 months ago

assigned to you @nidhin29

nidhin29 commented 9 months ago

Sorry I am not able to do it

github-actions[bot] commented 8 months ago

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

gpkonarde commented 8 months ago

@aashimawadhwa Kindly assign this issue to me

github-actions[bot] commented 7 months ago

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

Manik2708 commented 7 months ago

Can I work on this issue @Cioppolo14?

Manik2708 commented 7 months ago

Actually I would be requiring sample data of Organization which also have Users as members and admins for this test. So should I create it by myself or there would be something from API side?

Azad99-9 commented 7 months ago

@Manik2708 for testing purpose we use hard-coded mock data. Nothing comes from API.

Manik2708 commented 7 months ago

@Manik2708 for testing purpose we use hard-coded mock data. Nothing comes from API.

No I was thinking to create reusable sample data because creating mock organization and user takes time. So it will save time for developers!

Azad99-9 commented 7 months ago

Will it come from API side?

Manik2708 commented 7 months ago

That's what I am asking!

Azad99-9 commented 7 months ago

I suggest you to ask mentors.

Manik2708 commented 7 months ago

@noman2002 @Ayush0Chaudhary @literalEval I am suffering from a problem when testing the Query Hook Widget, the mock query is not getting called inside this widget when following the same approach as in fetch_plugin_list_test.dart, I am getting nothing on searching for writing tests including this widget. Can I get reason for using this widget in this file and not invoking the query directly? As this Query widget is used only in this file!

github-actions[bot] commented 7 months ago

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

Manik2708 commented 7 months ago

I was trying for this from last two weeks, but was not able to mock the behaviour of Query widget.There is a reason for this and so, I have raised an issue regarding this in GraphQL, @literalEval @noman2002 please see this issue and see if it can be fixed, as I am not able to get it's solution.

literalEval commented 7 months ago

Hey @Manik2708 is the mock for Query widget generated ?

Manik2708 commented 6 months ago

No, please refer to the issue https://github.com/zino-hofmann/graphql-flutter/issues/1408 There is a problem in sending mock query. Let me explain my approach, please see if something wrong. 1) There is a test written related to GraphQL query, plugins/fetch_,plugins_list.dart. I am following the same approach. 2) Mocking of client is successful but sending a query is failing. result.data is always coming null. 3) I went to the API reference of this Query widget, it's a widget which is extending HookWidget 4) The method which is being used for fetching query in this widget is not wrapped in any class, hence I am not able to mock it. This method is directly declared and implemented in the file. I searched a lot on Google and Stack Overflow but found nothing. Hence I raised an issue in the package, so that I could find a way of mocking it or they could fix it if it's a bug!

Manik2708 commented 6 months ago

I think this is why most of assignees were not able to complete this issue. I maybe wrong. Please verify my approach! Thanks.

noman2002 commented 6 months ago

@Manik2708 Thank you for letting us know the exact problem, your approach is fine. Let's figure out some alternates for this.

Manik2708 commented 6 months ago

I searched a bit for the solution, found that we can create our own HookWidget. Reference to Flutter Hooks: https://pub.dev/packages/flutter_hooks. Reference from graphql_flutter explaining the use of hooks: https://pub.dev/packages/graphql_flutter#query

Manik2708 commented 6 months ago

Till then unassigning myself.

github-actions[bot] commented 6 months ago

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

Cyclotron17 commented 4 months ago

hey , can you assign me this issue @palisadoes

github-actions[bot] commented 3 months ago

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

Cioppolo14 commented 3 months ago

@Cyclotron17 Are you working on this?

palisadoes commented 3 months ago

unassigning, inactivity

github-actions[bot] commented 3 months ago

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

syedali237 commented 3 weeks ago

Can I be assigned this issue?

github-actions[bot] commented 1 week ago

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.

palisadoes commented 1 week ago

unassigning. Inactivity