diff --git a/core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php b/core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php index c6ad707fb78ebdf28bba3b98cec608cd7f51c225..56eaa5fbd5044a5793d22e7cbab50e9569185ee9 100644 --- a/core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php +++ b/core/modules/workspaces/tests/src/Functional/PathWorkspacesTest.php @@ -198,6 +198,9 @@ public function testPathAliasesWithTranslation(): void { $this->assertAccessiblePaths([$default_path, $translation_path]); + // Verify the default alias is available in the live workspace. + $this->assertAccessiblePaths([$default_path]); + $this->switchToWorkspace($stage); $this->assertAccessiblePaths([$default_path, $translation_path]); @@ -311,6 +314,20 @@ public function testPathAliasesWithTranslation(): void { $stage->publish(); $this->assertAccessiblePaths([$default_path, $new_stage_translation_path]); $this->assertNotAccessiblePaths([$stage_translation_path]); + + // Switch back to Stage. + $this->switchToWorkspace($stage); + + // Edit the path alias to set its language to "Not specified". + $alias_edit_path = "admin/config/search/path/edit/{$default_node->id()}"; + $this->drupalGet($alias_edit_path); + $edit = [ + 'langcode[0][value]' => 'und', // Set the alias language to "Not specified". + ]; + $this->submitForm($edit, 'Save'); + + // Verify the path alias is still available in the Stage workspace. + $this->assertAccessiblePaths([$default_path]); } /**