Search Results

Search found 14022 results on 561 pages for 'coded ui tests'.

Page 5/561 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Learning about tests for junior programmers

    - by RHaguiuda
    I`m not sure if its okay to ask it on stackoverflow. Ive been reading a log about tests, unit tests, tests frameworks, mocks and so on, but as a junior programmer I dont know anything about tests, not even where to start! Can anyone explain to young programmers about tests, how they`re run, where and what to test, what is unit testing, integration testing, automated tests? How much to test? And more important: how much test is enough? I belive this would be very helpfull. If possible indicate a few books too about these subjects. Thanks

    Read the article

  • kendo ui filtering the grid table, need some idea

    - by cool_spirit
    I want to filter the table by last name, but cant work, here is my code in controller public JsonResult Filtering() { HealthContext rc = new HealthContext(); var last = rc.Profiles.Select(lastt => new SelectListItem { Text = lastt.LastName, Value = lastt.Id.ToString() }).ToList(); return Json(last.ToList(), JsonRequestBehavior.AllowGet); } in view <script type="text/x-kendo-template" id="template"> <div class="toolbar"> <label class="category-label" for="Last name"> by last name:</label> <input type="search" id="LastName" style="width: 230px"></input> </div> </script> and also <script> $(document).ready(function() { $("#grid").kendoGrid({ dataSource: { transport: { read: { url: "/Profiles/GetJsonData", dataType: "json" } }, pageSize: 10, }, toolbar: kendo.template($("#template").html()), height: 250, filterable: true, sortable: true, pageable: true, defaultSorting: 'LastName ASC', columns: [{ field: "Id", filterable: false }, { field: "FirstName", title: "First Name", width: 100, }, { field: "LastName", title: "Last Name", width: 200 }, { field: "Gender", title: "Gender" } ] }); var dropDown = grid.find("#LastName").kendoDropDownList({ dataTextField: "LastName", dataValueField: "Id", autoBind: false, optionLabel: "All", dataSource: { severFiltering: true, transport: { read: { url: "/Profiles/Filtering", dataType: "json" } }, }, change: function() { var value = this.value(); if (value) { grid.data("kendoGrid").dataSource.filter({ field: "Id", operator: "eq", value: parseInt(value) }); } else { grid.data("kendoGrid").dataSource.filter({}); } } }); }); </script> so the problem is the drop down list is not show up as well as the value/ data, any idea guys?

    Read the article

  • jquery ui autocomplete problem

    - by Roger
    Hi, i've got a select box containing countries, and when one is selected, i want my autocomplete data for the city field to load via ajax. here's my code: // Sets up the autocompleter depending on the currently // selected country $(document).ready(function() { var cache = getCities(); $('#registration_city_id').autocomplete( { source: cache } ); cache = getCities(); // update the cache array when a different country is selected $("#registration_country_id").change(function() { cache = getCities(); }); }); /** * Gets the cities associated with the currently selected country */ function getCities() { var cityId = $("#registration_country_id :selected").attr('value'); return $.getJSON("/ajax/cities/" + cityId + ".html"); } This returns the following json: ["Aberdare","Aberdeen","Aberystwyth","Abingdon","Accrington","Airdrie","Aldershot","Alfreton","Alloa","Altrincham","Amersham","Andover","Antrim","Arbroath","Ardrossan","Arnold","Ashford","Ashington","Ashton-under-Lyne","Atherton","Aylesbury","Ayr",... ] But, it doesn't work. When i start typing in the city box, the style changes so the autocompleter is doing something, but it won't display this data. If i hard-code the above it works. Can anyone see what's wrong? Thanks

    Read the article

  • JQuery UI sortable: restore position based on some condition

    - by dafi
    I call sortable.stop() to make an ajax call to store some data after drag&drop operation. When the ajax call returns an error (application logic error or net problem) I want to move the dragged element to its original/start position, how can I achieve it? The scenario should be user drags A to B the sortable.stop() event is called, it triggers an ajax call the ajax call returns an error inside the stop() event we get the ajax error move A to its original position user again move A to B everything is ok A remains in its new position in B Steps 6-8 are shown to clarify a successive drag can be done and previous error must be forgotten

    Read the article

  • jQuery UI tabs link for _blank webpage

    - by Megawolt
    Hi fellas, In our format some pages must be in Tabs that's ok. But some of them must be open in a blank page... So How can i do that. I have try ; $('#tablar #tabs ul li a').filter(function() { return $(this).attr('rel') == 'ex'; }) .unbind() .click(function(e) { location.href = this.href; e.preventDefault(); }); But not working...

    Read the article

  • background image for jquery ui dialog buttons

    - by mcgrailm
    is it possible to give a button a background image really i have an image that I want to use for a button and would be nice if they stayed in place like the default buttons. right now I just have them inside the dialog but the rest of the content is dynamic and I don't want them to disappear when the scroll bar appears

    Read the article

  • jQuery Resizable() UI Problem

    - by OneNerd
    In general, resizable() works fine. Here is where I am getting into an issue. I have a div that contains some resizable items that work fine (resizable() applied to them at some point). user can save items for later view (the innerHTML of the div gets saved into a JavaScript array, then div gets cleared so they can do something else) When items get placed back onto div (from array) -- I do a $('#divname').append(arrayname[i]); -- items are no longer resizable (although visually they have the resizable classes/handle on them) Here is what I have tried so far (none of which have worked): After append() line, I re-initialize the resizable -- $('#items').resizable(); After append() line, remove then re-add resizable -- $('#items').resizable('destroy').resizable(); Any help is appreciated - thanks.

    Read the article

  • jQuery UI AutoComplete remote json response question

    - by Greg-J
    I was using geonames.org to autocomplete city and state but found it to be far too slow to be reliable. My code is as follows, and does work (wait about 10 seconds to see the autocomplete results) Old (working) code here: http://jsbin.com/umewo3/2/edit Now I am using YQL as they provide a much quicker response. The issue is that I don't seem to understand how to properly map the response. You can see I am sending a well formed request, and getting the response back - but I am somehow not dealing with the response properly. New (broken) code here: http://jsbin.com/aqoke3/2/edit Any and all help appreciated.

    Read the article

  • JQuery UI question, how do you add variables into the dialog box

    $('.openDialog').click(function(event){ var width=$(this).attr('width'); var height=$(this).attr('height'); alert(width + ' ' + height); event.preventDefault(); $("#dialog").dialog({autoOpen: false, modal: true}); $('#dialog').dialog('option', 'width', width); $('#dialog').dialog('open'); $('#dialog p').load('http://pagetoload.com/page.html .content'); }); As you can see above i'm trying to open a dialog box with a passed in parameter of width and height, however when I try and pass in the value of width on this line: $('#dialog').dialog('option', 'width', width); it doesn't work, any ideas why or how to get around that? Thanks

    Read the article

  • Toggle jQuery-UI widgets

    - by cf_PhillipSenn
    I have: <div class="ui-widget"> <div class="ui-widget-header"> <span class="ui-icon ui-icon-circle-triangle-n">My Menu</span> </div> <ul class="ui-widget-content"> <li>Menu Item 1</li> <li>Menu Item 2</li> <li>Menu Item 3</li> </ul> </div> My jQuery is: $('.ui-widget-header').click(function() { $('.ui-widget-header+ul').toggle('slow'); }); Q: How do I toggle classes between ui-icon-circle-triangle-n and ui-icon-circle-triangle-s as the user clicks on .ui-widget-header?

    Read the article

  • sortable list using jquery ui not passing updated list order

    - by Matthew Berman
    I am following the sortable lists railscast and got everything working except when I sort, the same (original) order gets passed to the update method each time, so it doesn't update the true order. Here's the code: In the view: %tbody#lineup{"data-update-url" => sort_lineups_url} - @lineup.pieces.each_with_index do |piece, index| = content_tag_for :tr, piece do = render 'piece', :piece => piece, :index => index and pieces.js.coffee: jQuery -> $('#lineup').sortable( axis: 'y' update: -> $.post($(this).data('update-url'), $(this).sortable('serialize')) ); sort and show methods of lineupscontroller: def show @lineup = Lineup.find_by_user_id(current_user.id) @pieces = @lineup.pieces.order("position") end def sort params[:piece].each_with_index do |id, index| current_user.lineup.pieces.update_all({position: index+1}, {id: id}) end render nothing: true end and the update request: Started POST "/lineups/sort" for 127.0.0.1 at 2012-06-24 20:06:14 -0700 Processing by LineupsController#sort as */* Parameters: {"piece"=>["8", "2", "1", "4", "3", "7"]} User Load (0.4ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 2 LIMIT 1 Lineup Load (0.6ms) SELECT `lineups`.* FROM `lineups` WHERE `lineups`.`user_id` = 2 LIMIT 1 SQL (2.9ms) UPDATE `pieces` INNER JOIN `piece_lineups` ON `pieces`.`id` = `piece_lineups`.`piece_id` SET `position` = 1 WHERE `piece_lineups`.`lineup_id` = 3 AND `pieces`.`id` = 8 SQL (0.6ms) UPDATE `pieces` INNER JOIN `piece_lineups` ON `pieces`.`id` = `piece_lineups`.`piece_id` SET `position` = 2 WHERE `piece_lineups`.`lineup_id` = 3 AND `pieces`.`id` = 2 SQL (0.6ms) UPDATE `pieces` INNER JOIN `piece_lineups` ON `pieces`.`id` = `piece_lineups`.`piece_id` SET `position` = 3 WHERE `piece_lineups`.`lineup_id` = 3 AND `pieces`.`id` = 1 SQL (0.5ms) UPDATE `pieces` INNER JOIN `piece_lineups` ON `pieces`.`id` = `piece_lineups`.`piece_id` SET `position` = 4 WHERE `piece_lineups`.`lineup_id` = 3 AND `pieces`.`id` = 4 SQL (0.6ms) UPDATE `pieces` INNER JOIN `piece_lineups` ON `pieces`.`id` = `piece_lineups`.`piece_id` SET `position` = 5 WHERE `piece_lineups`.`lineup_id` = 3 AND `pieces`.`id` = 3 SQL (0.5ms) UPDATE `pieces` INNER JOIN `piece_lineups` ON `pieces`.`id` = `piece_lineups`.`piece_id` SET `position` = 6 WHERE `piece_lineups`.`lineup_id` = 3 AND `pieces`.`id` = 7 Rendered text template (0.0ms) so each time i drag+drop the list, it sends the same order again. what am I doing wrong that the params isn't passing the right, updated order? Completed 200 OK in 2757ms (Views: 1.0ms | ActiveRecord: 6.7ms)

    Read the article

  • Change the Default Number of Rows of Tiles on the Windows 8 UI (Metro) Screen

    - by Lori Kaufman
    By default, Windows 8 automatically sets the number of rows of tiles to fit your screen, depending on your monitor size and resolution. However, you can tell Windows 8 to display a certain number of rows of tiles at all times, despite the screen resolution. To do this, we will make a change to the registry. If you are not already on the Desktop, click the Desktop tile on the Start screen. NOTE: Before making changes to the registry, be sure you back it up. We also recommend creating a restore point you can use to restore your system if something goes wrong. HTG Explains: Why Do Hard Drives Show the Wrong Capacity in Windows? Java is Insecure and Awful, It’s Time to Disable It, and Here’s How What Are the Windows A: and B: Drives Used For?

    Read the article

  • Creating user UI using Flixel

    - by Jamie Read
    I am new to game development but familiar with programming languages. I have started using Flixel and have a working Breakout game with score and lives. What I am trying to do is add a Start Screen before actually loading the game. I have a create function that adds all the game elements to the stage: override public function create():void // all game elements { How can I add this pre-load Start Screen? I'm not sure if I have to add in the code to this create function or somewhere else and what code to actually add. Eventually I would also like to add saving, loading, options and upgrades too. So any advice with that would be great. Here is my main game.as: package { import org.flixel.*; public class Game extends FlxGame { private const resolution:FlxPoint = new FlxPoint(640, 480); private const zoom:uint = 2; private const fps:uint = 60; public function Game() { super(resolution.x / zoom, resolution.y / zoom, PlayState, zoom); FlxG.flashFramerate = fps; } } } Thanks.

    Read the article

  • Add autoFill capabilities to jQuery-UI 1.8.1

    - by rockinthesixstring
    here's what I currently have, unfortunately I cannot seem to figure out how to get autoFill to work with jQuery-UI... It used to work with the straight up Autocomplete.js <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js" type="text/javascript"></script> <script src="http://jquery-ui.googlecode.com/svn/tags/latest/external/jquery.bgiframe-2.1.1.js" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/i18n/jquery-ui-i18n.min.js" type="text/javascript"></script> <script language="javascript" type="text/javascript"> var thesource = "RegionsAutoComplete.axd?PID=3" $(function () { function log(message) { $("<div/>").text(message).prependTo("#log"); $("#log").attr("scrollTop", 0); } $.expr[':'].textEquals = function (a, i, m) { return $(a).text().match("^" + m[3] + "$"); }; $("#birds").autocomplete({ source: thesource, change: function (event, ui) { //if the value of the textbox does not match a suggestion, clear its value if ($(".ui-autocomplete li:textEquals('" + $(this).val() + "')").size() == 0) { $(this).val(''); } else { log(ui.item ? ("Selected: " + ui.item.value + " aka " + ui.item.id) : "Nothing selected, input was " + this.value); } } }).live('keydown', function (e) { var keyCode = e.keyCode || e.which; //if TAB or RETURN is pressed and the text in the textbox does not match a suggestion, set the value of the textbox to the text of the first suggestion if ((keyCode == 9 || keyCode == 13) && ($(".ui-autocomplete li:textEquals('" + $(this).val() + "')").size() == 0)) { $(this).val($(".ui-autocomplete li:visible:first").text()); } }); }); </script> I've used the answer here to get the mustMatch working, but unfortunately if I "tab" away from the input box, I get the "Nothing selected" response instead of an Value and ID. Does anyone know how to extract the ID out of the autocomplete when you don't actually select the field?

    Read the article

  • In IE8, jquery-ui's dialog set the height of its contents to zero. How can I fix this?

    - by brahn
    I am using jquery UI's dialog widget to render a modal dialog in my web application. I do this by passing the ID of the desired DOM element into the following function: var setupDialog = function (eltId) { $("#" + eltId).dialog({ autoOpen: false, width: 610, minWidth: 610, height: 450, minHeight: 200, modal: true, resizable: false, draggable: false, }); }; Everything works just fine in Firefox, Safari, and Chrome. However, in IE 8 when the dialog is opened only the div.ui-dialog-titlebar is visible -- the div.ui-dialog-contents are not. The problem seems to be that while in the modern browsers, the div.ui-dialog-contents has a specific height set in its style, i.e. after opening the dialog, the resulting HTML is: <div class="ui-dialog-content ui-widget-content" id="invite-friends-dialog" style="width: auto; min-height: 198px; height: 448px">...</div> while in IE8 the height style attribute is set to zero, and the resulting HTML is: <div class="ui-dialog-content ui-widget-content" id="invite-friends-dialog" style="min-height: 0px; width: auto; height: 0px">...</div> What do I need to do to get the height (and min-height) style attributes set correctly?

    Read the article

  • Disable selected automated tests at runtime

    - by squig
    Is is posable to disable selected automated tests at runtime? I'm using VSTS and rhino mocks and have some intergation tests that require an external dependancy to be installed (MQ). Not all the developers on my team have this installed. Currently all the tests that require MQ inherit from a base class that checks if MQ is installed and if is not sets the test result to inconclusive. This works as it stops the tests from running, but marks the test run as unsuccseessful and can hide other failures. Any ideas?

    Read the article

  • Integration tests in Continuous Integration environment: Database and filesystem state

    - by dario_ramos
    I'm trying to implement automated integration tests for my application. It's a very complex monster. You could say that its database and part of the filesystem are part of its state, because it saves image files in the hard drive, and references to those in the DB. The software needs all those, in a coherent state, to work properly. Back to writing tests: To run any relevant test, I need some image files in the filesystem, and certain records filled in the database. I thought of putting all of these in a separate folder called TestEnvironmentData in the repository, and retrieving them from the Continuous Integration Server (Team City), but a colleague said the repo is quite full as it is, and that I should set up a special directory, and databases, only in the Continuous Integration server. I don't like that because the tests success depend on me manually mantaining stuff in the server, and restoring initial state before every test becomes cumbersome. What do you guys do when you need to write integration tests for an app like this? The main goal is having an automated test harness to approach a large scale refactoring. There's lots of spaghetti code and the app's current architecture is hardly unit testable, that's why I decided on integration tests first. Any alternative approach is welcome.

    Read the article

  • How to organize integrity tests and code unit tests?

    - by karlthorwald
    I have several files with code testing code (which uses a "unittest" class). Later I found it would be nice to test database integrity also. I put this into a separate directory tree. (Things like the keys have correct format, parent and child nodes are pointing correctly and such.) I use the same unittest class for the integrity tests. Now I wonder if it makes really sense to keep this separate. To test the integrity of data I often duplicate parts of code that I use to test the code that handles the data. But it is not the same. The code tests use test databases (that get deleted after each test) and the integrity tests connect to the live data and analyze it. The integrity tests I want to call from cron and send an alarm if something happens in the live database. How would you handle that? Are there standards for such a setup? What is your experience? My tendency is to put everything in the same file, which would result in the code tests also being executed by the cron on the production environment.

    Read the article

  • jquery ui drag and drop showing feedback

    - by sea_1987
    Hi there, I have some drag and drop functionality on my website, I am wanting to hightlight the area that is droppable with a chage in border color when the draggable element is clicked/starting to be dragged. If the click/or drag stops I want the border of the droppable element to change back to its origianl state, I currently have this code, but it does not work very well. $(".drag_check").draggable({helper:"clone", opacity:"0.5"}); $(".drag_check").mousedown(function() { $('.searchPage').css("border", "solid 3px #00FF66").fadeIn(1000); }); $(".drag_check").mouseup(function(){ $('.searchPage').css("border", "solid 3px #E2E5F1").fadeIn(1000); }) $(".searchPage").droppable({ accept:".drag_check", hoverClass: "dropHover", drop: function(ev, ui) { var droppedItem = ui.draggable.children(); cv_file = ui.draggable.map(function() {//map the names and values of each of the selected checkboxes into array return ui.draggable.children().attr('name')+"="+ui.draggable.children().attr('value'); }).get(); var link = ui.draggable.children().attr('name').substr(ui.draggable.children().attr('name').indexOf("[")+1, ui.draggable.children().attr('name').lastIndexOf("]")-8) $.ajax({ type:"POST", url:"/search", data:ui.draggable.children().attr('name')+"="+ui.draggable.children().val()+"&save=Save CVs", success:function(){ window.alert(cv_file+"&save=Save CVs"); $('.shortList').append('<li><span class="inp_bg"><input type="checkbox" name="remove_cv'+link+'" value="Y" /></span><a href="/cv/'+link+'/">'+link+'</a></li>'); $('.searchPage').css("border", "solid 3px #E2E5F1").fadeIn(1000); }, error:function() { alert("Somthing has gone wrong"); } }); } });

    Read the article

  • How to organize live data integrity tests and code unit tests?

    - by karlthorwald
    I have several files with code testing code (which uses a "unittest" class). Later I found it would be nice to test database integrity also. I put this into a separate directory tree. (Things like the keys have correct format, parent and child nodes are pointing correctly and such.) I use the same unittest class for the integrity tests. Now I wonder if it makes really sense to keep this separate. To test the integrity of data I often duplicate parts of code that I use to test the code that handles the data. But it is not the same. The code tests use test databases (that get deleted after each test) and the integrity tests connect to the live data and analyze it. The integrity tests I want to call from cron and send an alarm if something happens in the live database. How would you handle that? Are there standards for such a setup? What is your experience? My tendency is to put everything in the same file, which would result in the code tests also being executed by the cron on the production environment.

    Read the article

  • jQuery UI Rang Slider show divs based on selected range

    - by andi_sf
    I have set up a range slider that should show/hide divs based on their range values - meaning if the range of the one specifies in the div falls into the selected range in the slider it should show - the others hide. Somehow it does not work correctly - if anybody could help that would be greatly appreciated. My code so far: $("#slider").slider({ range: true, min: 150, max: 280, step: 5, values: [150, 280], slide: function(event, ui) { $("#amount").val('Min. Value' + ui.values[0] + ' - Max. Value' + ui.values[1]); }, change: function(event, ui) { $('#col-2 div').each(function(){ var valueS = parseInt($(this).attr("class")); var valueX = parseInt($(this).attr("title")); if (valueS < ui.values[0] && valueX <= ui.values[1] || valueS ui.values[0] && valueX = ui.values[1] ) { $(this).stop().animate({opacity: 0.25}, 500) } else { $(this).stop().animate({opacity: 1.0}, 500) $("#amount").val('Min. Value' + ui.values[0] + ' - Max. Value' + ui.values[1]); } }); } }); $("#amount").val('Min. Value' + $("#slider").slider("values", 0) + ' - Max. Value' + $("#slider").slider("values", 1)); }); I have also posted a sample at: http://www.webdesigneroakland.com/slider/444range_slider.html

    Read the article

  • Creating parallel selenium tests in C# and using Nunit as the runner application

    - by damianmartin
    I am writing a new test suite for the company to test a very complex ASP.NET application which is heavily AJAX driven. We have decided to use Selenium (Grid & Remote Control) and Nunit to run these tests. The actually tests are dynamically created at run time from a spreadsheet. Each Column in an excel spreadsheet relates to a new test and each row relates to a selenium command (but in plain English and the dll converts this into Selenium code). My problem i have at the moment is getting the tests running in parallel. There will be 1000+ tests so it is too time consuming to have 1 test run at a time. Selenium Grid and Selenium Remote Control(s) are setup correctly because I can run there demo. From what i have read I need to use Punit but i can not find any documentation on what a test in punit should look like. Nunit tests are [SetUp] [TearDown] [Test]. Can anyone point me in the right direction. Thanks in advance.

    Read the article

  • How do I force jquery to center an element when it snaps to another container using the draggable method?

    - by David
    Here's my script. I want some square-shaped draggable objects (in this case just td boxes with numbers in them) to be able to snap to some empty table cells and snap to the center of those cells (empty td boxes), not the top or bottom of those cells, which is what is seems to do by default. <script type="text/javascript"> $(document).ready(function () { $(".inputs div").draggable( { snap: ".spaces" } ); }); </script>

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >