Skip to content

Commit

Permalink
Merge branch '4.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed Aug 25, 2023
2 parents aefe0c1 + 0ddb443 commit f9323ff
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 59 deletions.
37 changes: 20 additions & 17 deletions behat_ibexa_commerce.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,25 @@ regression:
- Ibexa\Migration\Behat\Context\MigrationContext
commerce:
paths:
- '%paths.base%/vendor/ibexa/scheduler/features'
- '%paths.base%/vendor/ibexa/admin-ui/features/personas'
- '%paths.base%/vendor/ibexa/admin-ui/features/standard'
- '%paths.base%/vendor/ibexa/corporate-account/features/browser'
- '%paths.base%/vendor/ibexa/fieldtype-page/features/eventSource'
- '%paths.base%/vendor/ibexa/form-builder/features'
- '%paths.base%/vendor/ibexa/page-builder/features/DynamicLandingPage'
- '%paths.base%/vendor/ibexa/page-builder/features/personas'
- '%paths.base%/vendor/ibexa/payment/features'
- '%paths.base%/vendor/ibexa/product-catalog/features/browser'
- '%paths.base%/vendor/ibexa/fieldtype-page/features/eventSource'
- '%paths.base%/vendor/ibexa/user/features/browser'
- '%paths.base%/vendor/ibexa/workflow/features/browser'
- '%paths.base%/vendor/ibexa/scheduler/features'
- '%paths.base%/vendor/ibexa/segmentation/features'
- '%paths.base%/vendor/ibexa/taxonomy/features'
- '%paths.base%/vendor/ibexa/user/features/browser'
- '%paths.base%/vendor/ibexa/version-comparison/features'
- '%paths.base%/vendor/ibexa/payment/features'
- '%paths.base%/vendor/ibexa/workflow/features/browser'
filters:
tags: "~@broken&&@IbexaCommerce"
contexts:
- Behat\MinkExtension\Context\MinkContext
- Ibexa\Behat\API\Context\ContentContext
- Ibexa\Behat\API\Context\ContentTypeContext
- Ibexa\Behat\API\Context\RoleContext
- Ibexa\Behat\API\Context\TestContext
- Ibexa\Behat\API\Context\TrashContext
- Ibexa\Behat\API\Context\UserContext
- Ibexa\AdminUi\Behat\BrowserContext\AdminUpdateContext
- Ibexa\AdminUi\Behat\BrowserContext\BookmarkContext
- Ibexa\AdminUi\Behat\BrowserContext\ContentActionsMenuContext
Expand All @@ -59,6 +54,7 @@ regression:
- Ibexa\AdminUi\Behat\BrowserContext\ContentViewContext
- Ibexa\AdminUi\Behat\BrowserContext\DashboardContext
- Ibexa\AdminUi\Behat\BrowserContext\LanguageContext
- Ibexa\AdminUi\Behat\BrowserContext\MyDraftsContext
- Ibexa\AdminUi\Behat\BrowserContext\NavigationContext
- Ibexa\AdminUi\Behat\BrowserContext\NotificationContext
- Ibexa\AdminUi\Behat\BrowserContext\ObjectStatesContext
Expand All @@ -70,6 +66,12 @@ regression:
- Ibexa\AdminUi\Behat\BrowserContext\UDWContext
- Ibexa\AdminUi\Behat\BrowserContext\UserNotificationContext
- Ibexa\AdminUi\Behat\BrowserContext\UserPreferencesContext
- Ibexa\Behat\API\Context\ContentContext
- Ibexa\Behat\API\Context\ContentTypeContext
- Ibexa\Behat\API\Context\RoleContext
- Ibexa\Behat\API\Context\TestContext
- Ibexa\Behat\API\Context\TrashContext
- Ibexa\Behat\API\Context\UserContext
- Ibexa\Behat\Browser\Context\AuthenticationContext
- Ibexa\Behat\Browser\Context\DebuggingContext
- Ibexa\CorporateAccount\Behat\Context\CompaniesContext
Expand All @@ -81,19 +83,20 @@ regression:
- Ibexa\FormBuilder\Behat\BrowserContext\FormFrontContext
- Ibexa\Migration\Behat\Context\MigrationContext
- Ibexa\PageBuilder\Behat\Context\PageBuilderContext
- Ibexa\ProductCatalog\Behat\Context\AttributesContext
- Ibexa\Payment\Behat\Context\PaymentMethodsContext
- Ibexa\ProductCatalog\Behat\Context\AttributeGroupsContext
- Ibexa\ProductCatalog\Behat\Context\AttributesContext
- Ibexa\ProductCatalog\Behat\Context\CatalogsContext
- Ibexa\ProductCatalog\Behat\Context\CurrenciesContext
- Ibexa\ProductCatalog\Behat\Context\CustomerGroupsContext
- Ibexa\ProductCatalog\Behat\Context\ProductTypesContext
- Ibexa\ProductCatalog\Behat\Context\ProductsContext
- Ibexa\ProductCatalog\Behat\Context\CurrenciesContext
- Ibexa\ProductCatalog\Behat\Context\ProductTypesContext
- Ibexa\Scheduler\Behat\BrowserContext\DateBasedPublisherContext
- Ibexa\Segmentation\Behat\Context\SegmentationContext
- Ibexa\Taxonomy\Behat\Context\Browser\TaxonomyContext
- Ibexa\Taxonomy\Behat\Context\Service\TaxonomyContext
- Ibexa\User\Behat\Context\UserSettingsContext
- Ibexa\User\Behat\Context\UserSetupContext
- Ibexa\VersionComparison\Behat\Context\VersionComparisonContext
- Ibexa\Workflow\Behat\Context\WorkflowAdminContext
- Ibexa\Workflow\Behat\Context\WorkflowContext
- Ibexa\Segmentation\Behat\Context\SegmentationContext
- Ibexa\Payment\Behat\Context\PaymentMethodsContext
- Ibexa\AdminUi\Behat\BrowserContext\MyDraftsContext
42 changes: 23 additions & 19 deletions behat_ibexa_experience.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
imports:
- behat_ibexa_headless.yaml
- vendor/ibexa/scheduler/behat_suites_experience.yml
- vendor/ibexa/corporate-account/behat_suites.yml
- vendor/ibexa/fieldtype-page/behat_suites.yml
- vendor/ibexa/form-builder/behat_suites.yml
- vendor/ibexa/page-builder/behat_suites.yml
- vendor/ibexa/fieldtype-page/behat_suites.yml
- vendor/ibexa/scheduler/behat_suites_experience.yml
- vendor/ibexa/segmentation/behat_suites.yml
- vendor/ibexa/site-factory/behat_suites.yml
- vendor/ibexa/taxonomy/behat_suites_experience.yml
- vendor/ibexa/workflow/behat_suites_experience.yml
- vendor/ibexa/segmentation/behat_suites.yml
- vendor/ibexa/corporate-account/behat_suites.yml

regression:
suites:
Expand All @@ -33,29 +34,24 @@ regression:
- Ibexa\Migration\Behat\Context\MigrationContext
experience:
paths:
- '%paths.base%/vendor/ibexa/scheduler/features'
- '%paths.base%/vendor/ibexa/admin-ui/features/personas'
- '%paths.base%/vendor/ibexa/admin-ui/features/standard'
- '%paths.base%/vendor/ibexa/corporate-account/features/browser'
- '%paths.base%/vendor/ibexa/fieldtype-page/features/eventSource'
- '%paths.base%/vendor/ibexa/form-builder/features'
- '%paths.base%/vendor/ibexa/page-builder/features/DynamicLandingPage'
- '%paths.base%/vendor/ibexa/page-builder/features/personas'
- '%paths.base%/vendor/ibexa/product-catalog/features/browser'
- '%paths.base%/vendor/ibexa/fieldtype-page/features/eventSource'
- '%paths.base%/vendor/ibexa/user/features/browser'
- '%paths.base%/vendor/ibexa/workflow/features/browser'
- '%paths.base%/vendor/ibexa/scheduler/features'
- '%paths.base%/vendor/ibexa/segmentation/features'
- '%paths.base%/vendor/ibexa/taxonomy/features'
- '%paths.base%/vendor/ibexa/user/features/browser'
- '%paths.base%/vendor/ibexa/version-comparison/features'
- '%paths.base%/vendor/ibexa/workflow/features/browser'
filters:
tags: "~@broken&&@IbexaExperience"
contexts:
- Behat\MinkExtension\Context\MinkContext
- Ibexa\Behat\API\Context\ContentContext
- Ibexa\Behat\API\Context\ContentTypeContext
- Ibexa\Behat\API\Context\RoleContext
- Ibexa\Behat\API\Context\TestContext
- Ibexa\Behat\API\Context\TrashContext
- Ibexa\Behat\API\Context\UserContext
- Ibexa\AdminUi\Behat\BrowserContext\AdminUpdateContext
- Ibexa\AdminUi\Behat\BrowserContext\BookmarkContext
- Ibexa\AdminUi\Behat\BrowserContext\ContentActionsMenuContext
Expand All @@ -65,6 +61,7 @@ regression:
- Ibexa\AdminUi\Behat\BrowserContext\ContentViewContext
- Ibexa\AdminUi\Behat\BrowserContext\DashboardContext
- Ibexa\AdminUi\Behat\BrowserContext\LanguageContext
- Ibexa\AdminUi\Behat\BrowserContext\MyDraftsContext
- Ibexa\AdminUi\Behat\BrowserContext\NavigationContext
- Ibexa\AdminUi\Behat\BrowserContext\NotificationContext
- Ibexa\AdminUi\Behat\BrowserContext\ObjectStatesContext
Expand All @@ -76,6 +73,12 @@ regression:
- Ibexa\AdminUi\Behat\BrowserContext\UDWContext
- Ibexa\AdminUi\Behat\BrowserContext\UserNotificationContext
- Ibexa\AdminUi\Behat\BrowserContext\UserPreferencesContext
- Ibexa\Behat\API\Context\ContentContext
- Ibexa\Behat\API\Context\ContentTypeContext
- Ibexa\Behat\API\Context\RoleContext
- Ibexa\Behat\API\Context\TestContext
- Ibexa\Behat\API\Context\TrashContext
- Ibexa\Behat\API\Context\UserContext
- Ibexa\Behat\Browser\Context\AuthenticationContext
- Ibexa\Behat\Browser\Context\DebuggingContext
- Ibexa\CorporateAccount\Behat\Context\CompaniesContext
Expand All @@ -87,18 +90,19 @@ regression:
- Ibexa\FormBuilder\Behat\BrowserContext\FormFrontContext
- Ibexa\Migration\Behat\Context\MigrationContext
- Ibexa\PageBuilder\Behat\Context\PageBuilderContext
- Ibexa\ProductCatalog\Behat\Context\AttributesContext
- Ibexa\ProductCatalog\Behat\Context\AttributeGroupsContext
- Ibexa\ProductCatalog\Behat\Context\AttributesContext
- Ibexa\ProductCatalog\Behat\Context\CatalogsContext
- Ibexa\ProductCatalog\Behat\Context\CurrenciesContext
- Ibexa\ProductCatalog\Behat\Context\CustomerGroupsContext
- Ibexa\ProductCatalog\Behat\Context\ProductTypesContext
- Ibexa\ProductCatalog\Behat\Context\ProductsContext
- Ibexa\ProductCatalog\Behat\Context\CurrenciesContext
- Ibexa\ProductCatalog\Behat\Context\ProductTypesContext
- Ibexa\Scheduler\Behat\BrowserContext\DateBasedPublisherContext
- Ibexa\Segmentation\Behat\Context\SegmentationContext
- Ibexa\Taxonomy\Behat\Context\Browser\TaxonomyContext
- Ibexa\Taxonomy\Behat\Context\Service\TaxonomyContext
- Ibexa\User\Behat\Context\UserSettingsContext
- Ibexa\User\Behat\Context\UserSetupContext
- Ibexa\VersionComparison\Behat\Context\VersionComparisonContext
- Ibexa\Workflow\Behat\Context\WorkflowAdminContext
- Ibexa\Workflow\Behat\Context\WorkflowContext
- Ibexa\Segmentation\Behat\Context\SegmentationContext
- Ibexa\AdminUi\Behat\BrowserContext\MyDraftsContext
42 changes: 23 additions & 19 deletions behat_ibexa_headless.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
imports:
- behat_ibexa_oss.yaml
- vendor/ibexa/scheduler/behat_suites_headless.yml
- vendor/ibexa/workflow/behat_suites_headless.yml
- vendor/ibexa/product-catalog/behat_suites.yml
- vendor/ibexa/scheduler/behat_suites_headless.yml
- vendor/ibexa/taxonomy/behat_suites_headless.yml
- vendor/ibexa/version-comparison/behat_suites.yml
- vendor/ibexa/workflow/behat_suites_headless.yml

regression:
suites:
Expand All @@ -28,23 +29,18 @@ regression:
- Ibexa\Migration\Behat\Context\MigrationContext
headless:
paths:
- '%paths.base%/vendor/ibexa/scheduler/features'
- '%paths.base%/vendor/ibexa/admin-ui/features/personas'
- '%paths.base%/vendor/ibexa/admin-ui/features/standard'
- '%paths.base%/vendor/ibexa/product-catalog/features/browser'
- '%paths.base%/vendor/ibexa/user/features/browser'
- '%paths.base%/vendor/ibexa/workflow/features/browser'
- '%paths.base%/vendor/ibexa/version-comparison/features'
- '%paths.base%/vendor/ibexa/admin-ui/features/personas'
- '%paths.base%/vendor/ibexa/admin-ui/features/standard'
- '%paths.base%/vendor/ibexa/product-catalog/features/browser'
- '%paths.base%/vendor/ibexa/scheduler/features'
- '%paths.base%/vendor/ibexa/taxonomy/features'
- '%paths.base%/vendor/ibexa/user/features/browser'
- '%paths.base%/vendor/ibexa/version-comparison/features'
- '%paths.base%/vendor/ibexa/workflow/features/browser'
filters:
tags: "~@broken&&@IbexaHeadless"
contexts:
- Behat\MinkExtension\Context\MinkContext
- Ibexa\Behat\API\Context\ContentContext
- Ibexa\Behat\API\Context\ContentTypeContext
- Ibexa\Behat\API\Context\RoleContext
- Ibexa\Behat\API\Context\TestContext
- Ibexa\Behat\API\Context\TrashContext
- Ibexa\Behat\API\Context\UserContext
- Ibexa\AdminUi\Behat\BrowserContext\AdminUpdateContext
- Ibexa\AdminUi\Behat\BrowserContext\BookmarkContext
- Ibexa\AdminUi\Behat\BrowserContext\ContentActionsMenuContext
Expand All @@ -54,6 +50,7 @@ regression:
- Ibexa\AdminUi\Behat\BrowserContext\ContentViewContext
- Ibexa\AdminUi\Behat\BrowserContext\DashboardContext
- Ibexa\AdminUi\Behat\BrowserContext\LanguageContext
- Ibexa\AdminUi\Behat\BrowserContext\MyDraftsContext
- Ibexa\AdminUi\Behat\BrowserContext\NavigationContext
- Ibexa\AdminUi\Behat\BrowserContext\NotificationContext
- Ibexa\AdminUi\Behat\BrowserContext\ObjectStatesContext
Expand All @@ -65,20 +62,27 @@ regression:
- Ibexa\AdminUi\Behat\BrowserContext\UDWContext
- Ibexa\AdminUi\Behat\BrowserContext\UserNotificationContext
- Ibexa\AdminUi\Behat\BrowserContext\UserPreferencesContext
- Ibexa\Behat\API\Context\ContentContext
- Ibexa\Behat\API\Context\ContentTypeContext
- Ibexa\Behat\API\Context\RoleContext
- Ibexa\Behat\API\Context\TestContext
- Ibexa\Behat\API\Context\TrashContext
- Ibexa\Behat\API\Context\UserContext
- Ibexa\Behat\Browser\Context\AuthenticationContext
- Ibexa\Behat\Browser\Context\DebuggingContext
- Ibexa\Migration\Behat\Context\MigrationContext
- Ibexa\ProductCatalog\Behat\Context\AttributesContext
- Ibexa\ProductCatalog\Behat\Context\AttributeGroupsContext
- Ibexa\ProductCatalog\Behat\Context\AttributesContext
- Ibexa\ProductCatalog\Behat\Context\CatalogsContext
- Ibexa\ProductCatalog\Behat\Context\CurrenciesContext
- Ibexa\ProductCatalog\Behat\Context\CustomerGroupsContext
- Ibexa\ProductCatalog\Behat\Context\ProductsContext
- Ibexa\ProductCatalog\Behat\Context\ProductTypesContext
- Ibexa\ProductCatalog\Behat\Context\ProductsContext
- Ibexa\ProductCatalog\Behat\Context\CurrenciesContext
- Ibexa\Scheduler\Behat\BrowserContext\DateBasedPublisherContext
- Ibexa\Taxonomy\Behat\Context\Browser\TaxonomyContext
- Ibexa\Taxonomy\Behat\Context\Service\TaxonomyContext
- Ibexa\User\Behat\Context\UserSettingsContext
- Ibexa\User\Behat\Context\UserSetupContext
- Ibexa\VersionComparison\Behat\Context\VersionComparisonContext
- Ibexa\Workflow\Behat\Context\WorkflowAdminContext
- Ibexa\Workflow\Behat\Context\WorkflowContext
- Ibexa\AdminUi\Behat\BrowserContext\MyDraftsContext
11 changes: 9 additions & 2 deletions src/lib/API/ContentData/FieldTypeData/TextLineDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,25 @@

namespace Ibexa\Behat\API\ContentData\FieldTypeData;

use Ibexa\Core\FieldType\TextLine\Value;

class TextLineDataProvider extends AbstractFieldTypeDataProvider
{
public function supports(string $fieldTypeIdentifier): bool
{
return 'ezstring' === $fieldTypeIdentifier;
}

public function generateData(string $contentTypeIdentifier, string $fieldIdentifier, string $language = 'eng-GB'): string
public function generateData(string $contentTypeIdentifier, string $fieldIdentifier, string $language = 'eng-GB'): Value
{
$this->setLanguage($language);

return $this->getFaker()->realText(80, 1);
return new Value($this->getFaker()->realText(80, 1));
}

public function parseFromString(string $value): Value
{
return new Value($value);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/lib/API/ContentData/FieldTypeNameConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class FieldTypeNameConverter
'eztime' => 'Time',
'ezurl' => 'URL',
'ezuser' => 'User account',
'ibexa_taxonomy_entry_assignment' => 'Taxonomy Entry Assignment',
];

public static function getFieldTypeNameByIdentifier(string $fieldTypeIdentifier): string
Expand Down
9 changes: 8 additions & 1 deletion src/lib/API/Context/ContentTypeContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ private function parseBool(string $value): bool
private function parseFieldSettings(string $fieldTypeIdentifier, string $settings)
{
$parsedSettings = [];
// TODO: Clean this up in the future if needed
switch ($fieldTypeIdentifier) {
case 'ezcontentquery':
return $this->parseContentQuerySettings($settings);
Expand All @@ -87,6 +86,9 @@ private function parseFieldSettings(string $fieldTypeIdentifier, string $setting
case 'ezselection':
return $this->parseSelectionSettings($settings);

case 'ibexa_taxonomy_entry_assignment':
return $this->parseTaxonomySettings($settings);

default:
return $parsedSettings;
}
Expand Down Expand Up @@ -141,6 +143,11 @@ private function parseContentQuerySettings(string $settings): array

return $parsedSettings;
}

private function parseTaxonomySettings(string $settings): array
{
return ['taxonomy' => $settings];
}
}

class_alias(ContentTypeContext::class, 'EzSystems\Behat\API\Context\ContentTypeContext');
2 changes: 2 additions & 0 deletions src/lib/Browser/Element/BaseElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ function () use ($locator) {
$wrappedElement = $this->elementFactory->createElement($this->elementFactory, $locator, $foundMinkElement);

if ($locator->elementMeetsCriteria($wrappedElement)) {
$wrappedElement->setTimeout($this->getTimeout());

return $wrappedElement;
}
}
Expand Down
26 changes: 26 additions & 0 deletions src/lib/Browser/Element/Mapper/ElementAttributeMapper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

/**
* @copyright Copyright (C) Ibexa AS. All rights reserved.
* @license For full copyright and license information view LICENSE file distributed with this source code.
*/
declare(strict_types=1);

namespace Ibexa\Behat\Browser\Element\Mapper;

use Ibexa\Behat\Browser\Element\ElementInterface;

class ElementAttributeMapper implements MapperInterface
{
private string $attribute;

public function __construct(string $attribute)
{
$this->attribute = $attribute;
}

public function map(ElementInterface $element): string
{
return $element->getAttribute($this->attribute);
}
}
Loading

0 comments on commit f9323ff

Please sign in to comment.