public void Should_be_able_to_Generate_the_Password_Box()
 {
     IInputElementBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.PASSWORD).Value("Satish");
     string htmlTextBox = textbox.ToString();
     var cq = CQ.Create(htmlTextBox);
     cq.Attr(HTMLATTRIBUTE.TYPE).Should().Be(HTMLATTRIBUTE.PASSWORD);
     cq.Val().Should().Be("Satish");
 }
Esempio n. 2
0
 public void Should_be_able_to_Generate_the_TextBox_with_the_PlaceHolder()
 {
     ITextBoxBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.TEXT).WithPlaceholder("SomeText");
     string htmlTextBox = textbox.ToString();
     var cq = CQ.Create(htmlTextBox);
     cq.Attr("name").Should().Be("Name");
     cq.Attr("placeholder").Should().Be("SomeText");
 }
Esempio n. 3
0
 public void Should_be_able_to_Generate_Text_With_the_type_Text_box()
 {
     ITextBoxBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.TEXT).Value("Satish");
     string htmlTextBox = textbox.ToString();
     var cq = CQ.Create(htmlTextBox);
     cq.Attr("name").Should().Be("Name");
     cq.Val().Should().Be("Satish");
 }
 public void Should_be_able_to_add_Id_to_the_property_With_the_Generic_Name()
 {
     IInputElementBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.PASSWORD)
         .Class("cssclass");
     string htmlTextBox = textbox.ToString();
     var cq = CQ.Create(htmlTextBox);
     cq.Attr(HTMLATTRIBUTE.TYPE).Should().Be(HTMLATTRIBUTE.PASSWORD);
     cq.Attr(HTMLATTRIBUTE.CLASS).Should().Be("cssclass");
 }
Esempio n. 5
0
 public void Should_be_able_to_Generate_the_Text_With_Disabled_and_ReadOnly_TextBox()
 {
     ITextBoxBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.TEXT).Value("Satish").Disabled(true).IsReadOnly(true);
     string htmlTextBox = textbox.ToString();
     var cq = CQ.Create(htmlTextBox);
     cq.Attr("name").Should().Be("Name");
     cq.Attr("disabled").Should().Be("disabled");
     cq.Attr("readonly").Should().Be("readonly");
     cq.Val().Should().Be("Satish");
 }
Esempio n. 6
0
 public void Should_be_able_to_Generate_the_Text_With_AutoComplete_and_AutoFoucs_TextBox()
 {
     ITextBoxBuilder textbox = new InputBuilder("Name", HTMLATTRIBUTE.TEXT)
         .Value("Satish")
         .EnableAutoComplete(true)
         .AutoFocus(true);
     string htmlTextBox = textbox.ToString();
     var cq = CQ.Create(htmlTextBox);
     cq.Attr("name").Should().Be("Name");
     cq.Attr("AutoFocus").Should().Be("autofocus");
     cq.Attr("autocomplete").Should().Be("on");
     cq.Val().Should().Be("Satish");
 }