FRONT-END DEVELOPER TEST POOL-2 (MAGENTO 2 CERTIFIED PROFESSIONAL )

Descrição

POOL-2 30 question, This only my study notes, questions will NOT be found on the final exam. They might be similar. 60 questions 90mi 64% to pass Based on Magento Open Source (2.3) and Magento Commerce (2.3),
Miska Red
Quiz por Miska Red, atualizado more than 1 year ago
Miska Red
Criado por Miska Red mais de 5 anos atrás
1264
3

Resumo de Recurso

Questão 1

Questão
You 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)
Responda
  • Theme JS files: /web/js or /_/web/js
  • Module view JS files: <module_dir>/view/frontend/web/js
  • Module view JS files: <module_dir>/web/js
  • Theme JS files: /view/frontend/web/js or /_/view/frontend/web/js

Questão 2

Questão
You 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> ?
Responda
  • <default_component>: the name of the default component you replace
  • <custom_component>: the name of the custom component
  • <default_component>: the name of the custom component
  • <custom_component>: the name of the default component you replace

Questão 3

Questão
A merchant asks you to add frontend validation to their newsletter form. You notice the form has the following attributes: <form class="form newsletter” novalidate id="newsletter-validate-detail"> Which of the following choices will add frontend validation?
Responda
  • Add a validation object using data-mage-init attribute.
  • Add form_key input inside of form.
  • Remove the novalidate attribute from form.
  • Add the class mage-validate to form.

Questão 4

Questão
You need to add a custom block of HTML to the header of every page using a layout file in MyCompany/mytheme. Keeping upgradability in mind, how do you add the block?
Responda
  • Put your customization in MyCompany/mytheme/Magento_Theme/layout/default.xml
  • Keep track of your changes and apply them to Magento/Theme/layout/default.xml after upgrade
  • Put your customization in MyCompany/mytheme/layout/extend.xml
  • Include <extend file="Magento_Theme::default.xml"> in your MyCompany/mytheme/Magento_Theme/layout/default.xml

Questão 5

Questão
Without customization, what types are filtered through the magento2 directives parser? (2)
Responda
  • CMS blocks
  • CMS Pages
  • Module
  • Theme

Questão 6

Questão
You are creating a new Magento theme for a merchant. This theme will be included in the project's git repository.Keeping upgradeability in mind, where do you place the files and directories that pertain to this theme?
Responda
  • app/design/frontend/MyCompany/MyTheme/
  • vendor/mycompany/my-theme/
  • app/design/MyCompany/MyTheme/frontend/
  • lib/themes/frontend/MyCompany/MyTheme/

Questão 7

Questão
You are describing the design scheduling to a merchant. What options are available for you to customize when applying a design change in Content > Design Schedule? (Select 2)
Responda
  • Theme
  • Start/end dates
  • Layout Updates
  • Design change name

Questão 8

Questão
You are building a new theme for this purpose which three properties are set in theme.xml? (Select 3)
Responda
  • Parent theme
  • Theme preview image
  • Title of a theme
  • Theme area: frontend or adminhtml
  • Version of a theme

Questão 9

Questão
You are creating a uiComponent that is used on the checkout page that displays the customer's email address, with realtime updates as they change it How do you track the value of their email?
Responda
  • In your uiComponent's configuration, add: imports: { "customer-email:email" }
  • Add 'Magento_Checkout/js/view/form/element/email' to the dependencies for your uiComponent.
  • In requirejs-config.js add: { "MyCompany_MyModule/js/email-signup" : { "listens": { "Magento_Checkout/js/view/form/element/email" }}}
  • In your uiComponents configuration, add: exports: {"customer-email:email"}

Questão 10

Questão
Your Customise Theme for template files with the same name which following override rules apply? (select 3)
Responda
  • Themes should only be for applying changes to existing code.
  • Theme templates override module templates
  • Child theme templates override parent theme templates
  • New functionality should go into Theme specific to the use case

Questão 11

Questão
You are developing a German language theme for the Magento Marketplace named mytheme. In your Magento installation you have a third-party German language package installed. The theme “mytheme” already contains a mytheme/i18n/de_DE.csv file. The graphic designer wants you to rename the Add to Cart button to make the text shorter. Keeping upgradability in mind, where do you add the new string?
Responda
  • Add the string to mytheme/i18n/de_DE.csv
  • Override the Magento_Catalog/view/frontend/templates/product/view/addtocart.phtml template in mytheme and replace the string
  • Add the string to the third-party German language package.
  • Add the translation to the core_translate database table.

Questão 12

Questão
You have written a customer uiComponent implementation that connects with a phtml template that is output into a pages's source. How do u connect uiComponent's Knockout features with the HTML element?
Responda
  • Add data-bind="scope: 'your-uicomponent-name' " to your HTML element
  • Add targetElement: ".selector" to your uiComponent's defaults object
  • Add this.el =$('.selector'); to your uiComponent's constructor
  • Add link="uicomponents.your-uicomponent-name" to your HTML element

Questão 13

Questão
Which layout handles are always applied to a product page? (3)
Responda
  • catalog_product_prices
  • catalog_product_view
  • catalog_product_view_type_(product_type)
  • catalog
  • catalog_product_view_layout_(product layout update)

Questão 14

Questão
You are auditing a module that contains phtml file: $product=$block->getProduct(); for($i=0;$i<count($products); $i++){ echo $products[i]->getName() } To comply with magento templete standards, what do you change? (Select 2)
Responda
  • Change the { and } to : and endforeach; respectively
  • Change the for to foreach.
  • Change the $block->getProduct; to $block->getData('products');
  • Inside the for loop, add $product=$products[i]; & change the reference from $product[i] to $product

Questão 15

Questão
You need not use Common layout instructions Use layout instructions to customize your layout: What are the layout instructions <body></body> child ? (2)
Responda
  • <action><attribute> <block> <container>
  • <move> <referenceBlock> <referenceContainer>
  • <title> <meta> <link> <css> <script>
  • <html> <head> <body> <update>

Questão 16

Questão
You are reviewing Luma theme Magento Theme that inherits from blank theme What directories are found in themes? (3)
Responda
  • etc/
  • i18n/
  • web/
  • Observer/
  • Model/

Questão 17

Questão
You are working on a website that previous developer built on Magento, u've been taked with creating a form page for MyCompany_MyModule. MyCompany_MyModule contains following etc/frontend/routes.xml: <?xml version="1.0"?> <config> <router id="standard"> <route id="product_list" frontName="products"> <module name="MyComany_MyModule"/> </route> </router> </config> Controller is located in app/code/MyCompany/MyModule/Controller/Display/Grid.php. What is correct layout handle associated with this?
Responda
  • products_list_display_grid
  • category_products_display_grid
  • category_products_list_grid
  • category_products_view_grid

Questão 18

Questão
How to override an existing Magento 2 jQuery UI widget?
Responda
  • add My/Mod/view/frontend/requirejs-confg.js
  • add My/Mod/view/frontend/web/js/tabsmixin.js
  • edit lib/web/mage/list.js
  • extent vendor/magento/magento2-base/lib/web/mage/menu.js

Questão 19

Questão
You override price-utils.js specific method as below // My/Mod/view/frontend/js/price-utilsoverride.js defne([], function() { var updates = { formatPrice: function(amount, format, isShowSign){ return '00000';} }; return function(target) { return Object.assign(target, updates);} }); Where u add requirejs-confg.js in My_Mod?
Responda
  • My/Mod/view/requirejs-confg.js
  • My/Mod/frontend/view/requirejs-confg.js
  • My/Mod/templete/layout/requirejs-confg.js
  • My/Mod/web/requirejs-confg.js

Questão 20

Questão
You are reviewing XML head as : <?xml version="1.0"?> <page xmlns:xsi="http://www. w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/ Layout/etc/page_confguration.xsd"> <body>... What type of declaration does it mean?
Responda
  • uiComponent
  • Theme
  • RequirJS
  • KnockoutJs

Questão 21

Questão
Where are the CSS merging and minification options found?
Responda
  • Stores > Configuration > Advanced > Developer > JavaScript Settings >Merge JavaScript Files
  • Content > Design >Theme>Advanced >JavaScript Settings>Merge JavaScript Files>Yes
  • Stores > Configuration >Developer>Advanced >JavaScript Settings>Merge JavaScript Files>Yes
  • Stores > Configuration > Advanced > Developer > CSS Settings

Questão 22

Questão
You are working with high level magento partner company developing a new theme that no parent theme exists & Also use to composer installation Which file are required in a theme? Select all that are required.(3)
Responda
  • /registration.php
  • /theme.xml
  • /etc/view.xml
  • /composer.json
  • /web/js
  • i18n/en_US.csv

Questão 23

Questão
Which of the following is a Knockout virtual element?
Responda
  • <!-- ko foreach: payments --><li data-bind="text: $data.name"></li> <!-- /ko -->
  • <li class="heading">My heading</li>
  • <div data-bind="payments: payments">
  • <div data-init="payments: payments">

Questão 24

Questão
What is Magento 2 Themes improvements than 1 ? such as the use of_____________________ to name a few.(Select 4)
Responda
  • containers
  • better modularity
  • better extensibility
  • more control over settings
  • Auto Bug Solving

Questão 25

Questão
You have tasked with creating _theme.less is for redefining to your theme globally, Which below are correct ? (3)
Responda
  • create variables
  • defining new variables
  • mixins that apply
  • create block
  • create Weget

Questão 26

Questão
You want to use Magento 2 library in your theme , Where is UI library has some built-in documentation & how access?
Responda
  • in: /lib/web/css/source/docs. It's possible to access it on the frontend of your site with some changes to .htaccess,
  • in: /module/web/css/source/docs. It's possible to access it on the frontend of your site with some changes to .htaccess,
  • in: /theme/web/css/source/docs. It's possible to access it on the frontend of your site with some changes to .htaccess,
  • in: /plugin/web/css/source/docs. It's possible to access it on the frontend of your site with some changes to .htaccess,

Questão 27

Questão
Where is UI Library variables defined n Magento Blank?
Responda
  • Each of LESS files has extensible mixins that are used to define the look of global elements , using default variables defined in: /lib/web/css/source/lib/variables.
  • Each of JS files has extensible mixins that are used to define the look of global elements , using default variables defined in: /lib/web/js/source/lib/variables.
  • Each of PHTML files has extensible mixins that are used to define the look of global elements , using default variables defined in: /lib/web/html/source/lib/variables.
  • Each of php files has extensible mixins that are used to define the look of global elements , using default variables defined in: /lib/web/php/source/lib/variables.

Questão 28

Questão
You are troubleshooting a US website that sells discs of sandpaper. There is Js syntax error in this code:"unknown character',' ". Template: <sc>var productName= "<?=$blcok->get </sc> Which renders to: < <sc> var productName = "SuperSandpaper disc, 6 ", 100 grit"; </sc>
Responda
  • Change the $block->getProductName(); to $block->escapeJs($block->getProductName());
  • Change the var productName ="<?=$block->getproductName; ?> to var productName = <<<PRODUCTNAME <?=$block->getproductName; ?> PRODUCTNAME;
  • Change the $block->getProductName(); to $block->escapeHtml($block->getProductName());
  • Change the $block->getProductName(); to $block->escapeChar($block->getProductName());
  • Modify the block's getProductName() methods to add a slash in front of the result

Questão 29

Questão
What is the custom LESS directive added by Magento in order to implement a fallback system in the import mechanism?
Responda
  • //@magento_import
  • //@mage_import
  • //@magento_imports
  • //@mage_imports

Questão 30

Questão
What is the correct way to Combinator indents add spaces before and after combinators. Less coding standard?
Responda
  • .nav + .bar { color: @bar__color; }
  • .nav+.bar { color: @bar__color; }
  • .nav +.bar { color: @bar__color; }
  • .nav+ .bar { color: @bar__color; }

Questão 31

Questão
If you need to override a module layout, where would you put the layout file?
Responda
  • <module_dir>/view/frontend/layout/<layout1>.xml
  • <theme_dir>/<Namespace>_<Module>/layout/<layout1>.xml
  • <Namespace>_<Module>/<theme_dir>/layout/<layout1>.xml
  • <theme_dir>/view/frontend/layout/<layout1>.xml

Questão 32

Questão
Templates are stored in the following locations:
Responda
  • <module_dir>/view/frontend/templates/<path_to_templates>
  • <theme_dir>/<Namespace>_<Module>/templates/<path_to_templates>
  • <theme_dir>/<Namespace>_<Module>/view/frontend/templates/<path_to_templates>
  • <theme_dir>/<Namespace>_<Module>/view/templates/<path_to_templates>

Questão 33

Questão
Using PHP short tags in template PHTML files
Responda
  • <?= $block->getAdjustmentsHtml() ?>
  • <?php echo $block->getAdjustmentsHtml() ?>
  • <?php echo $block->returnAdjustmentsHtml() ?>
  • <?= $block->returnAdjustmentsHtml() ?>

Questão 34

Questão
Customize header and footer templates?
Responda
  • <Magento_Email_module_dir>/view/frontend/email/header.html
  • <Magento_Email_module_dir>/view/frontend/email/footer.html
  • <Magento_Email_module_dir>/view/frontend/email/default.html
  • <Magento_Email_module_dir>/view/frontend/email/emailBody.html

Questão 35

Questão
Media queries in Magento default themes
Responda
  • Media queries @media-common, max screen__s and max screen__m will be added to styles-m.css.
  • Media queries min screen__m and min screen__l will be added to styles-l.css.
  • Media queries min screen__m and min screen__l will be added to style-l.css.
  • Media queries @media-common, max screen__s and max screen__m will be added to style-m.css.

Questão 36

Questão
You are Creating a mobile-specific theme <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <remove src="css/styles-l.css" /> </head> </page> Where you add this file to get your own style?
Responda
  • <theme_dir>/Magento_Theme/layout/default_head_blocks.xml
  • <theme_dir>/Magento_Theme/layout/frontend/default_head_blocks.xml
  • <theme_dir>/Magento_Theme/template/default.phtml
  • <theme_dir>/Magento_Theme/layout/html/header.xml

Questão 37

Questão
To call a mixin with parameter values different from default, set these values when calling the mixin, like in the following example: Which correct with specifying any parameters?
Responda
  • .example-button { .lib-button( @_button-padding: @button-padding, @_button-color: #fff, @_button-color-hover: #ccc ); }
  • .breadcrumbs { .lib-breadcrumbs(); }
  • .example-button { .lib-button(); }
  • .breadcrumbs { .lib-breadcrumbs(); .lib-button(); }

Questão 38

Questão
Example of the accordion initialization with the active option specified: Which is correct? (Select 2)
Responda
  • $("#element").accordion({ active: "0 1"});
  • $("#element").accordion({ active: [0,1]});
  • $("#element").accordion.active: (0 1);
  • $("#element").accordion.active: [0, 1];

Questão 39

Questão
You are going to create widget named Samplewidget. where you declare widget?
Responda
  • etc/widget.xml
  • etc/di.xml
  • etc/config.xml
  • etc/system.xml

Questão 40

Questão
What happens if you use a {{block id="my_id"}} template directive like this?
Responda
  • The Cms block with the identifier "my_id" is outputted
  • An empty block with the class \Magento\Framework\View\Element\Template and a name of "my_id" is created
  • There is an error because the block id must be numeric
  • There is an error because the block id can not contain special character(_)

Semelhante

Bloc testing
Sanny Lin
Backend y Frontend
Carlos Alberto Castillo Cortes
história do brasil -periodo colonial
Day Almeida
SUS E ATENÇÃO A SAÚDE NO BRASIL
danieleyuri
Raciocínio Lógico Simulado Concurso
Roberta Souza
Expressões em inglês #2
Eduardo .
Phrasal Verbs - Inglês #11
Eduardo .
Simulado Matemática
Marina Faria
Controle de Constitucionalidade
GoConqr suporte .
Revisão de Direito Penal
GoConqr suporte .
ADJECTIVE + PREPOSITION
liviamialaret