Skip to content
Snippets Groups Projects
Commit a844c531 authored by Thomas Seidl's avatar Thomas Seidl
Browse files

Issue #3422224 by drunken monkey: Enabled GitLab CI.

parent 478ea1bb
No related branches found
No related tags found
1 merge request!9Enable GitLab CI
Pipeline #103101 passed with warnings
################
# 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" value can be:
# - Recommended (default) - `ref: $_GITLAB_TEMPLATES_REF` - The Drupal Association will update this value to the recommended tag for contrib.
# - Latest - `ref: main` - Get the latest additions and bug fixes as they are merged into the templates.
# - Minor or Major latests - `ref: 1.x-latest` or `ref: 1.0.x-latest` - Get the latest additions within a minor (mostly bugfixes) or major (bugs and new features).
# - Fixed tag - `ref: 1.0.1` - Set the value to a known tag. This will not get any updates.
ref: $_GITLAB_TEMPLATES_REF
file:
- '/includes/include.drupalci.main.yml'
# EXPERIMENTAL: For Drupal 7, remove the above line and uncomment the below.
# - '/includes/include.drupalci.main-d7.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_ESLINT: '1'
###################################################################################
#
# *
# /(
# ((((,
# /(((((((
# ((((((((((*
# ,(((((((((((((((
# ,(((((((((((((((((((
# ((((((((((((((((((((((((*
# *(((((((((((((((((((((((((((((
# ((((((((((((((((((((((((((((((((((*
# *(((((((((((((((((( .((((((((((((((((((
# ((((((((((((((((((. /(((((((((((((((((*
# /((((((((((((((((( .(((((((((((((((((,
# ,(((((((((((((((((( ((((((((((((((((((
# .(((((((((((((((((((( .(((((((((((((((((
# ((((((((((((((((((((((( ((((((((((((((((/
# (((((((((((((((((((((((((((/ ,(((((((((((((((*
# .((((((((((((((/ /(((((((((((((. ,(((((((((((((((
# *(((((((((((((( ,(((((((((((((/ *((((((((((((((.
# ((((((((((((((, /(((((((((((((. ((((((((((((((,
# (((((((((((((/ ,(((((((((((((* ,(((((((((((((,
# *((((((((((((( .((((((((((((((( ,(((((((((((((
# ((((((((((((/ /((((((((((((((((((. ,((((((((((((/
# ((((((((((((( *(((((((((((((((((((((((* *((((((((((((
# ((((((((((((( ,(((((((((((((..((((((((((((( *((((((((((((
# ((((((((((((, /((((((((((((* /((((((((((((/ ((((((((((((
# ((((((((((((( /((((((((((((/ (((((((((((((* ((((((((((((
# (((((((((((((/ /(((((((((((( ,((((((((((((, *((((((((((((
# (((((((((((((( *(((((((((((/ *((((((((((((. ((((((((((((/
# *((((((((((((((((((((((((((, /(((((((((((((((((((((((((
# ((((((((((((((((((((((((( ((((((((((((((((((((((((,
# .(((((((((((((((((((((((/ ,(((((((((((((((((((((((
# ((((((((((((((((((((((/ ,(((((((((((((((((((((/
# *((((((((((((((((((((( (((((((((((((((((((((,
# ,(((((((((((((((((((((, ((((((((((((((((((((/
# ,(((((((((((((((((((((* /((((((((((((((((((((
# ((((((((((((((((((((((, ,/((((((((((((((((((((,
# ,(((((((((((((((((((((((((((((((((((((((((((((((((((
# .(((((((((((((((((((((((((((((((((((((((((((((
# .((((((((((((((((((((((((((((((((((((,.
# .,(((((((((((((((((((((((((.
#
###################################################################################
Search API Saved Searches 1.x, dev (xxxx-xx-xx):
------------------------------------------------
- #3422224 by drunken monkey: Enabled GitLab CI.
- #3330345 by drunken monkey, khiminrm: Fixed errors when "E-Mail" notification
plugin is disabled.
- #2955519 by drunken monkey: Fixed indistinct separation of module ("API") code
......
......@@ -54,7 +54,6 @@ use Drupal\search_api_saved_searches\SavedSearchTypeInterface;
* "options",
* },
* links = {
* "canonical" = "/admin/config/search/search-api-saved-searches/type/{search_api_saved_search_type}/edit",
* "add-form" = "/admin/config/search/search-api-saved-searches/add-type",
* "edit-form" = "/admin/config/search/search-api-saved-searches/type/{search_api_saved_search_type}/edit",
* "delete-form" = "/admin/config/search/search-api-saved-searches/type/{search_api_saved_search_type}/delete",
......
......@@ -135,10 +135,10 @@ class IntegrationTest extends BrowserTestBase {
END;
$edit = [
'label' => 'My test default',
'status' => TRUE,
'status' => '1',
'options[displays][default]' => '0',
'options[displays][selected][views_page:search_api_test_view__page_1]' => TRUE,
'notification_plugins[email]' => TRUE,
'options[displays][selected][views_page:search_api_test_view__page_1]' => '1',
'notification_plugins[email]' => '1',
'notification_configs[email][activate][body]' => $activation_mail,
'options[notify_interval][default_value]' => '-1',
'options[notify_interval][options]' => "-1 | Do not notify\n 86400| Every day\n3600|Hourly\n7143 |Roughly every two hours",
......@@ -151,7 +151,7 @@ END;
$type = SavedSearchType::load('default');
$expected = [
'displays' => [
'default' => FALSE,
'default' => '0',
'selected' => [
'views_page:search_api_test_view__page_1',
],
......@@ -162,7 +162,7 @@ END;
],
'description' => 'Description for the default type.',
'notify_interval' => [
'customizable' => TRUE,
'customizable' => '1',
'default_value' => -1,
'options' => [
-1 => 'Do not notify',
......@@ -213,13 +213,13 @@ END;
'label' => 'Foo & Bar',
'id' => 'foobar',
'description' => 'Some description text for type <em>Foo &amp;&amp; Bar</em>.',
'status' => TRUE,
'options[displays][default]' => TRUE,
'options[displays][selected][views_page:search_api_test_view__page_1]' => TRUE,
'options[displays][selected][views_page:search_api_test_sorts__page_1]' => TRUE,
'notification_plugins[email]' => TRUE,
'status' => '1',
'options[displays][default]' => '1',
'options[displays][selected][views_page:search_api_test_view__page_1]' => '1',
'options[displays][selected][views_page:search_api_test_sorts__page_1]' => '1',
'notification_plugins[email]' => '1',
'options[notify_interval][default_value]' => '7200',
'options[notify_interval][customizable]' => TRUE,
'options[notify_interval][customizable]' => '1',
'options[max_results]' => '',
'options[description]' => 'Description for the foobar type.',
];
......@@ -235,7 +235,7 @@ END;
- Delete: [search-api-saved-search:delete-url]
END;
$edit = [
'notification_configs[email][registered_choose_mail]' => TRUE,
'notification_configs[email][registered_choose_mail]' => '1',
'notification_configs[email][activate][body]' => $activation_mail,
];
$this->submitForm($edit, 'Save');
......@@ -511,14 +511,14 @@ END;
$this->drupalGet('admin/config/search/search-api-saved-searches/type/default/edit');
$edit = [
'options[notify_interval][default_value]' => '7200',
'options[notify_interval][customizable]' => FALSE,
'options[notify_interval][customizable]' => '0',
];
$this->submitForm($edit, 'Save');
$assert_session->pageTextContains('Your settings have been saved.');
$type = SavedSearchType::load('default');
$expected = [
'customizable' => FALSE,
'customizable' => '0',
'default_value' => 7200,
'options' => [
-1 => 'Do not notify',
......
......@@ -18,6 +18,7 @@ use Drupal\Tests\search_api\Kernel\TestLogger;
use Drupal\Tests\search_api\Kernel\TestTimeService;
use Drupal\Tests\user\Traits\UserCreationTrait;
use Drupal\user\Entity\User;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
/**
* Tests whether mails are translated correctly.
......@@ -147,6 +148,10 @@ class EmailTranslationTest extends KernelTestBase {
$config_translation->set('notification_settings.email.notification.title', 'Notification mail subject (xx)');
$config_translation->set('notification_settings.email.notification.body', 'Notification mail body (xx)');
$config_translation->save();
// Start a HTTP session since the language negotiator service might
// otherwise throw an exception.
\Drupal::request()->setSession($this->createMock(SessionInterface::class));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment