QAART-391: Fix for the insert link test to wait for the input to finish

please also change formatting to:
switch(linkCategory) {
[tab] case "New page":
[tab] [tab] pageCategoryIndex[NEWPAGEINDEX] = i;
[tab] [tab] break;