sensei icon indicating copy to clipboard operation
sensei copied to clipboard

Add "Publish your first course" task

Open fjorgemota opened this issue 3 years ago • 2 comments
trafficstars

Fixes #5639

Changes proposed in this Pull Request

  • Add Publish your First Course task;
  • Add tests for the task added;
  • Register task on the provider;

Testing instructions

On a WP installation containing Sensei LMS on this branch:

  1. Run curl --user "user:application password" http://your-host/wp-json/sensei-internal/v1/home and make sure that the task "Publish your first Course" has done set to false, with the URL pointing to create a new course;
  2. Create a course/import the sample course, and verify if that task still has done set to false, with the URL still pointing to create a new course.
  3. Publish the sample course, and verify if that task still has done set to false, with the URL still pointing to create a new course;
  4. Now, create another course, and verify if that task still has done set to false, but with the URL now pointing to the edit page for that course you just created;
  5. Publish the course you just created, and verify if that task now has done set to true, and the URL is now null;

fjorgemota avatar Oct 07 '22 22:10 fjorgemota

Codecov Report

Merging #5888 (9e2f753) into remove/image-tasks-sensei-home (dd52b8b) will increase coverage by 0.03%. The diff coverage is 73.33%.

Impacted file tree graph

@@                         Coverage Diff                          @@
##             remove/image-tasks-sensei-home    #5888      +/-   ##
====================================================================
+ Coverage                             43.84%   43.87%   +0.03%     
- Complexity                             9137     9149      +12     
====================================================================
  Files                                   439      440       +1     
  Lines                                 32514    32544      +30     
  Branches                                252      252              
====================================================================
+ Hits                                  14255    14278      +23     
- Misses                                18073    18080       +7     
  Partials                                186      186              
Impacted Files Coverage Δ
...sk/class-sensei-home-task-publish-first-course.php 72.41% <72.41%> (ø)
...in/home/tasks/class-sensei-home-tasks-provider.php 100.00% <100.00%> (ø)
includes/class-sensei-quiz.php 59.34% <0.00%> (+0.13%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update dd52b8b...9e2f753. Read the comment docs.

codecov[bot] avatar Oct 07 '22 23:10 codecov[bot]

I just rebased this branch over the changes on the feature/new-onboarding-wizard, and I fixed the conflict in that merge. I decided to rebase instead of merge because I assume no one downloaded this branch yet for review.

If you did, just delete your local branch and redownload again, please. :)

fjorgemota avatar Oct 12 '22 02:10 fjorgemota