From 5f7617c36b5329bf0aa6bfed3e0d6bd2554ba724 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 4 Dec 2023 13:22:42 +0000 Subject: [PATCH 1/4] update service content types form display --- ...ntity_form_display.node.localgov_services_landing.default.yml | 1 + ...e.entity_form_display.node.localgov_services_page.default.yml | 1 + ...ty_form_display.node.localgov_services_sublanding.default.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/modules/localgov_services_landing/config/install/core.entity_form_display.node.localgov_services_landing.default.yml b/modules/localgov_services_landing/config/install/core.entity_form_display.node.localgov_services_landing.default.yml index 3344d3a..2f9701e 100644 --- a/modules/localgov_services_landing/config/install/core.entity_form_display.node.localgov_services_landing.default.yml +++ b/modules/localgov_services_landing/config/install/core.entity_form_display.node.localgov_services_landing.default.yml @@ -88,6 +88,7 @@ third_party_settings: classes: '' id: '' direction: vertical + width_breakpoint: 1138 group_social_media: children: - localgov_twitter diff --git a/modules/localgov_services_page/config/install/core.entity_form_display.node.localgov_services_page.default.yml b/modules/localgov_services_page/config/install/core.entity_form_display.node.localgov_services_page.default.yml index 23cb84f..3d48db7 100644 --- a/modules/localgov_services_page/config/install/core.entity_form_display.node.localgov_services_page.default.yml +++ b/modules/localgov_services_page/config/install/core.entity_form_display.node.localgov_services_page.default.yml @@ -84,6 +84,7 @@ third_party_settings: classes: '' id: '' direction: vertical + width_breakpoint: 1138 id: node.localgov_services_page.default targetEntityType: node bundle: localgov_services_page diff --git a/modules/localgov_services_sublanding/config/install/core.entity_form_display.node.localgov_services_sublanding.default.yml b/modules/localgov_services_sublanding/config/install/core.entity_form_display.node.localgov_services_sublanding.default.yml index 10f9dfb..f80edb8 100644 --- a/modules/localgov_services_sublanding/config/install/core.entity_form_display.node.localgov_services_sublanding.default.yml +++ b/modules/localgov_services_sublanding/config/install/core.entity_form_display.node.localgov_services_sublanding.default.yml @@ -27,6 +27,7 @@ third_party_settings: classes: '' id: '' direction: vertical + width_breakpoint: 1138 group_description: children: - localgov_services_parent From ba4d2a678b6d4b4ed2432c98e0af0314c0738389 Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 5 Dec 2023 16:44:57 +0000 Subject: [PATCH 2/4] fixed tests to click element rather than anchor --- .../EntityReferenceServicesAutocompleteTest.php | 2 ++ .../src/FunctionalJavascript/LandingPageChildrenTest.php | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/localgov_services_navigation/tests/src/FunctionalJavascript/EntityReferenceServicesAutocompleteTest.php b/modules/localgov_services_navigation/tests/src/FunctionalJavascript/EntityReferenceServicesAutocompleteTest.php index a522fbe..aece7d3 100644 --- a/modules/localgov_services_navigation/tests/src/FunctionalJavascript/EntityReferenceServicesAutocompleteTest.php +++ b/modules/localgov_services_navigation/tests/src/FunctionalJavascript/EntityReferenceServicesAutocompleteTest.php @@ -88,6 +88,7 @@ public function testServicesEntityReferenceAutocompleteWidget() { $page = $this->getSession()->getPage(); $assert_session = $this->assertSession(); + $this->click('#edit-group-description'); $autocomplete_field = $assert_session->waitForElement('css', '[name="' . $field_name . '[0][target_id]"].ui-autocomplete-input'); $autocomplete_field->setValue('Page'); $this->getSession()->getDriver()->keyDown($autocomplete_field->getXpath(), ' '); @@ -102,6 +103,7 @@ public function testServicesEntityReferenceAutocompleteWidget() { $page = $this->getSession()->getPage(); $assert_session = $this->assertSession(); + $this->click('#edit-group-description'); $autocomplete_field = $assert_session->waitForElement('css', '[name="' . $field_name . '[0][target_id]"].ui-autocomplete-input'); $autocomplete_field->setValue('Page'); $this->getSession()->getDriver()->keyDown($autocomplete_field->getXpath(), ' '); diff --git a/modules/localgov_services_navigation/tests/src/FunctionalJavascript/LandingPageChildrenTest.php b/modules/localgov_services_navigation/tests/src/FunctionalJavascript/LandingPageChildrenTest.php index 818acdc..5669415 100644 --- a/modules/localgov_services_navigation/tests/src/FunctionalJavascript/LandingPageChildrenTest.php +++ b/modules/localgov_services_navigation/tests/src/FunctionalJavascript/LandingPageChildrenTest.php @@ -124,7 +124,8 @@ public function testServiceLandingPageLink() { $this->assertStringContainsString('child "> &one\' <"', $element->getHtml()); // Drag the child to a Tasks Link field. - $this->clickLink('Top tasks'); + $this->createScreenshot('public://landing_page_children.jpg'); + $this->click('#edit-group-common-tasks'); $drag = $page->find('css', '#localgov-child-drag-' . $child[1]->id()); $target = $page->find('css', '#edit-localgov-common-tasks-0-uri'); $drag->dragTo($target); @@ -204,7 +205,7 @@ public function testServiceLandingPageReference() { $assert_session->pageTextNotContains('status update listed on page elsewhere automatically'); // Drag the child to a Tasks Link field. - $this->clickLink('Child pages'); + $this->click('#edit-group-destinations'); $drag = $page->find('css', '#localgov-child-drag-' . $child[3]->id()); $target = $page->find('css', '#edit-localgov-destinations-0-target-id'); $drag->dragTo($target); From c075142fc5d1ddfbd80573f1181ab4383e8256be Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 5 Dec 2023 16:53:46 +0000 Subject: [PATCH 3/4] removed create screenshot --- .../tests/src/FunctionalJavascript/LandingPageChildrenTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/localgov_services_navigation/tests/src/FunctionalJavascript/LandingPageChildrenTest.php b/modules/localgov_services_navigation/tests/src/FunctionalJavascript/LandingPageChildrenTest.php index 5669415..1b104e8 100644 --- a/modules/localgov_services_navigation/tests/src/FunctionalJavascript/LandingPageChildrenTest.php +++ b/modules/localgov_services_navigation/tests/src/FunctionalJavascript/LandingPageChildrenTest.php @@ -124,7 +124,6 @@ public function testServiceLandingPageLink() { $this->assertStringContainsString('child "> &one\' <"', $element->getHtml()); // Drag the child to a Tasks Link field. - $this->createScreenshot('public://landing_page_children.jpg'); $this->click('#edit-group-common-tasks'); $drag = $page->find('css', '#localgov-child-drag-' . $child[1]->id()); $target = $page->find('css', '#edit-localgov-common-tasks-0-uri'); From f0382decacfe9d822aeec1fa790825cd409b9e10 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 8 Dec 2023 11:38:26 +0000 Subject: [PATCH 4/4] adding sleep to wait for drag --- .../tests/src/FunctionalJavascript/LandingPageChildrenTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/localgov_services_navigation/tests/src/FunctionalJavascript/LandingPageChildrenTest.php b/modules/localgov_services_navigation/tests/src/FunctionalJavascript/LandingPageChildrenTest.php index 1b104e8..b9d4f02 100644 --- a/modules/localgov_services_navigation/tests/src/FunctionalJavascript/LandingPageChildrenTest.php +++ b/modules/localgov_services_navigation/tests/src/FunctionalJavascript/LandingPageChildrenTest.php @@ -129,6 +129,7 @@ public function testServiceLandingPageLink() { $target = $page->find('css', '#edit-localgov-common-tasks-0-uri'); $drag->dragTo($target); // Check it got populated. + sleep(2); $assert_session->fieldValueEquals('edit-localgov-common-tasks-0-uri', $child[1]->toUrl()->toString()); $assert_session->fieldValueEquals('edit-localgov-common-tasks-0-title', 'child "> &one\' <"');