Uploaded image for project: 'Migration Toolkit for Applications'
  1. Migration Toolkit for Applications
  2. MTA-688 [QE] Automate Migration Waves TCs
  3. MTA-1076

[QE] [Migration Waves] Automate deletion of migration waves without name

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • QE-Task
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      Hi nhamza12 ,

      As you already know, a migration wave can be created without a name, this presents a problem when deleting them as we are currently tracking them down by their name, so there's no automation to delete a migration wave as of now.

      You can try to automate it and use it in the test you created to test duplicated migration waves.

      I think the best approach would be to do a check in the Migration Wave's delete method

      if it has name, delete it as we're currently doing.

      if not, try to get the wave by their two dates (only one won't work because two waves can have the same start or end date), and delete it.

      And, to make the code more readable we can keep the delete method public, and create two different private methods "deleteByName" and "deleteByDates".

      So the delete method would look like this:

      public delete() {
          if(this.name) {
              this.deleteByName();
              return;

                }
          this.deleteByDates();
      }

      Try to automate it and let me know if you have any questions!

              nhamza12 Neil Hamza
              rh-ee-abrugaro Alejandro Brugarolas
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: