From c6dcef34a87c58b8573938ac11ad2a626c42befa Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Mon, 9 Dec 2024 15:26:25 +0000 Subject: [PATCH] Revert "fixing tests" This reverts commit 0144c9b3da6ea2f25efb1ea5fd4a2faeedb66b32. --- .../app/features/context/UI/ViewerContext.php | 31 +++++++------------ .../full-lpa-display-combined-lpa.html.twig | 12 +++---- .../partials/full-lpa-display.html.twig | 12 +++---- 3 files changed, 19 insertions(+), 36 deletions(-) diff --git a/service-front/app/features/context/UI/ViewerContext.php b/service-front/app/features/context/UI/ViewerContext.php index 793f1bb3e7..982ddf5b8b 100644 --- a/service-front/app/features/context/UI/ViewerContext.php +++ b/service-front/app/features/context/UI/ViewerContext.php @@ -357,13 +357,11 @@ public function iChooseToDownloadADocumentVersionOfTheLPA() 'expires' => (new DateTime('+30 days'))->format('c'), ]; - if (($this->base->container->get(FeatureEnabled::class))('instructions_and_preferences')) { - $data['iap'] = [ - 'uId' => (int) $this->lpaData['uId'], - 'status' => $this->imageCollectionStatus, - 'signedUrls' => [], - ]; - } + $data['iap'] = [ + 'uId' => (int) $this->lpaData['uId'], + 'status' => $this->imageCollectionStatus, + 'signedUrls' => [], + ]; // API call for lpa full fetch $this->apiFixtures->append( @@ -532,7 +530,6 @@ public function iEnterAnOrganisationNameAndConfirmTheLPAIsCorrect() if ( ($data['lpa']['applicationHasGuidance'] ?? false) || ($data['lpa']['applicationHasRestrictions'] ?? false) - && ($this->base->container->get(FeatureEnabled::class))('instructions_and_preferences') ) { $data['iap'] = [ 'uId' => (int) $this->lpaData['uId'], @@ -783,10 +780,8 @@ public function iGiveAValidLPAShareCodeOf(string $code, string $storedCode) public function iCanClearlySeeTheLPAHasInstructionsAndPreferences() { $this->ui->assertElementContainsText('div.govuk-panel', 'This LPA has preferences and instructions'); - if (($this->base->container->get(FeatureEnabled::class))('instructions_and_preferences')) { - $this->ui->assertElementOnPage('iap-instructions img.opg-ip__image'); - $this->ui->assertElementOnPage('iap-preferences img.opg-ip__image'); - } + $this->ui->assertElementOnPage('iap-instructions img.opg-ip__image'); + $this->ui->assertElementOnPage('iap-preferences img.opg-ip__image'); } /** @@ -795,10 +790,8 @@ public function iCanClearlySeeTheLPAHasInstructionsAndPreferences() public function iCanClearlySeeTheLPAHasPreferences() { $this->ui->assertElementContainsText('div.govuk-panel', 'This LPA has preferences'); - if (($this->base->container->get(FeatureEnabled::class))('instructions_and_preferences')) { - $this->ui->assertElementNotOnPage('iap-instructions img.opg-ip__image'); - $this->ui->assertElementOnPage('iap-preferences img.opg-ip__image'); - } + $this->ui->assertElementNotOnPage('iap-instructions img.opg-ip__image'); + $this->ui->assertElementOnPage('iap-preferences img.opg-ip__image'); } /** @@ -807,10 +800,8 @@ public function iCanClearlySeeTheLPAHasPreferences() public function iCanClearlySeeTheLPAHasInstructions() { $this->ui->assertElementContainsText('div.govuk-panel', 'This LPA has instructions'); - if (($this->base->container->get(FeatureEnabled::class))('instructions_and_preferences')) { - $this->ui->assertElementOnPage('iap-instructions img.opg-ip__image'); - $this->ui->assertElementNotOnPage('iap-preferences img.opg-ip__image'); - } + $this->ui->assertElementOnPage('iap-instructions img.opg-ip__image'); + $this->ui->assertElementNotOnPage('iap-preferences img.opg-ip__image'); } /** diff --git a/service-front/app/src/Common/templates/partials/full-lpa-display-combined-lpa.html.twig b/service-front/app/src/Common/templates/partials/full-lpa-display-combined-lpa.html.twig index 7f8c0fb5ae..3ca6ce1808 100644 --- a/service-front/app/src/Common/templates/partials/full-lpa-display-combined-lpa.html.twig +++ b/service-front/app/src/Common/templates/partials/full-lpa-display-combined-lpa.html.twig @@ -108,14 +108,12 @@ {% trans %}LPA details{% endtrans %} - {% if feature_enabled("instructions_and_preferences") %} - {% include '@partials/lpa-summary-details/iap-images-components.html.twig' %} - - {% endif %} + {% include '@partials/lpa-summary-details/iap-images-components.html.twig' %} + {% include '@partials/lpa-summary-details/lpa-details-combined-lpa.html.twig' %} - {% if feature_enabled("instructions_and_preferences") and iap_images is defined %} + {% if iap_images is defined %} {% if iap_images.status is not constant('\\Common\\Entity\\InstructionsAndPreferences\\ImagesStatus::COLLECTION_ERROR') %}
{% trans %}If any scanned images are not readable, ask the person who gave you the access @@ -124,9 +122,7 @@ {% endif %} {% endif %} - {% if feature_enabled("instructions_and_preferences") %} - - {% endif %} +
diff --git a/service-front/app/src/Common/templates/partials/full-lpa-display.html.twig b/service-front/app/src/Common/templates/partials/full-lpa-display.html.twig index 58f9ea3cc8..84078134ae 100644 --- a/service-front/app/src/Common/templates/partials/full-lpa-display.html.twig +++ b/service-front/app/src/Common/templates/partials/full-lpa-display.html.twig @@ -108,14 +108,12 @@ {% trans %}LPA details{% endtrans %} - {% if feature_enabled("instructions_and_preferences") %} - {% include '@partials/lpa-summary-details/iap-images-components.html.twig' %} - - {% endif %} + {% include '@partials/lpa-summary-details/iap-images-components.html.twig' %} + {% include '@partials/lpa-summary-details/lpa-details.html.twig' %} - {% if feature_enabled("instructions_and_preferences") and iap_images is defined %} + {% if iap_images is defined %} {% if iap_images.status is not constant('\\Common\\Entity\\InstructionsAndPreferences\\ImagesStatus::COLLECTION_ERROR') %}
{% trans %}If any scanned images are not readable, ask the person who gave you the access @@ -124,9 +122,7 @@ {% endif %} {% endif %} - {% if feature_enabled("instructions_and_preferences") %} - - {% endif %} +