Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration of 1.13.6 into 7.x-1.x #2041

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ahoy/.scripts/.ht.router.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @file
* Routing-script for the built-in PHP web server.
Expand Down
2 changes: 1 addition & 1 deletion .ahoy/tests/behat-parse-params.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require "minitest/autorun"
require "./.scripts/behat-parse-params.rb"
require "./dkan/.ahoy/.scripts/behat-parse-params.rb"

class TestBehatParseParams < MiniTest::Unit::TestCase

Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
- #1938 DevOps: Allow behat tests to be skipped in circle.
- #1842 Add help text to explain the pager on data previews.

7.x-1.13.6 2017-07-28
---------------------
- #2036 Add file_resup to the list of up to date projects.
- #2035 Change the 'Datasets' field on the Resource form to use autocomplete.
- #2034 Add language selectors to the 'chosen_jquery_selector' configuration.
- #2020 Module upgrades: fieldable_panels_panes, media, and search_api.
- #2018 Additional test/devops improvements needed for deployment. See #2012, #2014, #2015 and #2016 for specifics.
- #2025 Add configurable arguments via Behat Contexts.
- #2021 Add unique tags to more test scenarios.

7.x-1.13.5 2017-07-14
---------------------
- #2003 Fix dkan_bueditor_markdown_install(), which was using a variable before it was initialized.
Expand Down
9 changes: 9 additions & 0 deletions dkan.install
Original file line number Diff line number Diff line change
Expand Up @@ -378,3 +378,12 @@ function dkan_update_7021() {
->condition('eid', $eid)
->execute();
}

/**
* Update chosen_jquery_selector to include language selectors.
*/
function dkan_update_7022() {
// REF #1936, #1890.
variable_set('chosen_jquery_selector',
'.page-node select:not([class*="delta-order"], [name*="workbench_moderation"], [class*="filter-list"], [id*="delimiter"],[name*="sort_by"],[name*="sort_order"], [id*="lines-terminated-by"], [id*="lang-dropdown-select-language"])');
}
16 changes: 16 additions & 0 deletions docs/releases/notes/1.13.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# DKAN 1.13.6

This is a "patch" release of DKAN, containing bug fixes and minor
updates, but adding no new functionality.

## Improvements in this release

- Add file_resup to the list of up to date projects ([#2036](https://github.com/NuCivic/dkan/pull/2036))
- Change the 'Datasets' field on the Resource form to use autocomplete ([#2035](https://github.com/NuCivic/dkan/pull/2035))
- Include language selectors in the 'chosen_jquery_selector' config ([#2034](https://github.com/NuCivic/dkan/pull/2034))
- Module upgrades: fieldable_panels_panes, media, and search_api ([#2020](https://github.com/NuCivic/dkan/pull/2020))

**Testing Improvements**
- Additional test/devops improvements needed for deployment. See ([#2012](https://github.com/NuCivic/dkan/pull/2012), [#2014](https://github.com/NuCivic/dkan/pull/2014), [#2015](https://github.com/NuCivic/dkan/pull/2015), [#2016](https://github.com/NuCivic/dkan/pull/2016), [#2018](https://github.com/NuCivic/dkan/pull/2018)) for specifics.
- Add configurable arguments via Behat Contexts. ([#2025](https://github.com/NuCivic/dkan/pull/2025))
- Add unique tags to more test scenarios ([#2021](https://github.com/NuCivic/dkan/pull/2021))
4 changes: 3 additions & 1 deletion docs/releases/notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ Release notes here will be identical to the releases kept in the `Github reposit
.. toctree::
:maxdepth: 1

1.13.4 (Future release) <1.13.4>
1.13.6 <1.13.6>
1.13.5 <1.13.5>
1.13.4 <1.13.4>
1.13.3 <1.13.3>
1.13.2 <1.13.2>
1.13.1 <1.13.1>
Expand Down
6 changes: 3 additions & 3 deletions drupal-org.make
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ projects:
2826182: https://www.drupal.org/files/issues/fieldable_panels_panes-title-shown-when-set-to-hidden-2826182-3.patch
2826205: https://www.drupal.org/files/issues/fieldable_panels_panes-n2826205-32.patch
file_entity:
version: 2.2
version: 2.3
file_resup:
download:
type: git
Expand Down Expand Up @@ -205,7 +205,7 @@ projects:
patch:
2045225: http://drupal.org/files/remove-dsm-from-hook-install-2045225-1.patch
media:
version: 2.8
version: 2.9
patch:
2272567: https://www.drupal.org/files/issues/media_dialog_appears_2272567-32.patch
media_youtube:
Expand Down Expand Up @@ -313,7 +313,7 @@ projects:
version: '1.2'
revision: 08b02458694d186f8ab3bd0b24fbc738f9271108
search_api:
version: '1.21'
version: '1.22'
search_api_db:
version: '1.6'
select_or_other:
Expand Down
16 changes: 3 additions & 13 deletions modules/dkan/dkan_dataset/dkan_dataset.forms.inc
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ function dkan_dataset_form_alter(&$form, &$form_state, $form_id) {

$form['#validate'][] = 'dkan_dataset_dataset_node_form_validate';
}

if ($form_id == 'resource_node_form') {
drupal_add_library('system', 'jquery.bbq');
$form['#attached']['css'][] = drupal_get_path('module', 'dkan_dataset') . '/css/dkan_dataset.css';
Expand All @@ -313,11 +314,6 @@ function dkan_dataset_form_alter(&$form, &$form_state, $form_id) {
// Get langcode for field_dataset_ref.
$field_dataset_ref_langcode = dkan_dataset_form_field_language($form, 'field_dataset_ref');
$form['field_dataset_ref'][$field_dataset_ref_langcode]['#description'] = t('Dataset that this resource is attached to.');
$dataset_options = $form['field_dataset_ref'][$field_dataset_ref_langcode]['#options'];
$fix_apostrophes = function ($value) {
return html_entity_decode($value, ENT_QUOTES, "UTF-8");
};
$form['field_dataset_ref'][$field_dataset_ref_langcode]['#options'] = array_map($fix_apostrophes, $dataset_options);

// Get langcode for field_upload.
$field_upload_langcode = dkan_dataset_form_field_language($form, 'field_upload');
Expand Down Expand Up @@ -352,18 +348,13 @@ function dkan_dataset_form_alter(&$form, &$form_state, $form_id) {

if ($query = drupal_get_query_parameters()) {
if (isset($query['dataset'])) {
$form['field_dataset_ref'][$field_dataset_ref_langcode]['#default_value'] = $query['dataset'];
$selected_dataset = node_load($query['dataset']);
$form['field_dataset_ref'][$field_dataset_ref_langcode][0]['target_id']['#default_value'] = $selected_dataset->title . ' (' . $query['dataset'] . ')';
$form['prefix']['#type'] = 'item';
$form['prefix']['#weight'] = '-20';
$form['prefix']['#markup'] = dkan_form_create_stages('resource-create', $query['dataset']);
}
}
elseif (isset($form['#node']->field_dataset_ref['nid'])) {
$form['field_dataset_ref'][$field_dataset_ref_langcode]['#default_value'] = $form['#node']->field_dataset_ref['nid'];
$form['prefix']['#type'] = 'item';
$form['prefix']['#weight'] = '-20';
$form['prefix']['#markup'] = dkan_form_create_stages('resource-create', $form['#node']->field_dataset_ref['nid']);
}
$form['#validate'][] = 'dkan_dataset_resource_node_form_validate';
// This saves us on the ajax reloading.
if (isset($query['dataset'])) {
Expand Down Expand Up @@ -633,7 +624,6 @@ function dkan_dataset_resource_node_form_validate($form, &$form_state) {
// Check for geojson.
if ($type == 'json' && isset($file)) {
$response = drupal_http_request($file->uri, array('timeout' => 5));
// dpm($response);
if ($response->code == '200') {
$data = $response->data;
$decoded = drupal_json_decode($data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1519,11 +1519,14 @@ uk-ogl|UK Open Government Licence (OGL)',
),
'widget' => array(
'active' => 1,
'module' => 'options',
'module' => 'entityreference',
'settings' => array(
'apply_chosen' => 0,
'match_operator' => 'CONTAINS',
'path' => '',
'size' => 60,
),
'type' => 'options_select',
'type' => 'entityreference_autocomplete',
'weight' => 8,
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function dkan_dataset_content_types_strongarm() {
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'chosen_jquery_selector';
$strongarm->value = '.page-node select:not([class*="delta-order"], [name*="workbench_moderation"], [class*="filter-list"], [id*="delimiter"],[name*="sort_by"],[name*="sort_order"], [id*="lines-terminated-by"])';
$strongarm->value = '.page-node select:not([class*="delta-order"], [name*="workbench_moderation"], [class*="filter-list"], [id*="delimiter"],[name*="sort_by"],[name*="sort_order"], [id*="lines-terminated-by"], [id*="lang-dropdown-select-language"])';
$export['chosen_jquery_selector'] = $strongarm;

$strongarm = new stdClass();
Expand Down
1 change: 1 addition & 0 deletions modules/dkan/dkan_sitewide/dkan_sitewide.module
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ function dkan_sitewide_update_status_alter(&$projects) {
'beautytips',
'feeds_field_fetcher',
'multistep',
'file_resup'
);
foreach ($up_to_date_projects as $up_to_date_project) {

Expand Down
63 changes: 28 additions & 35 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +17,33 @@ Assuming you have a working DKAN installation you wish to test on:
Your tests should run from the VM and use your host machine as a Selenium server, meaning any Selenium tests will run in an instance of Chrome on your machine.

### Behat Tags
- **@add_ODFE** Enables ODFE
- **@ahoyRunMe** label only
- **@api** Enables the Drupal API Driver
- **@customizable** Exclude scenario on client sites when testing customizable functionality
- **@datastore** Drops the table after testing
- **@deleteTempUsers** Delete any tempusers that were created outside of 'Given users'
- **@disablecaptcha** Disables captcha config if it is enabled, then restores config after the test
- **@dkanBug** label only
- **@enableFastImport** Enables fast import
- **@enableDKAN_Workflow** Enables dkan_workflow
- **@fixme** label only
- **@globalUser** Populates the global user with the current user
- **@harvest_rollback** Removes harvested content that was created by a test
- **@javascript** switches the current Mink session to Selenium2
- **@mail** Setup the testing mail system, then restore original mail system
- **@no-main-menu** used to skip tests that requires a link in the main menu
- **@noworkflow** label only
- **@ok** label only
- **@pod_json_valid** label only
- **@pod_json_odfe** label only
- **@remove_ODFE** Disables ODFE
- **@testBug** label only
- **@timezone** Sets the timezone for tests and restores the timezone afterwards.
- **@Topics** label only

**Unique tag per scenario pattern**

To allow customized sites to skip specific tests we are adding a unique tag to every scenario. The pattern is the feature name followed by a two digit numerical value. So the pod.feature scenarios are tagged like this: @pod_01, @pod_02, @pod_03, etc.

To learn more about adding custom tests, check out [DKAN Starter - Add a custom behat test](http://dkan-starter.readthedocs.io/en/latest/common_tasks/add-custom-behat-test.html)

### DKANExtension
To learn more about the feature contexts that exist for DKAN, check out [DKANExtension](dkanextension/README.md)

- **@add_ODFE** Enables ODFE
- **@ahoyRunMe** label only
- **@api** Enables the Drupal API Driver
- **@customizable** Exclude scenario on client sites when testing customizable functionality
- **@datastore** Drops the table after testing
- **@deleteTempUsers** Delete any tempusers that were created outside of 'Given users'
- **@disablecaptcha** Disables captcha config if it is enabled, then restores config after the test
- **@dkanBug** label only
- **@enableFastImport** Enables fast import
- **@enableDKAN_Workflow** Enables dkan_workflow
- **@fixme** label only
- **@globalUser** Populates the global user with the current user
- **@javascript** switches the current Mink session to Selenium2
- **@mail** Setup the testing mail system, then restore original mail system
- **@no-main-menu** used to skip tests that requires a link in the main menu
- **@noworkflow** label only
- **@ok** label only
- **@pod_json_valid** label only
- **@pod_json_odfe** label only
- **@remove_ODFE** Disables ODFE
- **@testBug** label only
- **@timezone** Sets the timezone for tests and restores the timezone afterwards.
- **@Topics** label only

**Unique tag per scenario pattern**

To allow customized sites to skip specific tests we are adding a unique tag to every scenario. The pattern is the feature name followed by a two digit numerical value. So the pod.feature scenarios are tagged like this: @pod_01, @pod_02, @pod_03, etc.

## PHPUnit tests

Expand Down Expand Up @@ -90,4 +83,4 @@ bin/phpunit --configuration phpunit --filter testMethod
```

For additional options or more detailed information on how to use PHPUnit please check the [PHPUnit Documentation]( https://phpunit.de/manual/current/en/textui.html)


Loading