From cb26ba0cfcfb38b839e7f01d6043a106ed57a63f Mon Sep 17 00:00:00 2001 From: Zach Edmonds Date: Thu, 19 Dec 2024 11:23:41 -0500 Subject: [PATCH] update cypress test for datastore form to include new field --- cypress/integration/09_admin_links.spec.js | 1 + modules/datastore/src/Form/DatastoreSettingsForm.php | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cypress/integration/09_admin_links.spec.js b/cypress/integration/09_admin_links.spec.js index e73f3272e1..963312342b 100755 --- a/cypress/integration/09_admin_links.spec.js +++ b/cypress/integration/09_admin_links.spec.js @@ -41,6 +41,7 @@ context('Administration pages', () => { }) cy.visit(baseurl + "/admin/dkan/datastore") cy.get('label[for="edit-rows-limit"]').should('have.text', 'Rows limit') + cy.get('label[for="edit-response-stream-max-age"]').should('have.text', 'Response Stream Max-Age') }) it('Admin can access the Datastore import status dashboard.', () => { diff --git a/modules/datastore/src/Form/DatastoreSettingsForm.php b/modules/datastore/src/Form/DatastoreSettingsForm.php index 9ce89acae3..75b08e7bec 100644 --- a/modules/datastore/src/Form/DatastoreSettingsForm.php +++ b/modules/datastore/src/Form/DatastoreSettingsForm.php @@ -65,15 +65,15 @@ public function buildForm(array $form, FormStateInterface $form_state) { '#min' => 1, '#title' => $this->t('Rows limit'), '#default_value' => $this->config('datastore.settings')->get('rows_limit'), - '#description' => $this->t('Maximum number of rows the datastore endpoints can return - in a single request. Caution: setting too high can lead to timeouts or memory issues. + '#description' => $this->t('Maximum number of rows the datastore endpoints can return + in a single request. Caution: setting too high can lead to timeouts or memory issues. Default 500; values above 20,000 not recommended.'), ]; $form['response_stream_max_age'] = [ '#type' => 'number', '#title' => $this->t('Response Stream Max-Age'), - '#default_value' => $this->config('datastore.settings')->get('response_stream_max_age') ?: QueryController::DEFAULT_RESPONSE_STREAM_MAX_AGE, + '#default_value' => $this->config('datastore.settings')->get('response_stream_max_age'), '#min' => 0, '#description' => $this->t('Set the cache max-age for streaming CSV responses, in seconds. Default: 3600 (1 hour).'), ]; @@ -81,7 +81,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { $form['triggering_properties'] = [ '#type' => 'checkboxes', '#title' => $this->t('Datastore triggering properties'), - '#description' => $this->t('Metadata properties whose change will trigger a re-import of + '#description' => $this->t('Metadata properties whose change will trigger a re-import of an associated resource to the datastore.'), '#options' => $this->schemaHelper->retrieveSchemaProperties('dataset'), '#default_value' => $this->config('datastore.settings')->get('triggering_properties'),