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

13865 safari block cookies breaks javascript scripts #25324

Conversation

raulvOnestic91
Copy link
Contributor

Create a popup to warn that the cookies are blocked in the browser.

Description (*)

I fixed this PR creating a js that checks if the navigator has the cookies blocked and warn with a popup that the behavior could be wrong.

Fixed Issues (if relevant)

  1. Safari "Block all cookies" setting breaks JavaScript scripts #13865: Safari "Block all cookies" setting breaks JavaScript scripts

Manual testing scenarios (*)

  1. Open Safari browser and go to Preferences
  2. In Privacy tab enable Block all cookies setting.
  3. Open any Magento shop.

Questions or comments

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)

@m2-assistant
Copy link

m2-assistant bot commented Oct 27, 2019

Hi @raulvOnestic91. 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 Guide documentation.

@raulvOnestic91
Copy link
Contributor Author

hello @DrewML @melnikovi I not able to see what is wrong in the Static Tests, the details page is not charging. Could you tell me what is the error please?

@Karlasa
Copy link
Contributor

Karlasa commented Nov 20, 2019

@magento run all tests

1 similar comment
@krzksz
Copy link
Contributor

krzksz commented Dec 1, 2019

@magento run all tests

@ghost ghost assigned krzksz Dec 1, 2019
Copy link
Contributor

@krzksz krzksz left a comment

Choose a reason for hiding this comment

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

Please take a look at failing static tests.

@magento-engcom-team
Copy link
Contributor

Hi @krzksz, thank you for the review.
ENGCOM-6378 has been created to process this Pull Request
✳️ @krzksz, 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

@krzksz
Copy link
Contributor

krzksz commented Dec 2, 2019

Hey @magento-engcom-team, I am not able to add a tests label as I am not sure if it is possible to simulate disabled cookies in MFTF.

@sidolov sidolov changed the base branch from 2.3-develop to 2.4-develop December 5, 2019 17:17
@VladimirZaets
Copy link
Contributor

Hi @raulvOnestic91, @krzksz. In this case, first of all, I think we should create a separate class that will wrap the native navigator class.
It will give a few benefits:

  1. We will control the functionality of Navigator and will have the ability to add/change functionality in just one place.
  2. It will five ability to cover functionality at least by the unit test

expect($.fn.cookieStatus).toBeDefined();
});

it('verify that modal does not shows when cookies are supported', function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change to does not show a modal when cookies are supported.

window.navigator = navigator;
});

it('verify initialization cookieStatus widget', function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change to defines cookieStatus widget.

@magento-engcom-team
Copy link
Contributor

Hi @krzksz, thank you for the review.
ENGCOM-6378 has been created to process this Pull Request

@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

@Nazar65 Nazar65 force-pushed the 13865-safari-block-cookies-breaks-javascript-scripts branch 3 times, most recently from 95b000e to 14112c0 Compare February 6, 2020 15:57
@engcom-Golf
Copy link
Contributor

Failed functional test not related to the changes in this PR, test fails on 2.4-develop branch.

@m2-assistant
Copy link

m2-assistant bot commented Feb 9, 2020

Hi @raulvOnestic91, 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.

@sdzhepa sdzhepa mentioned this pull request May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants