Skip to content

Commit

Permalink
Revert "Add 'hidden' state to dkan_publishing workflow (#3718)" (#3741)
Browse files Browse the repository at this point in the history
This reverts commit 7c0fe29.
  • Loading branch information
dafeder authored Jan 21, 2022
1 parent 28723a6 commit df9ed61
Show file tree
Hide file tree
Showing 28 changed files with 370 additions and 810 deletions.
302 changes: 236 additions & 66 deletions cypress/integration/01_metastore.spec.js

Large diffs are not rendered by default.

90 changes: 0 additions & 90 deletions cypress/integration/10_hidden_workflow_state.spec.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// login as a given drupal user
Cypress.Commands.add('drupalLogin', (user, password) => {
/**
* Drupal Collection
*/
Cypress.Commands.add("drupalLogin", (user, password) => {
return cy.request({
method: 'POST',
url: '/user/login',
Expand All @@ -12,13 +14,11 @@ Cypress.Commands.add('drupalLogin', (user, password) => {
});
});

// logout of drupal
Cypress.Commands.add('drupalLogout', () => {
return cy.request('/user/logout');
});

// Run the supplied drush command
Cypress.Commands.add('drupalDrushCommand', (command) => {
Cypress.Commands.add("drupalDrushCommand", (command) => {
var cmd = Cypress.env('drupalDrushCmdLine');

if (cmd == null) {
Expand Down
186 changes: 0 additions & 186 deletions cypress/support/helpers/dkan.js

This file was deleted.

2 changes: 1 addition & 1 deletion cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands/drupal'
import './commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')
2 changes: 1 addition & 1 deletion modules/datastore/src/Service/ResourcePurger.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ private function getRevisionData(string $vid) : array {
private function getResources(NodeInterface $dataset) : array {
$resources = [];
$metadata = json_decode($dataset->get('field_json_metadata')->getString());
$distributions = $metadata->{'%Ref:distribution'} ?? [];
$distributions = $metadata->{'%Ref:distribution'};

foreach ($distributions as $distribution) {
// Retrieve and validate the resource for this distribution before adding
Expand Down
6 changes: 5 additions & 1 deletion modules/datastore/tests/src/Unit/Controller/MockStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ public function retrieveByHash($hash, $schemaId) {
return [];
}

public function retrieve(string $uuid, bool $published = FALSE) : ?string {
public function retrievePublished(string $uuid) : ?string {
throw new MissingObjectException("Error retrieving published dataset: distribution {$uuid} not found.");
}

public function retrieve(string $uuid) : ?string {
throw new MissingObjectException("Error retrieving published dataset: distribution {$uuid} not found.");
}

Expand Down
Loading

0 comments on commit df9ed61

Please sign in to comment.