Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ui] Calling the always action on opening and closing the modal. #23234

Merged

Conversation

eduard13
Copy link
Contributor

Description (*)

This PR fixes the calling of always action before opening the alert and confirm widgets.

Fixed Issues (if relevant)

  1. Alert widget doesn't trigger always method on showing the message #23233: Alert widget doesn't trigger always method on showing the message

Manual testing scenarios (*)

Keep the browser console open.

  1. Create a new alert widget on frontend. The following simple code can be used:
require([
        'jquery',
        'Magento_Ui/js/modal/alert'
    ], function ($, alert) {
        'use strict';

        alert({
            title: 'Alert Title',
            content: 'content',
            modalClass: 'alert',
            actions: {
                always: function() {
                    console.log('always triggering');
                }
            }
        });
    });
  1. Click OK button

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@eduard13 eduard13 requested a review from dmytro-ch June 12, 2019 16:48
@m2-assistant
Copy link

m2-assistant bot commented Jun 12, 2019

Hi @eduard13. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team magento-engcom-team added Area: Frontend Component: Ui Release Line: 2.3 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Jun 12, 2019
@dmytro-ch dmytro-ch self-assigned this Jun 12, 2019
Copy link
Contributor

@dmytro-ch dmytro-ch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @eduard13,
could you please check the functional tests failures?
Most likely the issues appeared after the latest changes.

Thank you!

@eduard13
Copy link
Contributor Author

Hi @dmytro-ch,
Looks like the always for the confirm widget was breaking the tests(even that locally the tests were successfully passing), as there are some places where the always is not correctly used.
So the fix has been a bit changed and applied only for the alert widget.

Thank you.

@magento-engcom-team
Copy link
Contributor

Hi @dmytro-ch, thank you for the review.
ENGCOM-5278 has been created to process this Pull Request

@engcom-Alfa
Copy link
Contributor

Hi @eduard13 !

I've checked PR changes and need to clarify one question:

I see text "always triggering" logged on opening and twice right after clicking the OK button.

after

Is it expected result or not?

Thanks!

@eduard13
Copy link
Contributor Author

eduard13 commented Jun 18, 2019

Hi @engcom-Alfa,
this issue should be fixed now. Could you please try again? There should be just 1 logging after clicking the OK button.

@dmytro-ch could you please re-review the latest changes?
Thank you.

@ghost
Copy link

ghost commented Jun 18, 2019

@eduard13 unfortunately, only members of the maintainers team are allowed to remove progress related labels to the pull request

@eduard13 eduard13 requested a review from dmytro-ch June 18, 2019 10:43
@magento-engcom-team
Copy link
Contributor

Hi @dmytro-ch, thank you for the review.
ENGCOM-5278 has been created to process this Pull Request
✳️ @dmytro-ch, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Before:

before

After:

after

@m2-assistant
Copy link

m2-assistant bot commented Jun 27, 2019

Hi @eduard13, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@slavvka
Copy link
Member

slavvka commented Apr 18, 2020

@eduard13 Unfortunately this fix has been reverted. Feel free to fix the issue in more appropriate way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Award: bug fix Component: Ui Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants