Skip to content

Commit

Permalink
Merge branch 'B2B-2022' of github.com:magento-arcticfoxes/magento2ce …
Browse files Browse the repository at this point in the history
…into B2B-2022
  • Loading branch information
avattam06 committed Nov 3, 2021
2 parents eaa1eba + ce2d532 commit 3300561
Show file tree
Hide file tree
Showing 202 changed files with 38,577 additions and 44,941 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<actionGroup ref="CheckoutSelectFlatRateShippingMethodActionGroup" stepKey="selectFlatRate"/>
<actionGroup ref="StorefrontCheckoutForwardFromShippingStepActionGroup" stepKey="goToReview"/>
<actionGroup ref="AssertCaptchaVisibleOnSecondCheckoutStepActionGroup" stepKey="assertCaptchaIsVisible"/>
<waitForLoadingMaskToDisappear stepKey="waitForSpinner"/>
<actionGroup ref="StorefrontFillCaptchaFieldOnCheckoutActionGroup" stepKey="placeOrderWithIncorrectValue">
<argument name="captcha" value="{{WrongCaptcha.value}}"/>
</actionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ define([
return $.ajax({
url: urlBuilder.build(refreshUrl),
type: 'POST',
async: false,
data: JSON.stringify({
'formId': formId
}),
Expand Down
1 change: 0 additions & 1 deletion app/code/Magento/Captcha/view/frontend/web/js/captcha.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ define([
$.ajax({
url: this.options.url,
type: 'post',
async: false,
dataType: 'json',
context: this,
data: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<element name="removeFilter" type="button" selector="div.filter-current .remove" timeout="30"/>
<element name="activeFilterOptions" type="text" selector=".filter-options-item.active .items"/>
<element name="activeFilterOptionItemByPosition" type="text" selector=".filter-options-item.active .items li:nth-child({{itemPosition}}) a" parameterized="true" timeout="30"/>
<element name="enabledFilterOptionItemByLabel" type="text" selector="//div[@class='filter-options']//li[@class='item']//a[contains(text(), '{{optionLabel}}')]" parameterized="true" timeout="30"/>
<element name="disabledFilterOptionItemByLabel" type="text" selector="//div[@class='filter-options']//li[@class='item' and contains(text(), '{{optionLabel}}')]" parameterized="true" timeout="30"/>
<element name="enabledFilterOptionItemByLabel" type="text" selector="//div[contains(@class, 'filter-options')]//li[@class='item']//a[contains(text(), '{{optionLabel}}')]" parameterized="true" timeout="30"/>
<element name="disabledFilterOptionItemByLabel" type="text" selector="//div[contains(@class, 'filter-options')]//li[@class='item' and contains(text(), '{{optionLabel}}')]" parameterized="true" timeout="30"/>
<element name="visibleOptionQty" type="text" selector=".filter-options-item.active .items li:nth-child({{itemPosition}}) a .count" parameterized="true" timeout="30"/>
</section>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ define([
doc.execCommand('stop');
self.iframe.remove();
}
self.modal.data('modal').modal.remove();
self.modal.data('mageModal').modal.remove();
$(window).off('resize.modal');
}
});
Expand All @@ -63,7 +63,7 @@ define([
* @private
*/
_getHeight: function () {
var modal = this.modal.data('modal').modal,
var modal = this.modal.data('mageModal').modal,
modalHead = modal.find('header'),
modalHeadHeight = modalHead.outerHeight(),
modalHeight = modal.outerHeight(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
<element name="numberOfUses" type="button" selector="#popularity"/>
<element name="redirectUrl" type="text" selector="//div[@class='admin__field-control control']/input[@id='redirect']"/>
<element name="displayInSuggestedTerm" type="select" selector="//select[@name='display_in_terms']"/>
<element name="saveSearchButton" type="button" selector="//button[@id='save']/span[@class='ui-button-text']" timeout="30"/>
<element name="saveSearchButton" type="button" selector="//button[@id='save']/span" timeout="30"/>
</section>
</sections>
</sections>
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class RevokedRepository implements RevokedRepositoryInterface
/**
* @param ResourceConnection $resourceConnection
*/
public function __construct(ResourceConnection $resourceConnection) {
public function __construct(ResourceConnection $resourceConnection)
{
$this->connection = $resourceConnection;
}

Expand All @@ -38,7 +39,7 @@ public function __construct(ResourceConnection $resourceConnection) {
public function saveRevoked(Revoked $revoked): void
{
$conn = $this->getAdapter();
$table = $conn->getTableName(self::TABLE);
$table = $conn->getTableName($this->connection->getTableName(self::TABLE));

$conn->insertOnDuplicate($table, $revoked->getData(), array_keys($revoked->getData()));
}
Expand All @@ -49,7 +50,7 @@ public function saveRevoked(Revoked $revoked): void
public function findRevoked(int $userTypeId, int $userId): ?Revoked
{
$conn = $this->getAdapter();
$table = $conn->getTableName(self::TABLE);
$table = $conn->getTableName($this->connection->getTableName(self::TABLE));

$data = $conn->fetchRow(
$conn->select()
Expand All @@ -64,6 +65,11 @@ public function findRevoked(int $userTypeId, int $userId): ?Revoked
return null;
}

/**
* Resource connection
*
* @return AdapterInterface
*/
private function getAdapter(): AdapterInterface
{
return $this->connection->getConnection(ResourceConnection::DEFAULT_CONNECTION);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ define([

var topMargin = jQuery(this).closest('.ui-dialog').children('.ui-dialog-titlebar').outerHeight() + 30;

jQuery(this).closest('.ui-dialog').css('margin-top', topMargin);
jQuery(this).closest('.ui-dialog').css({
'margin-top' : topMargin,
'z-index': 1000
});
},
close: function () {
jQuery(this).closest('.ui-dialog').removeClass('ui-dialog-active');
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Theme/view/adminhtml/requirejs-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ var config = {
'mage/adminhtml/globals'
],
'paths': {
'jquery/ui': 'jquery/jquery-ui-1.9.2'
'jquery/ui': 'jquery/jquery-ui'
}
};
37 changes: 36 additions & 1 deletion app/code/Magento/Theme/view/base/requirejs-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,42 @@ var config = {
'ko': 'knockoutjs/knockout',
'knockout': 'knockoutjs/knockout',
'mageUtils': 'mage/utils/main',
'rjsResolver': 'mage/requirejs/resolver'
'rjsResolver': 'mage/requirejs/resolver',
'jquery-ui-modules/core': 'jquery/ui-modules/core',
'jquery-ui-modules/accordion': 'jquery/ui-modules/widgets/accordion',
'jquery-ui-modules/autocomplete': 'jquery/ui-modules/widgets/autocomplete',
'jquery-ui-modules/button': 'jquery/ui-modules/widgets/button',
'jquery-ui-modules/datepicker': 'jquery/ui-modules/widgets/datepicker',
'jquery-ui-modules/dialog': 'jquery/ui-modules/widgets/dialog',
'jquery-ui-modules/draggable': 'jquery/ui-modules/widgets/draggable',
'jquery-ui-modules/droppable': 'jquery/ui-modules/widgets/droppable',
'jquery-ui-modules/effect-blind': 'jquery/ui-modules/effects/effect-blind',
'jquery-ui-modules/effect-bounce': 'jquery/ui-modules/effects/effect-bounce',
'jquery-ui-modules/effect-clip': 'jquery/ui-modules/effects/effect-clip',
'jquery-ui-modules/effect-drop': 'jquery/ui-modules/effects/effect-drop',
'jquery-ui-modules/effect-explode': 'jquery/ui-modules/effects/effect-explode',
'jquery-ui-modules/effect-fade': 'jquery/ui-modules/effects/effect-fade',
'jquery-ui-modules/effect-fold': 'jquery/ui-modules/effects/effect-fold',
'jquery-ui-modules/effect-highlight': 'jquery/ui-modules/effects/effect-highlight',
'jquery-ui-modules/effect-scale': 'jquery/ui-modules/effects/effect-scale',
'jquery-ui-modules/effect-pulsate': 'jquery/ui-modules/effects/effect-pulsate',
'jquery-ui-modules/effect-shake': 'jquery/ui-modules/effects/effect-shake',
'jquery-ui-modules/effect-slide': 'jquery/ui-modules/effects/effect-slide',
'jquery-ui-modules/effect-transfer': 'jquery/ui-modules/effects/effect-transfer',
'jquery-ui-modules/effect': 'jquery/ui-modules/effect',
'jquery-ui-modules/menu': 'jquery/ui-modules/widgets/menu',
'jquery-ui-modules/mouse': 'jquery/ui-modules/widgets/mouse',
'jquery-ui-modules/position': 'jquery/ui-modules/position',
'jquery-ui-modules/progressbar': 'jquery/ui-modules/widgets/progressbar',
'jquery-ui-modules/resizable': 'jquery/ui-modules/widgets/resizable',
'jquery-ui-modules/selectable': 'jquery/ui-modules/widgets/selectable',
'jquery-ui-modules/slider': 'jquery/ui-modules/widgets/selectmenu',
'jquery-ui-modules/sortable': 'jquery/ui-modules/widgets/sortable',
'jquery-ui-modules/spinner': 'jquery/ui-modules/widgets/spinner',
'jquery-ui-modules/tabs': 'jquery/ui-modules/widgets/tabs',
'jquery-ui-modules/tooltip': 'jquery/ui-modules/widgets/tooltip',
'jquery-ui-modules/widget': 'jquery/ui-modules/widget',
'jquery-ui-modules/timepicker': 'jquery/timepicker'
}
},
shim: {
Expand Down
3 changes: 0 additions & 3 deletions app/code/Magento/Theme/view/frontend/requirejs-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ var config = {
mixins: {
'Magento_Theme/js/view/breadcrumbs': {
'Magento_Theme/js/view/add-home-breadcrumb': true
},
'jquery/ui-modules/dialog': {
'jquery/patches/jquery-ui': true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,13 @@
}

.ui-dialog-titlebar-close {
background-color: @color-white;
border-color: @color-white;
cursor: pointer;
.lib-icon-font(
@_icon-font-content: @popup-close-icon__content,
@_icon-font: @popup-close-icon__font,
@_icon-font-size: @popup-close-icon__font-size,
@_icon-font-color: @popup-close-icon__color,
@_icon-font-color-hover: @popup-close-icon__hover__color
);
.lib-icon-font(@_icon-font-content: @popup-close-icon__content, @_icon-font: @popup-close-icon__font, @_icon-font-size: @popup-close-icon__font-size, @_icon-font-color: @popup-close-icon__color, @_icon-font-color-hover: @popup-close-icon__hover__color);
position: absolute;
right: @popup-close-icon__right;
text-shadow: none;
top: @popup-close-icon__top - .3;

.ui-icon {
Expand All @@ -57,6 +54,23 @@
&.ui-state-hover {
border: none;
}

&.ui-button-icon-only {
text-indent: -9999px;
white-space: nowrap;
}

&:before {
float: left;
text-indent: 0;
}

&:hover {
background-color: @color-white;
border-color: @color-white;
box-shadow: none;
text-shadow: none;
}
}

.ui-dialog-content {
Expand Down Expand Up @@ -416,13 +430,14 @@
// Attribute Popup
// _____________________________________________

.attribute-popup { // ToDo UI: remove or refactor after New attribute popup refactored to sliding panel
// ToDo UI: remove or refactor after New attribute popup refactored to sliding panel
.attribute-popup {
.page-content {
padding: 0;
}
}

.attribute-popup-actions { // ToDo UI: remove or refactor after New attribute popup refactored to sliding panel
// ToDo UI: remove or refactor after New attribute popup refactored to sliding panel
.attribute-popup-actions {
&:extend(.abs-clearfix all);
background: @page-main-actions__background-color;
border-bottom: 1px solid @page-main-actions__border-color;
Expand All @@ -433,7 +448,8 @@
float: none;
}

&.fixed { // ToDo UI: remove or refactor after New attribute popup refactored to sliding panel
// ToDo UI: remove or refactor after New attribute popup refactored to sliding panel
&.fixed {
background: @color-white !important;
border-bottom: 0 !important;
left: 0 !important;
Expand Down
17 changes: 11 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dev/tests/acceptance/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
codeception.yml
tests/_output/*
tests/functional.suite.yml
tests/functional/Magento/FunctionalTest/_generated
tests/functional/Magento/_generated
vendor/*
mftf.log
/.credentials.example
/utils/
/utils/
44 changes: 18 additions & 26 deletions dev/tests/js/jasmine/tests/lib/mage/dropdown.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,37 +268,29 @@ define([
}, 6);
});

/*
* jQuery ui version 1.9.2 belongs to the adminhtml.
*
* This test will fail on backend since backend's jquery.ui will
* add ui-dialog-titlebar class anyway on create.
*/
if ($.ui.version !== '1.9.2') {
it('check if the title bar is prevented from being created', function () {
var dialog = $('<div/>'),
uiClass = '.ui-dialog',
ui;

dialog.dropdownDialog({
'createTitleBar': true
});

ui = $(uiClass);
expect(ui.find('.ui-dialog-titlebar').length > 0).toBeTruthy();
it('check if the title bar is prevented from being created', function () {
var dialog = $('<div/>'),
uiClass = '.ui-dialog',
ui;

dialog.dropdownDialog('destroy');
dialog.dropdownDialog({
'createTitleBar': true
});

dialog.dropdownDialog({
'createTitleBar': false
});
ui = $(uiClass);
expect(ui.find('.ui-dialog-titlebar').length > 0).toBeTruthy();

ui = $(uiClass);
expect(ui.find('.ui-dialog-titlebar').length <= 0).toBeTruthy();
dialog.dropdownDialog('destroy');

dialog.dropdownDialog('destroy');
dialog.dropdownDialog({
'createTitleBar': false
});
}

ui = $(uiClass);
expect(ui.find('.ui-dialog-titlebar').length <= 0).toBeTruthy();

dialog.dropdownDialog('destroy');
});

it('check if the position function gets disabled', function () {
var dialog = $('<div/>'),
Expand Down
Loading

0 comments on commit 3300561

Please sign in to comment.