GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

JAVASCRIPT DEVELOPER PRACTICE TEST P1(MAGENTO 2 CERTIFIED )

Miska Red 18 Fragen 2.016 Aufrufe

Quiz starten

Dieses Quiz hat ein Zeitlimit und öffnet sich deshalb im gewohnten Player.

Fragen in diesem Quiz (18)

  1. 1You are debugging a problem with a UI Component form and notice that Magento_Ui/js/dynamic-rows/action-delete.js does not specify a template, but is loading the templates/dynamic-rows/cells/action-delete.html. You have already looked in the UI Component XML file and it is not there. Where would the template path be specified?
    1. Adefinition.xml under the <actionDelete/> node.
    2. BThe dynamic-rows parent component’s defaults object.
    3. Crequirejs-config.js in Magento_Ui under the template key.
    4. DNowhere specifically. Magento automatically looks up the template by default based on the component name.
  2. 2A 3rd-party module installed on the site you are working on adds several pie-chart reports in the admin panel. It uses a 1000-line jQuery widget to render the pie chart. You have been asked to fix a bug and after some work discover the problem within the jQuery widget. Keeping maintainability in mind, how should you fix the problem?
    1. ACreate a mixin and return a jQuery widget with the same name as the original. Use the second parameter in the widget constructor for the original widget object and override only the necessary methods.
    2. BCopy the entire 3rd party extension directory from vendor/ into the site’s app/code folder and edit the Javascript file directly since it is a bug.
    3. CCreate a mixin for the module and copy the entire original widget into it, updating the problematic method as needed.
    4. DCopy the Javascript module into your own module and use RequireJs config with the “map” key to update the path so the custom version you have created is used instead.
  3. 3You are working on a site that extends a 3rd-party theme. You need to completely change how the breadcrumb component renders (originally in Magento_Catalog/js/product/breadcrumbs.js). However, the 3rd-party theme already modifies this. You are building a module, SwiftOtter_Catalog, that contains similar updates. Keeping upgradeability and maintainability in mind, what two ways that you can make these updates?
    1. ACreate a mixin in SwiftOtter_Catalog’s requirejs-config.js and override all applicable methods.
    2. BCopy app/design/frontend/3rd-party/Theme/Magento_Catalog/web/js/product/breadcrumbs.js to app/design/frontend/merchant/Theme/Magento_Catalog/web/js/product/breadcrumbs.js.
    3. CEdit app/design/frontend/3rd-party/Theme/Magento_Catalog/web/js/product/breadcrumbs.js to include the necessary changes.
    4. DDelete app/design/frontend/3rd-party/Theme/Magento_Catalog/web/js/product/breadcrumbs.js and create a new file in app/code/SwiftOtter/Catalog/view/frontend/web/web/js/product/breadcrumbs.js
  4. 4You have built a Javascript module that relies on the following .phtml code:<?php // app/code/MyCompany/MyModule/view/frontend/templates/render.phtml ?> <div data-mage-init=’{“MyCompany_MyModule/js/welcome”: {}}’>
    <?php if ($viewModel->canRenderWelcome()):?>
    <span data-bind=”text: welcomeText()”></span>
    <?php endif;?> </div> Unfortunately, the span is always empty. What is the solution?
    1. AAdd the attribute data-bind=”scope: ‘[component in uiRegistry]’” to the <div/> tag.
    2. BAdd a bind-directives: true into the properties passed into MyCompany_MyModule/js/welcome.
    3. CConvert the data-mage-init statement into initializing a uiComponent so that the content is properly rendered.
    4. DRefactor into using an external template. Then, use Knockout getTemplate in the constructor of MyCompany_MyModule/js/welcome.
  5. 5A merchant wants you to add a close button to collapse an opened tab on a product page. The Magento Tabs widget is used for the tabs. You add this code to your template: <button data-action="close" translate="'Close'"/> Keeping upgradability in mind, how do you implement this functionality?
    1. AExtend the Magento Tabs widget and add a callback for the button there
    2. BAdd an attribute onclick="$.mage.tabs.close()" to the button
    3. CAdd a callback for the button in the Magento Tabs widget in lib/web/mage/tabs.js
    4. DAdd a data-bind="click: close" attribute to the button
  6. 6A merchant has asked that the price of their free shipping method, which natively is displayed as $0.00, instead is displayed as FREE in the checkout in their store's theme. How do you make the change?
    1. ACopy the shipping-method-item Knockout HTML template from Magento_Checkout to your theme and add the following to the template: <!-- ko if: (element.getRegion('price') === '$0.00') -->FREE<!-- /ko --> <!-- ko if: (element.getRegion('price') !== '$0.00') -->element.getRegion('price')<!-- /ko-->
    2. BAdd the translation '$0.00','FREE' to your theme's translation CSV file.
    3. CCopy the appropriate view/shipping.js file from Magento_Checkout to your theme and change the form
      uiComponent's rate property to: rates:shippingService.getShippingRates().replace('$0.00', 'FREE');
    4. DCreate a requirejs-config.js file and create a Magento mixin to replace the native shipping-method-item Knockout HTML template.
  7. 7During a code review you notice the following code:
    $('#element').collapsible({ ajaxContent: 'true', ajaxUrlElement: '.my-ajax-url', content: '.my-content' }); What is your peer's desired result in using ajaxUrlElement?
    1. AMagento will replace the element .my-ajax-url with content loaded via AJAX from the data-url attribute set in the element .my-ajax-url.
    2. BMagento will find the element .my-ajax-url and load the content from that element's href attribute into .mycontent.
    3. CMagento will do a POST AJAX request on the href in .my-content and load the content in the .my-ajax-url element.
    4. D.my-ajax-url element.
    5. EMagento will do a GET AJAX request on the data-url attribute in my-ajax-url and load the content in the
  8. 8You Create a RequireJS configuration file requirejs-config.js, having specified the following: var config = { "map": { "*": { "<default_component><custom_component>" } } };
    What do you meaning <default_component> & <custom_component> ? (select 2)
    1. A<default_component>: the name of the default component you replace
    2. B<custom_component>: the name of the custom component
    3. C<default_component>: the name of the custom component
    4. D<custom_component>: the name of the default component you replace
  9. 9You need to Replace a default JS component, To use a custom implementation of an existing Magento JS component: Place the custom component source file in one of the --------- locations:
    (Select 2)
    1. ATheme JS files: /web/js or /_/web/js
    2. BModule view JS files:<module_dir>/view/frontend/web/js
    3. CModule view JS files: <module_dir>/web/js
    4. DTheme JS files: /view/frontend/web/js or /_/view/frontend/web/js
  10. 10By default, the Magento application uses the --- and ---to optimize the time of loading pages with included JavaScript files, and to manage dependencies of JavaScript resources.
    1. ARequireJS
    2. Bmodule loader
    3. CVueJs
    4. DAngualJS

Informationen

Beschreibung
Pool one: about 30 , This is my study Notes, MAGENTO 2 CERTIFIED JAVASCRIPT DEVELOPER PRACTICE TEST, Final Exam:60 Multiple Choice items 90 minutes to complete the exam Score of 63% or higher needed to pass Based on Magento Open Source (2.x) & Commerce (2.x), but applicable to those using any version of Magento 2.x
Sprache
English
Aufrufe
2.016
Schlagwörter
magento 2
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck