appirio-tech / topcoder-app

topcoder-app is an Angular application that contains dashboard, profile, settings, login/registration, and design submissions.
35 stars 59 forks source link

[$60] - Complete Appeals button should turn into Resume Appeals when the appeals are completed #1013

Open birdofpreyru opened 7 years ago

birdofpreyru commented 7 years ago

The Complete Appeals button (recently added to the Dashboard https://github.com/appirio-tech/topcoder-app/issues/958) should turn into Resume Appeals once the user has completed has appeals (but the appeals phase is not over, because other competitors have not completed their appeals yet).

gets0ul commented 7 years ago

How to test it? Any idea?

birdofpreyru commented 7 years ago

Sorry, no good idea, beside waiting for a challenge of you to go into the describe situation.

Also, you may check this https://github.com/appirio-tech/tc-common-tutorials I believe, it there are instructions how to deploy Direct locally and then test everything related to the challenge flow locally, but I have not tried myself recently.

Most probably, some days later I'll be able to setup a test challenge with this situation in dev version of TC, but at the moment I am having problems with starting challenges there.

gets0ul commented 7 years ago

Seems more work on setup rather than fixing the actual problem.

birdofpreyru commented 7 years ago

Yeap, but once you manage to set it up you'll be able effectively work on other issues which demand manipulations with challenge phases for testing.

birdofpreyru commented 7 years ago

Update

  1. Here is the test challenge (at dev site): https://www.topcoder-dev.com/challenge-details/30050691/?type=develop&noncache=true. Test user dan_developer has submitted to that challenge, and the challenge is currently in Appeals phase.
  2. It seems, there is no API to test whether a user has completed his appeals or not (if you find one, it will be great!). We still need a service method to find it out. My suggestion is to implement such method like:
    1. It loads the page from the Complete Appeals confirmation screen (which is something like https://software.topcoder-dev.com/review/actions/EarlyAppeals?pid=30050691). Depending on whether user has completed his appeals or not, this page will ask for confirmation to re-open or to complete appeals.
    2. Match the content of that confirmation page against some regular expression to find out appeals status for the user.
    3. Return the result.
  3. Such service method should be added both into the code in topcoder-app (into challenge service), and in the tc-site repo (challenge details service).
  4. State of the Appeals for this user should be loaded into controllers of the Dashboard (topcoder-app repo) and challenge details page (in tc-site repo).
  5. In both cases this data should be used to properly render either Complete Appeals or Resume Appeals buttons.