Skip to content
Snippets Groups Projects
Commit a4b92d6d authored by Nikolay Shapovalov's avatar Nikolay Shapovalov Committed by Merlin Axel Rutz
Browse files

Issue #3410055 by Nikolay Shapovalov, dcam, Anjali Mehta, dww: Adopt GitlabCi

parent 00f5aeec
Branches
Tags
1 merge request!96Issue #3410055: adopt gitlab ci
Pipeline #73116 canceled
################
# DrupalCI GitLabCI template
#
# Gitlab-ci.yml to replicate DrupalCI testing for Contrib
#
# With thanks to:
# * The GitLab Acceleration Initiative participants
# * DrupalSpoons
################
################
# Guidelines
#
# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification. It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained.
#
# However, you can modify this template if you have additional needs for your project.
################
################
# Includes
#
# Additional configuration can be provided through includes.
# One advantage of include files is that if they are updated upstream, the changes affect all pipelines using that include.
#
# Includes can be overridden by re-declaring anything provided in an include, here in gitlab-ci.yml
# https://docs.gitlab.com/ee/ci/yaml/includes.html#override-included-configuration-values
################
include:
################
# DrupalCI includes:
# As long as you include this, any future includes added by the Drupal Association will be accessible to your pipelines automatically.
# View these include files at https://git.drupalcode.org/project/gitlab_templates/
################
- project: $_GITLAB_TEMPLATES_REPO
ref: $_GITLAB_TEMPLATES_REF
file:
- '/includes/include.drupalci.main.yml'
- '/includes/include.drupalci.variables.yml'
- '/includes/include.drupalci.workflows.yml'
################
# Pipeline configuration variables
#
# These are the variables provided to the Run Pipeline form that a user may want to override.
#
# Docs at https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/includes/include.drupalci.variables.yml
################
variables:
SKIP_PHPSTAN: 1
# Configuration file for PHPStan static code checking, see https://phpstan.org.
includes:
- phar://phpstan.phar/conf/bleedingEdge.neon
parameters:
level: 1
paths:
- .
ignoreErrors:
# new static() is a best practice in Drupal, so we cannot fix that.
- "#^Unsafe usage of new static#"
...@@ -4,9 +4,6 @@ dependencies: ...@@ -4,9 +4,6 @@ dependencies:
config: config:
- field.storage.node.test_ref_nested1 - field.storage.node.test_ref_nested1
- node.type.ief_test_nested1 - node.type.ief_test_nested1
module:
- inline_entity_form_test
- entity_reference
enforced: enforced:
module: module:
- inline_entity_form_test - inline_entity_form_test
...@@ -14,18 +11,17 @@ id: node.ief_test_nested1.test_ref_nested1 ...@@ -14,18 +11,17 @@ id: node.ief_test_nested1.test_ref_nested1
field_name: test_ref_nested1 field_name: test_ref_nested1
entity_type: node entity_type: node
bundle: ief_test_nested1 bundle: ief_test_nested1
label: Multiple nodes label: 'Multiple nodes'
description: 'Reference multiple nodes.' description: 'Reference multiple nodes.'
required: true required: true
translatable: false translatable: false
default_value: { } default_value: { }
default_value_callback: '' default_value_callback: ''
settings: settings:
handler: default:node handler: 'default:node'
handler_settings: handler_settings:
target_bundles: target_bundles:
ief_reference_type: ief_test_nested2 ief_reference_type: ief_test_nested2
sort: sort:
field: _none field: _none
third_party_settings: { }
field_type: entity_reference field_type: entity_reference
...@@ -4,9 +4,6 @@ dependencies: ...@@ -4,9 +4,6 @@ dependencies:
config: config:
- field.storage.node.test_ref_nested2 - field.storage.node.test_ref_nested2
- node.type.ief_test_nested2 - node.type.ief_test_nested2
module:
- inline_entity_form_test
- entity_reference
enforced: enforced:
module: module:
- inline_entity_form_test - inline_entity_form_test
...@@ -14,18 +11,17 @@ id: node.ief_test_nested2.test_ref_nested2 ...@@ -14,18 +11,17 @@ id: node.ief_test_nested2.test_ref_nested2
field_name: test_ref_nested2 field_name: test_ref_nested2
entity_type: node entity_type: node
bundle: ief_test_nested2 bundle: ief_test_nested2
label: Multiple nodes label: 'Multiple nodes'
description: 'Reference multiple nodes.' description: 'Reference multiple nodes.'
required: true required: true
translatable: false translatable: false
default_value: { } default_value: { }
default_value_callback: '' default_value_callback: ''
settings: settings:
handler: default:node handler: 'default:node'
handler_settings: handler_settings:
target_bundles: target_bundles:
ief_reference_type: ief_test_nested3 ief_reference_type: ief_test_nested3
sort: sort:
field: _none field: _none
third_party_settings: { }
field_type: entity_reference field_type: entity_reference
...@@ -2,8 +2,6 @@ langcode: und ...@@ -2,8 +2,6 @@ langcode: und
status: true status: true
dependencies: dependencies:
module: module:
- inline_entity_form_test
- entity_reference
- node - node
enforced: enforced:
module: module:
...@@ -14,9 +12,10 @@ entity_type: node ...@@ -14,9 +12,10 @@ entity_type: node
type: entity_reference type: entity_reference
settings: settings:
target_type: node target_type: node
module: entity_reference module: core
locked: false locked: false
cardinality: -1 cardinality: -1
translatable: false translatable: false
indexes: { } indexes: { }
persist_with_no_fields: false persist_with_no_fields: false
custom_storage: false
...@@ -2,8 +2,6 @@ langcode: und ...@@ -2,8 +2,6 @@ langcode: und
status: true status: true
dependencies: dependencies:
module: module:
- inline_entity_form_test
- entity_reference
- node - node
enforced: enforced:
module: module:
...@@ -14,9 +12,10 @@ entity_type: node ...@@ -14,9 +12,10 @@ entity_type: node
type: entity_reference type: entity_reference
settings: settings:
target_type: node target_type: node
module: entity_reference module: core
locked: false locked: false
cardinality: -1 cardinality: -1
translatable: false translatable: false
indexes: { } indexes: { }
persist_with_no_fields: false persist_with_no_fields: false
custom_storage: false
...@@ -62,13 +62,13 @@ class ElementWebTest extends InlineEntityFormTestBase { ...@@ -62,13 +62,13 @@ class ElementWebTest extends InlineEntityFormTestBase {
$this->assertNoNodeByTitle($title); $this->assertNoNodeByTitle($title);
$assert_session->elementExists('xpath', $title_field_xpath)->setValue($title); $assert_session->elementExists('xpath', $title_field_xpath)->setValue($title);
$assert_session->elementExists('xpath', $positive_int_field_xpath)->setValue(-1); $assert_session->elementExists('xpath', $positive_int_field_xpath)->setValue('-1');
$page->pressButton('Save'); $page->pressButton('Save');
$assert_session->pageTextNotContains("Created Content $title"); $assert_session->pageTextNotContains("Created Content $title");
$this->assertNoNodeByTitle($title); $this->assertNoNodeByTitle($title);
$assert_session->elementExists('xpath', $positive_int_field_xpath)->setValue(11); $assert_session->elementExists('xpath', $positive_int_field_xpath)->setValue('11');
$page->pressButton('Save'); $page->pressButton('Save');
$assert_session->pageTextContains("Created Content $title"); $assert_session->pageTextContains("Created Content $title");
$this->assertNodeByTitle($title, 'ief_test_custom'); $this->assertNodeByTitle($title, 'ief_test_custom');
......
...@@ -76,7 +76,7 @@ class SimpleWidgetTest extends InlineEntityFormTestBase { ...@@ -76,7 +76,7 @@ class SimpleWidgetTest extends InlineEntityFormTestBase {
$assert_session->buttonNotExists('Add another item'); $assert_session->buttonNotExists('Add another item');
$assert_session->elementExists('xpath', $title_field_xpath)->setValue('Host node'); $assert_session->elementExists('xpath', $title_field_xpath)->setValue('Host node');
$assert_session->elementExists('xpath', $first_nested_title_field_xpath)->setValue('Nested single node'); $assert_session->elementExists('xpath', $first_nested_title_field_xpath)->setValue('Nested single node');
$assert_session->elementExists('xpath', $first_positive_int_field_xpath)->setValue(42); $assert_session->elementExists('xpath', $first_positive_int_field_xpath)->setValue('42');
$page->pressButton('Save'); $page->pressButton('Save');
$assert_session->pageTextContains('IEF simple single Host node has been created.'); $assert_session->pageTextContains('IEF simple single Host node has been created.');
$host_node = $this->getNodeByTitle('Host node'); $host_node = $this->getNodeByTitle('Host node');
...@@ -86,9 +86,9 @@ class SimpleWidgetTest extends InlineEntityFormTestBase { ...@@ -86,9 +86,9 @@ class SimpleWidgetTest extends InlineEntityFormTestBase {
$assert_session->buttonNotExists('Add another item'); $assert_session->buttonNotExists('Add another item');
$assert_session->elementExists('xpath', $title_field_xpath)->setValue('Host node 2'); $assert_session->elementExists('xpath', $title_field_xpath)->setValue('Host node 2');
$assert_session->elementExists('xpath', $first_nested_title_field_xpath)->setValue('Nested single node 2'); $assert_session->elementExists('xpath', $first_nested_title_field_xpath)->setValue('Nested single node 2');
$assert_session->elementExists('xpath', $first_positive_int_field_xpath)->setValue(42); $assert_session->elementExists('xpath', $first_positive_int_field_xpath)->setValue('42');
$assert_session->elementExists('xpath', $second_nested_title_field_xpath)->setValue('Nested single node 3'); $assert_session->elementExists('xpath', $second_nested_title_field_xpath)->setValue('Nested single node 3');
$assert_session->elementExists('xpath', $second_positive_int_field_xpath)->setValue(42); $assert_session->elementExists('xpath', $second_positive_int_field_xpath)->setValue('42');
$page->pressButton('Save'); $page->pressButton('Save');
$assert_session->pageTextContains('IEF simple single Host node 2 has been created.'); $assert_session->pageTextContains('IEF simple single Host node 2 has been created.');
$host_node = $this->getNodeByTitle('Host node 2'); $host_node = $this->getNodeByTitle('Host node 2');
...@@ -98,7 +98,7 @@ class SimpleWidgetTest extends InlineEntityFormTestBase { ...@@ -98,7 +98,7 @@ class SimpleWidgetTest extends InlineEntityFormTestBase {
// and an 'Add another item' button should appear. // and an 'Add another item' button should appear.
$assert_session->elementExists('xpath', $title_field_xpath)->setValue('Host node 3'); $assert_session->elementExists('xpath', $title_field_xpath)->setValue('Host node 3');
$assert_session->elementExists('xpath', $first_nested_title_field_xpath)->setValue('Nested single node 4'); $assert_session->elementExists('xpath', $first_nested_title_field_xpath)->setValue('Nested single node 4');
$assert_session->elementExists('xpath', $first_positive_int_field_xpath)->setValue(42); $assert_session->elementExists('xpath', $first_positive_int_field_xpath)->setValue('42');
$assert_session->elementNotExists('xpath', $second_positive_int_field_xpath); $assert_session->elementNotExists('xpath', $second_positive_int_field_xpath);
// Press the 'add another item' button and add a second item. // Press the 'add another item' button and add a second item.
...@@ -107,7 +107,7 @@ class SimpleWidgetTest extends InlineEntityFormTestBase { ...@@ -107,7 +107,7 @@ class SimpleWidgetTest extends InlineEntityFormTestBase {
// Assert an extra item isn't added at the same time. // Assert an extra item isn't added at the same time.
$assert_session->elementNotExists('xpath', $third_nested_title_field_xpath); $assert_session->elementNotExists('xpath', $third_nested_title_field_xpath);
$assert_session->elementExists('xpath', $second_nested_title_field_xpath)->setValue('Nested single node 5'); $assert_session->elementExists('xpath', $second_nested_title_field_xpath)->setValue('Nested single node 5');
$assert_session->elementExists('xpath', $second_positive_int_field_xpath)->setValue(42); $assert_session->elementExists('xpath', $second_positive_int_field_xpath)->setValue('42');
// Press the 'add another item' button and add a third item. // Press the 'add another item' button and add a third item.
$assert_session->buttonExists('Add another item')->press(); $assert_session->buttonExists('Add another item')->press();
...@@ -115,7 +115,7 @@ class SimpleWidgetTest extends InlineEntityFormTestBase { ...@@ -115,7 +115,7 @@ class SimpleWidgetTest extends InlineEntityFormTestBase {
// Assert an extra item isn't added at the same time. // Assert an extra item isn't added at the same time.
$assert_session->elementNotExists('xpath', $fourth_nested_title_field_xpath); $assert_session->elementNotExists('xpath', $fourth_nested_title_field_xpath);
$assert_session->elementExists('xpath', $third_nested_title_field_xpath)->setValue('Nested single node 6'); $assert_session->elementExists('xpath', $third_nested_title_field_xpath)->setValue('Nested single node 6');
$assert_session->elementExists('xpath', $third_positive_int_field_xpath)->setValue(42); $assert_session->elementExists('xpath', $third_positive_int_field_xpath)->setValue('42');
$page->pressButton('Save'); $page->pressButton('Save');
$assert_session->pageTextContains('IEF simple single Host node 3 has been created.'); $assert_session->pageTextContains('IEF simple single Host node 3 has been created.');
$host_node = $this->getNodeByTitle('Host node 3'); $host_node = $this->getNodeByTitle('Host node 3');
...@@ -156,14 +156,14 @@ class SimpleWidgetTest extends InlineEntityFormTestBase { ...@@ -156,14 +156,14 @@ class SimpleWidgetTest extends InlineEntityFormTestBase {
$child_title = 'Child node ' . $this->randomString(); $child_title = 'Child node ' . $this->randomString();
$assert_session->elementExists('xpath', $nested_title_field_xpath)->setValue($child_title); $assert_session->elementExists('xpath', $nested_title_field_xpath)->setValue($child_title);
$assert_session->elementExists('xpath', $positive_int_field_xpath)->setValue(-1); $assert_session->elementExists('xpath', $positive_int_field_xpath)->setValue('-1');
$page->pressButton('Save'); $page->pressButton('Save');
// Assert field validation fires on Inline Entity Form widget. // Assert field validation fires on Inline Entity Form widget.
$assert_session->pageTextNotContains('IEF simple single Host Validation Node has been created.'); $assert_session->pageTextNotContains('IEF simple single Host Validation Node has been created.');
// Assert that we're still on form due to to validation error. // Assert that we're still on form due to to validation error.
$this->assertSession()->addressEquals('node/add/ief_simple_single'); $this->assertSession()->addressEquals('node/add/ief_simple_single');
$assert_session->elementExists('xpath', $positive_int_field_xpath)->setValue(1); $assert_session->elementExists('xpath', $positive_int_field_xpath)->setValue('1');
$page->pressButton('Save'); $page->pressButton('Save');
// Assert title validation passes on Inline Entity Form widget. // Assert title validation passes on Inline Entity Form widget.
$assert_session->pageTextNotContains('Title field is required.'); $assert_session->pageTextNotContains('Title field is required.');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment