Skip to content

Commit 65cfacc

Browse files
andres-blancoAndrés Blanco
and
Andrés Blanco
authored
DOTCON-64: fix migration flow when selecting an existing site (#103645)
* DOTCON-64: fix migration flow when selecting an existing site in the site picker * update tests --------- Co-authored-by: Andrés Blanco <email@gmail.com>
1 parent 58bca12 commit 65cfacc

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

client/landing/stepper/declarative-flow/flows/site-migration-flow/site-migration-flow.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ const siteMigration: FlowV2< typeof initialize > = {
199199
);
200200
}
201201

202-
if ( platformQueryParam !== 'unknown' && platformQueryParam !== 'wordpress' ) {
202+
if ( platformQueryParam !== 'wordpress' ) {
203203
if ( isPlatformImportable( platformQueryParam ) && fromQueryParam ) {
204204
return exitFlow(
205205
getFullImporterUrl( platformQueryParam, siteSlug, fromQueryParam )

client/landing/stepper/declarative-flow/flows/site-migration-flow/test/site-migration-flow.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,8 @@ describe( 'Site Migration Flow', () => {
610610
} );
611611
} );
612612

613-
it( 'redirects to IMPORT_OR_MIGRATE when a site is selected and the platform is not identified', () => {
614-
const destination = runNavigation( {
613+
it( 'redirects to IMPORT_LIST when a site is selected and the platform is not identified', () => {
614+
runNavigation( {
615615
from: STEPS.PICK_SITE,
616616
dependencies: {
617617
action: 'select-site',
@@ -622,11 +622,13 @@ describe( 'Site Migration Flow', () => {
622622
},
623623
} );
624624

625-
expect( destination ).toMatchDestination( {
626-
step: STEPS.SITE_MIGRATION_IMPORT_OR_MIGRATE,
625+
expect( window.location.assign ).toMatchURL( {
626+
path: '/setup/site-setup/importList',
627627
query: {
628-
siteSlug: 'example.wordpress.com',
628+
backToFlow: '/site-migration/sitePicker',
629+
sessionId: 123,
629630
siteId: 123,
631+
siteSlug: 'example.wordpress.com',
630632
},
631633
} );
632634
} );

0 commit comments

Comments
 (0)