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

Code Coverage: Create tests for src/components/AddOn/core/AddOnStore/AddOnStore.tsx #1038

Closed
palisadoes opened this issue Nov 5, 2023 · 20 comments
Assignees
Labels
good first issue Good for newcomers test Testing application

Comments

@palisadoes
Copy link
Contributor

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

Any widgets, components, modals referenced in this file must also have unittests done

PR Acceptance Criteria

@palisadoes palisadoes added the bug Something isn't working label Nov 5, 2023
@palisadoes palisadoes added feature request good first issue Good for newcomers test Testing application and removed bug Something isn't working feature request labels Nov 5, 2023
@Gmin2
Copy link
Contributor

Gmin2 commented Nov 13, 2023

can you assigned me this issue ?

@Gmin2 Gmin2 removed their assignment Nov 23, 2023
Copy link

github-actions bot commented Dec 4, 2023

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.

@github-actions github-actions bot added the no-issue-activity No issue activity label Dec 4, 2023
@adi790uu
Copy link
Contributor

adi790uu commented Dec 5, 2023

Hey @noman2002 I would like to work on this issue

@github-actions github-actions bot removed the no-issue-activity No issue activity label Dec 6, 2023
@adi790uu adi790uu removed their assignment Dec 15, 2023
@shivansh-bhatnagar18
Copy link

Hey @noman2002 I would love to work on this issue.

@Veer0x1
Copy link
Contributor

Veer0x1 commented Dec 21, 2023

I would like to add this test.

@palisadoes
Copy link
Contributor Author

@shivansh-bhatnagar18 Are you still working on this? There is no PR

@shivansh-bhatnagar18
Copy link

Yes @palisadoes I am still working on this issue. Thank you

@shivansh-bhatnagar18 shivansh-bhatnagar18 removed their assignment Dec 23, 2023
@ALOK9442
Copy link

Hey @noman2002 I would love to work on this issue.

@ALOK9442
Copy link

ALOK9442 commented Jan 1, 2024

I have a question regarding to issue, when we encounter failing tests, is the expectation primarily to address the tests themselves or also to make corrections in the corresponding code files? I want to ensure that I align with the issue.
Your guidance on this matter would be greatly appreciated.

@palisadoes
Copy link
Contributor Author

When tests fail they can be caused by either poorly written source code or poorly written tests. In either case we need the testing goals achieved without any functionality being affected.

Copy link

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.

@github-actions github-actions bot added the no-issue-activity No issue activity label Jan 12, 2024
@github-actions github-actions bot removed the no-issue-activity No issue activity label Jan 20, 2024
Copy link

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.

@github-actions github-actions bot added the no-issue-activity No issue activity label Jan 31, 2024
@github-actions github-actions bot removed the no-issue-activity No issue activity label Feb 12, 2024
@Anvita0305
Copy link
Contributor

Hello, I would like to work on this issue. Can you please assign it to me? Thanks!

@Anvita0305
Copy link
Contributor

Anvita0305 commented Feb 16, 2024

Hello, while working on the tests I found out that the /orgstore page after clicking on 'Installed' Tab is giving this error.
image

So, while searching how to rectify it, I saw that it is fetching data from these URLs
image

I was bit confused regarding how the data is being fetched from port 3005 and 4321(port no from .env file).
Shouldn't it be fetched from database?
Can someone please explain it? Thanks!

@palisadoes
Copy link
Contributor Author

@SiddheshKukade Please provide some context to this question about port 3005

@Anvita0305
Copy link
Contributor

Hello, while working on the tests I am encountering this error and thus,unable to proceed.
image

  1. const result = await fetch(http://localhost:${process.env.PORT}/store); this is the line where I'm getting error. const result is undefined.
  2. Does this issue need to be solved before writing the tests?
    Any help would really be appreciated. Thanks!

@SiddheshKukade
Copy link
Member

@SiddheshKukade Please provide some context to this question about port 3005

@palisadoes that was a part of old code. It can be deleted It's not being used anywhere.

@SiddheshKukade
Copy link
Member

SiddheshKukade commented Feb 18, 2024

Hello, while working on the tests I am encountering this error and thus,unable to proceed. image

  1. const result = await fetch(http://localhost:${process.env.PORT}/store); this is the line where I'm getting error. const result is undefined.
  2. Does this issue need to be solved before writing the tests?
    Any help would really be appreciated. Thanks!

Not sure about this. But I think you can delete lines if it has any unused variables or code lines.
You can take some reference from here: https://github.com/PalisadoesFoundation/talawa-admin/pull/1363/files

@Anvita0305
Copy link
Contributor

Hello, I have a doubt. In AddOnStore.tsx file, a filter pluginInstallStatus == true is added for the Installed Tab. However I am not able to find it in the schema.
So, I have upgraded it to filter the orgs whose orgId is not in uninstalled orgs array. Is this logic correct? If not, I will revert it to original code.

@palisadoes
Copy link
Contributor Author

@SiddheshKukade This looks like a question for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers test Testing application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants