Skip to content

Commit

Permalink
update cypress test for datastore form to include new field
Browse files Browse the repository at this point in the history
  • Loading branch information
zedmonds96 committed Dec 30, 2024
1 parent 1c5111c commit cb26ba0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions cypress/integration/09_admin_links.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.', () => {
Expand Down
8 changes: 4 additions & 4 deletions modules/datastore/src/Form/DatastoreSettingsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,23 @@ 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).'),
];

$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'),
Expand Down

0 comments on commit cb26ba0

Please sign in to comment.