Skip to content

Commit

Permalink
OPENEUROPA-1781: Do not lock source language value to default language.
Browse files Browse the repository at this point in the history
  • Loading branch information
D Vargas committed Apr 17, 2019
1 parent 8eccf1f commit 1bcb0b4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 83 deletions.
4 changes: 0 additions & 4 deletions oe_multilingual.services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@ services:
oe_multilingual.content_language_switcher_provider:
class: Drupal\oe_multilingual\ContentLanguageSwitcherProvider
arguments: ['@language_manager', '@path.matcher', '@oe_multilingual.helper']
oe_multilingual.content_language_settings:
class: Drupal\oe_multilingual\MultilingualConfigOverride
tags:
- {name: config.factory.override, priority: 5}
57 changes: 0 additions & 57 deletions src/MultilingualConfigOverride.php

This file was deleted.

17 changes: 0 additions & 17 deletions tests/Behat/DrupalContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,23 +123,6 @@ public function iAmVisitingTheCreationPage(string $content_type_name): void {
$this->visitPath('node/add/' . $node_bundle);
}

/**
* Check that the field is not present.
*
* @param string $field
* Input id, name or label.
*
* @Then I should not see the field :field
*/
public function iShouldNotSeeTheField(string $field): void {
$element = $this->getSession()
->getPage()
->findField($field);
if ($element) {
throw new \RuntimeException("Field '{$field}' is present.");
}
}

/**
* Check that we have the correct language for initial translation.
*
Expand Down
9 changes: 4 additions & 5 deletions tests/features/content-default-language.feature
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
@api
Feature: Content initial language.
In order to create content
As a editor
I want to make sure that it is not possible for a content editor to create a node's initial version in any language
other than the site's default language
As a content editor
I can create an initial version of a node in any language

Scenario: As an editor, when I create a node I can not select the initial node language
Scenario: As an editor, when I create a node I can select the initial node language
Given I am logged in as a user with the "create oe_demo_translatable_page content" permission
And I visit the "Demo translatable page" creation page
Then I should not see the field "Language"
Then I should see "Language"

When I fill in "Title" with "Title Default value"
And I fill in "Body" with "Body Default value"
Expand Down

0 comments on commit 1bcb0b4

Please sign in to comment.