Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-42332

Automate MDLQA-5260 and MDLQA-5261 - A badge can be awarded based on activity and course completion.

    Details

    • Testing Instructions:
      Hide

      vendor/bin/behat --config=/home/jerome/moodles/stable_master/moodledata_behat/behat/behat.yml --name "Award badge on activity completion"

      vendor/bin/behat --config=/home/jerome/moodles/stable_master/moodledata_behat/behat/behat.yml --name "Award badge on course completion"

      Show
      vendor/bin/behat --config=/home/jerome/moodles/stable_master/moodledata_behat/behat/behat.yml --name "Award badge on activity completion" vendor/bin/behat --config=/home/jerome/moodles/stable_master/moodledata_behat/behat/behat.yml --name "Award badge on course completion"
    • Affected Branches:
      MOODLE_25_STABLE, MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-42332-master
    • Sprint:
      FRONTEND Sprint 6
    • Story Points (Obsolete):
      5
    • Sprint:
      FRONTEND Sprint 6

      Description

      As described in MDLQA-5060 and MDLQA-5261, a badge can be awarded based on activity and course completion.

      Both can be joined in the same feature file using scenarios and a background section

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            jerome Jérôme Mouneyrac added a comment - - edited

            Only last commit is relevant (previous commit come from the blocker issues).

            Show
            jerome Jérôme Mouneyrac added a comment - - edited Only last commit is relevant (previous commit come from the blocker issues).
            Hide
            dmonllao David Monllaó added a comment -

            Hi Jerome,

            • The same I commented in your other MDLQA-behat conversion issues, in Award badge on course completion you are not even checking that the user don't have the award before marking it as completed, IMO a whole scenario with just one assertion is not helping to make behat tests worth for moodle
            • In award_badge.feature right now we have the following scenarios, they are mixing different levels, can we merge any of them?:
              • Award profile badge
              • Award site badge
              • Award course badge
              • Award badge on activity completion
              • Award badge on course completion
            • https://github.com/mouneyrac/moodle/commit/2bfce304924b8fa0e4f17ce83e3bce35bfb8cce1#diff-05b3a759b75f3d07cd46a86631860c99R220 is not closing the row
            • Only the first line of the comment is used as a step description in admin/tool/behat/index.php, would be good to merge both description lines.
            Show
            dmonllao David Monllaó added a comment - Hi Jerome, The same I commented in your other MDLQA-behat conversion issues, in Award badge on course completion you are not even checking that the user don't have the award before marking it as completed, IMO a whole scenario with just one assertion is not helping to make behat tests worth for moodle In award_badge.feature right now we have the following scenarios, they are mixing different levels, can we merge any of them?: Award profile badge Award site badge Award course badge Award badge on activity completion Award badge on course completion https://github.com/mouneyrac/moodle/commit/2bfce304924b8fa0e4f17ce83e3bce35bfb8cce1#diff-05b3a759b75f3d07cd46a86631860c99R220 is not closing the row Only the first line of the comment is used as a step description in admin/tool/behat/index.php, would be good to merge both description lines.
            Hide
            jerome Jérôme Mouneyrac added a comment -

            Thanks David. For point 2), there are five different scenarios, to me they make sens as individual user stories. Fixing the rest. Thanks.

            Show
            jerome Jérôme Mouneyrac added a comment - Thanks David. For point 2), there are five different scenarios, to me they make sens as individual user stories. Fixing the rest. Thanks.
            Hide
            jerome Jérôme Mouneyrac added a comment - - edited

            Sending to integration (take the last commits only).
            PS: I updated the code, "I trigger cron" step now reflect what a user will do (go to admin/cron.php from browser).

            Show
            jerome Jérôme Mouneyrac added a comment - - edited Sending to integration (take the last commits only). PS: I updated the code, "I trigger cron" step now reflect what a user will do (go to admin/cron.php from browser).
            Hide
            dmonllao David Monllaó added a comment -

            Just for the record, as as discussed in the dev. chat, hardcoding URLs is not a good practice as a user should be able to go everywhere following links or being redirected

            Show
            dmonllao David Monllaó added a comment - Just for the record, as as discussed in the dev. chat, hardcoding URLs is not a good practice as a user should be able to go everywhere following links or being redirected
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            damyon Damyon Wiese added a comment -

            (blocked)

            Show
            damyon Damyon Wiese added a comment - (blocked)
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated to master and 25, thanks Jerome

            Show
            poltawski Dan Poltawski added a comment - Integrated to master and 25, thanks Jerome
            Hide
            dobedobedoh Andrew Nicols added a comment -

            All works as described.

            Show
            dobedobedoh Andrew Nicols added a comment - All works as described.
            Hide
            dmonllao David Monllaó added a comment -

            They are also passing for me when running it locally but this new test is failing in the CI server, is complaining about a modal window, probably the ones that appears when you want to leave the page without submitting an edited form. I'm still investigating...

            Show
            dmonllao David Monllaó added a comment - They are also passing for me when running it locally but this new test is failing in the CI server, is complaining about a modal window, probably the ones that appears when you want to leave the page without submitting an edited form. I'm still investigating...
            Hide
            dmonllao David Monllaó added a comment -

            Adding a fix for the fail in CI, it was not waiting for the previous AJAX request to finish. Client dev. computers seems faster than CI so the problem is only there, we will remove this wait after MDL-41030 as all the AJAX requests will finish before continuing.

            git pull git://github.com/dmonllao/moodle.git MDL-42332-fix-modal-window

            Show
            dmonllao David Monllaó added a comment - Adding a fix for the fail in CI, it was not waiting for the previous AJAX request to finish. Client dev. computers seems faster than CI so the problem is only there, we will remove this wait after MDL-41030 as all the AJAX requests will finish before continuing. git pull git://github.com/dmonllao/moodle.git MDL-42332 -fix-modal-window
            Hide
            dmonllao David Monllaó added a comment -

            Please cherry-pick it also to 2.5

            Show
            dmonllao David Monllaó added a comment - Please cherry-pick it also to 2.5
            Hide
            poltawski Dan Poltawski added a comment -

            thanks, back to testing.

            Show
            poltawski Dan Poltawski added a comment - thanks, back to testing.
            Hide
            dmonllao David Monllaó added a comment -

            Waiting for CI to finish, Andrew Nicols no need to test it again manually, thanks.

            Show
            dmonllao David Monllaó added a comment - Waiting for CI to finish, Andrew Nicols no need to test it again manually, thanks.
            Hide
            skodak Petr Skoda added a comment -

            both branches completed full behat testrun without problems for me, thanks

            Show
            skodak Petr Skoda added a comment - both branches completed full behat testrun without problems for me, thanks
            Hide
            damyon Damyon Wiese added a comment -

            Here lies 52 bugs.
            All fixed or swept under a rug.
            If they come back one day,
            To our dismay,
            We all will feel quite un-smug.

            Thanks for the reporting/fixing/testing on this issue. It has been sent upstream.

            Show
            damyon Damyon Wiese added a comment - Here lies 52 bugs. All fixed or swept under a rug. If they come back one day, To our dismay, We all will feel quite un-smug. Thanks for the reporting/fixing/testing on this issue. It has been sent upstream.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            FYI: related MDLQA-5260 and MDLQA-5261 have been moved from MDLQA-1 to MDLQA-5249 (bag of behat-converted tests). Thanks!

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - FYI: related MDLQA-5260 and MDLQA-5261 have been moved from MDLQA-1 to MDLQA-5249 (bag of behat-converted tests). Thanks!

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Nov/13

                  Agile