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

Bug Fixes : On Creating advertisement page get reloaded #1118

Closed
wants to merge 2 commits into from
Closed

Conversation

aialok
Copy link
Contributor

@aialok aialok commented Dec 3, 2023

What kind of change does this PR introduce?

  • Resolves the bug where the page was refreshing unexpectedly upon creating a new advertisement in the Advertisement Section.

Issue Number:

Fixes #1115

Did you add tests for your changes?

  • No

Snapshots/Videos:

  • Before
cinnamon-2023-12-02T215527+0530.webm
  • After
cinnamon-2023-12-02T223826+0530.webm

If relevant, did you update the documentation?

  • No

Summary

  • The current issue in the Advertisement Section involves an unexpected page refresh after creating a new advertisement. This behavior is attributed to the use of window.location.reload(). The proposed solution in the Pull Request (PR) aims to address this bug by removing the window.location.reload() statement, preventing the page from refreshing automatically.

Does this PR introduce a breaking change?

  • No

Other information

Have you read the contributing guide?

Copy link

github-actions bot commented Dec 3, 2023

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

Copy link

codecov bot commented Dec 3, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (441ab0e) 94.21% compared to head (2810a65) 94.21%.

❗ Current head 2810a65 differs from pull request most recent head bff0de0. Consider uploading reports for the commit bff0de0 to get more accurate results

Files Patch % Lines
...re/AdvertisementRegister/AdvertisementRegister.tsx 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1118   +/-   ##
========================================
  Coverage    94.21%   94.21%           
========================================
  Files          138      138           
  Lines         3282     3282           
  Branches       912      912           
========================================
  Hits          3092     3092           
  Misses         183      183           
  Partials         7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@aashimawadhwa aashimawadhwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please cover these lines for test

setTimeout(() => {
window.location.reload();
}, 2000);
setFormState({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add tests for these lines.

@aialok aialok closed this by deleting the head repository Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants