Moodle
  1. Moodle
  2. MDL-42285

Automate MDLQA-93 - A teacher can delete questions from the question bank

    Details

    • Story Points:
      8
    • Rank:
      53531
    • Sprint:
      FRONTEND Sprint 6

      Description

      As described in MDLQA-93, a teacher can delete questions from the question bank

        Issue Links

          Activity

          Hide
          David Monllaó added a comment - - edited

          Hi Jason,

          It looks very good, just a few comments about minor issues:

          (Editing adding more points)

          Show
          David Monllaó added a comment - - edited Hi Jason, It looks very good, just a few comments about minor issues: The commit message should include the MDLQA number Is there a reason to begin the test being logged as admin and then logging out, and switching to teacher? For what I see all can be done using a teacher account, also note that the background section is useful to specify the common parts of the scenarios and both of the scenarios are beginning with the same 2 steps https://github.com/phalacee/moodle/compare/34fb354...MDL-42285-master#diff-f8585b50cdd78933554ce41ef97bdf21R3 The description of the feature could be more informative; will extract reports from those feature files in future we will publish those reports so is good that the info about the feature is more explicative, the In order to should contain a sentence explaining why do we want this feature ( http://docs.moodle.org/dev/Acceptance_testing#Writing_features ) something like In order to get rid of unused or outdated questions Please replace https://github.com/phalacee/moodle/compare/34fb354...MDL-42285-master#diff-f8585b50cdd78933554ce41ef97bdf21R43 and other references to this step for And I click on "Add to quiz" "link" in the "Test question name" "table_row" we are deprecating this step, we are waiting for the policy to mark the deprecated steps in some way (Editing adding more points) If I'm not missing something you can reference the checkbox by it's label https://github.com/phalacee/moodle/compare/34fb354...MDL-42285-master#diff-f8585b50cdd78933554ce41ef97bdf21R49 The Then section begins in the first assertion ( https://github.com/phalacee/moodle/compare/34fb354...MDL-42285-master#diff-f8585b50cdd78933554ce41ef97bdf21R48 )
          Hide
          Jason Fowler added a comment -
          • Will add that
          • No reason for doing it as admin, other than the edit question test I copied from did it that way. Will fix that.
          • Will fix that
          • Not sure what you mean there, can you please elaborate?
          • I thought we were to aim to avoid using strings based on language where possible, as they are capable of changing more frequently?
          • Not sure what you mean there, can you please elaborate?
          Show
          Jason Fowler added a comment - Will add that No reason for doing it as admin, other than the edit question test I copied from did it that way. Will fix that. Will fix that Not sure what you mean there, can you please elaborate? I thought we were to aim to avoid using strings based on language where possible, as they are capable of changing more frequently? Not sure what you mean there, can you please elaborate?
          Hide
          David Monllaó added a comment -

          #4, we will deprecate And I click on "Add to quiz" "link" in the "Test question name" table row but is not marked as deprecated ATM, would be good if you use And I click on "Add to quiz" "link" in the "Test question name" "table_row" instead, otherwise we will change them along with the other I click on "Add to quiz" "link" in the "Test question name" table row uses, is not critical

          #5, yes, they are changing, but is more important that the tests are readable, as you have been doing during the whole test but this specific step. What we must do is use get_string() calls when we are working on step definitions (php)

          #6, np, this seems to be the most asked/answered question The scenarios are split in 3 parts, the Given, When and Then prefixes are used to split it, you can read a scenario and with a quick sight see what it is testing according to those prefixes. Given to set the initial context, When when performing an action that provokes a change in the system (the change we are testing) and Then to check the outcomes of that action. Most of the time a scenario is not just testing one action, but all counts as checking outcomes from the first outcomes checking (https://github.com/phalacee/moodle/compare/34fb354...MDL-42285-master#diff-f8585b50cdd78933554ce41ef97bdf21R4 -> we should use Then)

          Show
          David Monllaó added a comment - #4, we will deprecate And I click on "Add to quiz" "link" in the "Test question name" table row but is not marked as deprecated ATM, would be good if you use And I click on "Add to quiz" "link" in the "Test question name" "table_row" instead, otherwise we will change them along with the other I click on "Add to quiz" "link" in the "Test question name" table row uses, is not critical #5, yes, they are changing, but is more important that the tests are readable, as you have been doing during the whole test but this specific step. What we must do is use get_string() calls when we are working on step definitions (php) #6, np, this seems to be the most asked/answered question The scenarios are split in 3 parts, the Given, When and Then prefixes are used to split it, you can read a scenario and with a quick sight see what it is testing according to those prefixes. Given to set the initial context, When when performing an action that provokes a change in the system (the change we are testing) and Then to check the outcomes of that action. Most of the time a scenario is not just testing one action, but all counts as checking outcomes from the first outcomes checking ( https://github.com/phalacee/moodle/compare/34fb354...MDL-42285-master#diff-f8585b50cdd78933554ce41ef97bdf21R4 -> we should use Then )
          Hide
          Jason Fowler added a comment -

          Okay, that should be it all fixed. Can you please just check it one last time, then I will backport it and write some instructions for it?

          Show
          Jason Fowler added a comment - Okay, that should be it all fixed. Can you please just check it one last time, then I will backport it and write some instructions for it?
          Hide
          David Monllaó added a comment -

          All good Jason, thanks

          Show
          David Monllaó added a comment - All good Jason, thanks
          Hide
          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
          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
          Dan Poltawski added a comment - - edited

          EDIT: sorry - my bad!

          Show
          Dan Poltawski added a comment - - edited EDIT: sorry - my bad!
          Hide
          Jason Fowler added a comment -

          you need a config for your own behat environment in there Dan

          Show
          Jason Fowler added a comment - you need a config for your own behat environment in there Dan
          Hide
          Dan Poltawski added a comment -

          Integrated, thanks

          Show
          Dan Poltawski added a comment - Integrated, thanks
          Hide
          Dan Poltawski added a comment -

          Works for me, thanks

          Show
          Dan Poltawski added a comment - Works for me, thanks
          Hide
          Dan Poltawski added a comment -

          FYI: related MDLQA-93 has been moved from MDLQA-1 to MDLQA-5249 (bag of behat-converted tests). Thanks!

          Show
          Dan Poltawski added a comment - FYI: related MDLQA-93 has been moved from MDLQA-1 to MDLQA-5249 (bag of behat-converted tests). Thanks!
          Hide
          Jason Fowler added a comment -

          Sweet, one less thing we have to repeat manually every six months.

          Show
          Jason Fowler added a comment - Sweet, one less thing we have to repeat manually every six months.
          Hide
          Dan Poltawski added a comment -

          Congratulations - this issue has been included in Moodle and is now available on our git mirrors and shortly will become available on the download servers shortly.

          Show
          Dan Poltawski added a comment - Congratulations - this issue has been included in Moodle and is now available on our git mirrors and shortly will become available on the download servers shortly.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Agile