DragAndDrop with Protractor accross tabs ( or windows ) - selenium

I have 2 different web apps and I need to make automation test which cover this scenario:
I drag a picture from one app and paste it in another tab ( or window ) to other app.
There is no option to simulate with file upload because there is some logic when picture is dropped how they reference that image in both apps.
I did not find any solution which can drop outside of tab ( window ).
Any ideas?

you have to create a custom function to meet your goal.
Checkout: https://www.npmjs.com/package/html-dnd
With this package you can drag-drop on the same window, but if you extend the function and create a custom logic, for example:
onDragStart - element from window 1
{your logic to switch window}
OnDragEnd - element from window 2

Related

Additional custom page building hook for BuddyPress profile page

I want to create an additional page like in the picture below and I want to show the codes I want in the page, I researched but I couldn't get a result. What is the hook name I can do this?
https://prnt.sc/wccy4e
This gist shows how to add a simple nav tab + subnav.
If you want to load specific templates ( perhaps from a plugin ) into a custom nav screen, you need to use bp_register_template_stack, and the code becomes more complicated.
This is an example for adding a custom tab to groups and loading templates via bp_register_template_stack.

how to configure two sap fiori tiles target same application but each displaying different view of application as home page

I have created a custom fiori application and deployed it to abap repository.Now I have to create two tiles.
1.one for displaying the record.
2.other for creating the new record.
Both the pages(display and new) are created in different views in same application.
can I set the first page in first tile and second page in second tile as home page while launching,without creating the same copy of project again.
Another option is to have 2 differents target mapping parameters on the tiles and use this.getOwnerComponent().getComponentData().startupParameters to retrieve them.
This way you can read the parameter and choose what to do.
However as suggested by user6177399 the guidelines for edit and display view would not suggest that.

Display module fields in Sitefinity using conditions in the back end

I'm looking for a way to show module fields conditionally on the back end screen of Sitefinty.
For example, say I've created a module through module builder - and I have two fields: a checkbox and a text field.
I'd like the text field only to display to content editors only after they've checked the checkbox field. Ideally that checkbox could hide/show a handful of fields on the spot through the content entering process.
Is there a straightforward, maintainable way to go about this?
Currently using version 10.2, it'd be great to know how to accomplish
this via both the new and old UI.
Hoping there is an advanced setting I just don't know about, but
willing to go a JS approach as well.
Thanks!
After a little digging I've been able to find a working solution. Here's how I handled it:
Note: [module] and [section] assume your custom module name and section. If you didn't setup sections in backend screens and tweaks then all of the fields will be under MainSection
Step 1 - Add a custom script to the module in advanced settings.
Assuming this is a dynamic module...
Create a JS file in your project and reference it in advanced settings by going to:
Advanced settings > Dynamic Modules > Controls > [module] > Views > [Module]View > Scripts
Click Create New and point the script location to the JS file you created.
Step 2 - Add custom classes to your fields
Stay where you're at in advanced settings and navigate to the fields you've made. For example:
Advanced settings > Dynamic Modules > Controls > [module] > Sections > [Section] > Fields > [Field]
On this page scroll down to CSS Class and add a custom CSS class to this field
Step 3 - Add your custom Javascript
Sitefinity uses jQuery so I worked with that and set up some really basic JS based off the class names:
$(document).ready(function(){
$('.myTextBox').hide();
$('.myCheckbox input').on('change', function(){
var $this = $(this),
textBox = $('.myTextBox');
$this.is(':checked') ? textBox.show() : textBox.hide();
})
});
Note: the custom CSS class gets applied to the parent wrapper of the actual element
Now when a content editor goes to add a new content item to a module, checking that specific checkbox will show and hide the custom text box.
Besides the fact that this process seems a little over the top, there are a few other issues:
You have to set the call to your custom script on the edit and insert
view.
It doesn't take into account any validation.
With Sitefinity getting a backend UI upgrade, long term sustainability is questionable.
I'll leave this question unanswered for a while if there is a better/easier approach to this.

How to manage Two WindowedApplication in Flex?

Case:
1) There are two .mxml files (Windowed Application): one is Log-in(Active Window/ Start up Window) and other is Main Window.
2) Main Window has viewstack
3) On log-in successful, log-inHandler called from Main Window.
4) log-inHandler access viewstack id of Main Window.
5) But viewstack id shows null.
Question:
1) How to solve this case?
You should not use 2 Windowed Applications
Make your Login page as a MXMLComponent
Add the Login page as a new NativeWindow from your main App, so you can communicate with it.

How to create pagination in windows 8 METRO (C# / XAML) Application?

i want to create a pagination / paging for my listbox.
i have a list box , there will be for about 200 items showing up in my listbox ,
so i want to perform pagination on my list box and show 15 items per page , and when user presses next button it will be going to next page and when user presses previous button it will be going to previous page .
Please let me know , How can i implement this my application.
Thanks in Advance.
Here's what you are looking for:
Discussion:
http://social.msdn.microsoft.com/Forums/en-AU/winappswithcsharp/thread/9d3cadd3-dc95-4219-9f90-e1aae6ad25c8
DataFetchSize method
http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.listviewbase.datafetchsize.aspx
LoadMoreItemsAsync method:
http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.listviewbase.loadmoreitemsasync.aspx
IncrementalLoadingTrigger and IncrementalLoadingThreshold properties
http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.listviewbase.incrementalloadingtrigger.aspx
http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.listviewbase.incrementalloadingthreshold.aspx
You can see examples of using these here (though note that the sample was based on Windows 8 BUILD release and the apis have had some changes)
http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/e71b7036-4fb7-4963-a65d-5bcb9fd8f664
and take a look at Hamid's BUILD session that discusses these here:
http://channel9.msdn.com/Events/BUILD/BUILD2011/APP-517T