2 * Unit Test: multibuttonentry
4 * Kangsik Kim <kangsik81.kim@samsung.com>
8 module("Multibuttonentry");
10 var unit_multibuttonentry = function ( widget, type ) {
17 multibuttonentry = widget.multibuttonentry();
18 ok(multibuttonentry.length > 0, "Create");
21 equal( multibuttonentry.multibuttonentry("length"), 0 ,"API : length ");
24 multibuttonentry.multibuttonentry("add", "string1");
25 equal(multibuttonentry.multibuttonentry("length"), 1, "API: add('string1') ");
26 multibuttonentry.multibuttonentry("add", "string2");
27 equal(multibuttonentry.multibuttonentry("length"), 2, "API: add('string2') ");
28 multibuttonentry.multibuttonentry("add", "string3");
29 equal(multibuttonentry.multibuttonentry("length"), 3, "API: add('string3') ");
32 multibuttonentry.multibuttonentry("select", 1);
33 outputText = multibuttonentry.multibuttonentry("select");
34 equal( outputText, "..." , "API : select ( 1 )");
37 multibuttonentry.multibuttonentry("focusOut");
38 status = multibuttonentry.find(".ui-multibuttonentry-desclabel").length === 1 ? true : false;
39 equal( status, true , "API : focusOut ");
42 multibuttonentry.multibuttonentry("focusIn");
43 status = multibuttonentry.find(".ui-multibuttonentry-desclabel").length === 1 ? true : false;
44 equal(status, false, "API : focusIn ");
47 multibuttonentry.multibuttonentry("remove", 0);
48 equal(multibuttonentry.multibuttonentry("length"), 2 , "API : remove(0)");
51 multibuttonentry.multibuttonentry("remove");
52 equal( multibuttonentry.multibuttonentry("length"), 0 ,"API : remove");
55 inputText = "multibuttonentry";
56 multibuttonentry.multibuttonentry( "inputText", inputText );
57 outputText = multibuttonentry.multibuttonentry( "inputText" );
58 equal(outputText, inputText, "API : input('" + outputText + "')");
61 test( "Multibuttonentry", function () {
62 unit_multibuttonentry( $("#multibuttonetnry-test"), "multibuttonetnry" );