what is the best practice to store the locators at one common location for protractor? - protractor

I could not find a good example showing the correct or effective way to store the locators for easy organization/modification. Can someone point me to one?
Preferably a config file or another .js file.
Again an example will greatly help.
Thanks!

The "best practice" is to put your locators in a page object.
example: https://github.com/angular/protractor/tree/master/website/test/e2e
Docs: http://angular.github.io/protractor/#/page-objects

I'll second the use of page objects and have some additional examples on GitHub...

Related

Magnolia CMS - Converting a page variant to the default page

I have a page that has multiple variants on my Magnolia CMS. I want to convert one of those variants as the default page. I don't think there is an out-of-the-box automated solution for that. The simplest approach that I can think of is to copy the components from the new variant and paste them onto the default page but that is a tedious process as I have a lot of components on the new variant. Instead of redoing all the tasks on the default page, is there an easy way to convert a variant to the default page?
Thanks in advance!
That is not a product feature currently. We would welcome you to make a suggestion here - ideally including some details about why you want it or what problems it is causing you.
https://portal.productboard.com/magnolia/1-magnolia-roadmap/tabs/1-considering/submit-idea
Cheers, Topher
The simplest approach that I can think of is to copy the components from the new variant and paste them onto the default page but that is a tedious process
CopyUtil might help with that (you probably need to remove the existing nodes first).

Sightly syntax to retrieve crx/de properties in jsp/html page

I would like to retrieve some properties e.g. jcr:created using Sightly or any related syntax for the panel component in AEM adaptive forms. 1
The previous Sighlty syntaxes that I have attempted to retrieve the crx/de properties include:
${properties.jcr:created}
${pageProperties\[jcr:created\].getTime.toString}
${guidePanel.jcr:created}
${resource.jcr:created}]
I have tried the following syntaxes but unable to retrieve the value from the property and in worst cases, the component may not be rendered on screen.
I have looked up on Adobe forum sites and past stackoverflow questions that other people may have asked. I have tried the solutions and given answers but was unable to achieve the result. I would greatly appreciate for any help or sharing of applicable knowledge if you have encountered similar issues or previously attempted to solve similar problems. Thank you!
You can always create Use class in Java or Javascript to access these properties, it's cleaner and testable. Better than that, you can use Sling Models which are more readable and easier to implement, here is a good presentation about it https://www.slideshare.net/accunitysoft/understanding-sling-models-in-aem
Properties of resources are readable without any extra definitions needed.
So you might want to check what resource is handled in your component by adding this:
${resource.path}
Then you can check the returned path in CRXDE if there really is a jcr:created property available at this path - which should be the case if you are accessing a resource that has a proper sling resource type. Then this call should give a valid return value:
${resource.path} ___ created:
${properties.jcr:created.getTime.toString}
If the path is not displayed as well, then it would help if you could post
the repo path of the content resource you are processing
the sling:resourceType
the path to the component's ht(m)l file that you are using

Zend frame work compare two files

I want compare two text files using zend_frame work mvc pattern model.
How can i do that, it is possible perform this task?
If yes means please provide me some idea about this?
Not sure Zend will do this job.
Let's take a look to Horde_Text_Diff PEAR package.

Form file upload

I am building some forms in qooxdoo and need to add a file upload section.
Curious to know if anyone has an elegant solution to this before I get hacky with it?
Thanks!
Not sure whether you consider it elegant, but there is the UploadWidget contrib.

List of values I can specify in Zend application.ini configuration file?

I am using the Zend Framework and I cannot locate in the documentation the values I can specify in the application.ini file. Does anyone have a link to where I could see them?
Thanks,
Darren
There is no exhaustive list, since you can specify arbitrary configuration values that are specific to your app.
The "built-in" stuff is mostly about configuting build-in resource plugins, so a good source of information on those might help you. The manual describes them in fair detail.