Problem/Motivation

It would be great to see this module tested with a "real" Drupal 7 migration.

Proposed resolution

Create a Drupal 7 migration fixture (with DB and files) and (at least) a kernel test that tests the expected outcome.

Remaining tasks

Must-have's:

  1. Create a Drupal 7 migration fixture. Done.
  2. Create a kernel test. Done.
  3. Enable automated tests for this project. I think that certain DB queries will fail with PostreSQL, so the initial test env(s) should use MySQL or SQLite.

Could-have's:

  1. The above for Drupal 6 → Drupal 8|9 migration
  2. A functional test that uses core's Migrate Drupal UI module
  3. A functional test that uses Migrate Upgrade and Drush

Additional info

The test will pass if you apply the following patches (sorted list):

  1. #3164697-3: migrations/d7 directory
  2. #3170195-3: Migrate conditions of type "contains"
  3. #3113558: Submission data values are not saved This is not required anymore.
  4. #3172154-10: Fix source plugin's undefined index issues, schema issues and unnecessary trailing whitespaces and empty lines
  5. #3172161-2: Fix the migration of option selects with groups
  6. #3172162-2: Adjust (the correct) value for webform submission's URI
  7. #3172176-2: D7 Fix the migration of nested values, multi-value field types (e.g. checkboxes) and handle 'grid' type submission values
  8. #3172417-5: [PP-1] d7_webform_submissions migrates uid without using migration lookup
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

huzooka created an issue. See original summary.

huzooka’s picture

Assigned: huzooka » Unassigned
Status: Active » Needs review
StatusFileSize
new883.58 KB
huzooka’s picture

Assigned: Unassigned » huzooka
Status: Needs review » Needs work
huzooka’s picture

Assigned: huzooka » Unassigned
Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new884.16 KB
huzooka’s picture

huzooka’s picture

Issue summary: View changes
huzooka’s picture

Assigned: Unassigned » huzooka
Status: Needs review » Needs work

huzooka’s picture

Assigned: huzooka » Unassigned
Status: Needs work » Needs review
huzooka’s picture

Issue summary: View changes

Updated the patch list.

Matroskeen made their first commit to this issue’s fork.

matroskeen’s picture

StatusFileSize
new854.75 KB

Even if the annotation is there, it still complains about missing webform module 🤔
Maybe there is something wrong with MR flow, trying with a patch.

The last submitted patch, 5: webform_migrate-kernel_test-3172139-5.patch, failed testing. View results

matroskeen’s picture

StatusFileSize
new871.52 KB

trying with --binary flag

Status: Needs review » Needs work

The last submitted patch, 14: webform_migrate-kernel_test-3172139-14.patch, failed testing. View results

andriyun’s picture

Issue summary: View changes

Automated tests enabled

andriyun’s picture

1.

+++ b/tests/src/Traits/WebformMigrateAssertionsTrait.php
@@ -0,0 +1,845 @@
+    '#type': time

Type for time werbform element should be `webform_time`

2. Missing '#step' attribute
it's present in webform source `"minuteincrements";s:1`

andriyun’s picture

Adjusted assert

matroskeen’s picture

Status: Needs work » Needs review
StatusFileSize
new875.54 KB

For some reason, it doesn't fetch external dependencies with the merge request flow. Re-uploading the MR content as a patch.

huzooka’s picture

I miss the interdiff, but 🥳!

huzooka’s picture

StatusFileSize
new855.48 KB

I'm using the files in this patch/mr for doing some integration testing.

This is a diff which is identical to #19, but makes anyone able to apply it on top of the distributed release of Webform Migrate.

  • andr1yun committed adc1900 on 8.x-1.x authored by huzooka
    Issue #3172139 by huzooka, Matroskeen, andr1yun: Enable project testing...
andriyun’s picture

Status: Needs review » Fixed

I've added commit with changes in #19
The rest of work moved out to followup issue #3206977: Drupal 6 - Add kernel tests, source database, files

Thanks

andriyun’s picture

Status: Fixed » Needs review

@huzooka
I’ve managed to get tests passed when they run by Drupal CI from merge request.

There were missing some dependencies in composer.json
And default values where treated strange. So I changed them to custom values.

Please review changes in MR7 https://git.drupalcode.org/project/webform_migrate/-/merge_requests/7/di...

matroskeen’s picture

@andr1yun asked me to take a look, so I added my thoughts to the merge request.
It seems like a nice workaround, but it looks like a bug in the test runner that would be great to fix. I asked in #drupal-infrastructure Slack channel to verify.

huzooka’s picture

You can also execute the migrations with Migrate Drupal UI, so afaik Migrate Tools must not be a dependency.

matroskeen’s picture

It was confirmed in #drupal-infrastucture that dependencies should be specified in composer.json to work properly with merge requests, so we're going into the right direction.

See: https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or...

Liam Morland made their first commit to this issue’s fork.

jienckebd’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
jienckebd’s picture

It seems that the kernel tests are failing because of schema changes in Webform 6.

The attached patch helps these tests pass.