public void control_driver_verification_fails_if_doesnt_exist_in_page()
 {
     var ctrl = new ControlDriverForTesting("foobar", _ie.Element("foobar"), new DriverPageForTesting())
                    {
                        VerificationResult = ControlDriverForTesting.VerificationBehaviour.CallSuperClass
                    };
     ctrl.Verify().Should().BeFalse();
 }
        public void control_drivers_attach_to_parent_page_on_creation()
        {
            var parent = new DriverPageForTesting();

            var ctrl = new ControlDriverForTesting("foo", _ie.Element(Find.ById("foo")), parent);

            parent.RegisteredControls.Should().Contain(ctrl);
        }
Exemplo n.º 3
0
        public void control_drivers_attach_to_parent_page_on_creation()
        {
            var parent = new DriverPageForTesting();

            var ctrl = new ControlDriverForTesting("foo", _ie.Element(Find.ById("foo")), parent);

            parent.RegisteredControls.Should().Contain(ctrl);
        }
Exemplo n.º 4
0
        public void control_driver_verification_fails_if_doesnt_exist_in_page()
        {
            var ctrl = new ControlDriverForTesting("foobar", _ie.Element("foobar"), new DriverPageForTesting())
            {
                VerificationResult = ControlDriverForTesting.VerificationBehaviour.CallSuperClass
            };

            ctrl.Verify().Should().BeFalse();
        }
Exemplo n.º 5
0
        public void control_driver_verification_passes_when_element_exists_on_the_page()
        {
            var ctrl = new ControlDriverForTesting("lBtnLogin", _ie.Element("lBtnLogin"), new DriverPageForTesting())
            {
                VerificationResult = ControlDriverForTesting.VerificationBehaviour.CallSuperClass
            };

            ctrl.Verify().Should().BeTrue();
        }
Exemplo n.º 6
0
        public void page_drivers_verify_all_registered_controls()
        {
            var parent = new DriverPageForTesting();

            var c1 = new ControlDriverForTesting("foo", _ie.Element(Find.ById("foo")), parent);
            var c2 = new ControlDriverForTesting("bar", _ie.Element(Find.ById("bar")), parent);
            var c3 = new ControlDriverForTesting("baz", _ie.Element(Find.ById("baz")), parent);

            parent.Verify();

            c1.WasVerified.Should().BeTrue();
            c2.WasVerified.Should().BeTrue();
            c3.WasVerified.Should().BeTrue();
        }
Exemplo n.º 7
0
        public void page_verification_returns_ids_controls_that_failed_verification()
        {
            var parent = new DriverPageForTesting();

            var c1 = new ControlDriverForTesting("foo", _ie.Element(Find.ById("foo")), parent)
            {
                VerificationResult = ControlDriverForTesting.VerificationBehaviour.Fail
            };
            var c2 = new ControlDriverForTesting("bar", _ie.Element(Find.ById("bar")), parent);
            var c3 = new ControlDriverForTesting("baz", _ie.Element(Find.ById("bar")), parent)
            {
                VerificationResult = ControlDriverForTesting.VerificationBehaviour.Fail
            };

            parent.Verify().Should().Be("foo baz ");
        }
        public void page_drivers_verify_all_registered_controls()
        {
            var parent = new DriverPageForTesting();

            var c1 = new ControlDriverForTesting("foo", _ie.Element(Find.ById("foo")), parent);
            var c2 = new ControlDriverForTesting("bar", _ie.Element(Find.ById("bar")), parent);
            var c3 = new ControlDriverForTesting("baz", _ie.Element(Find.ById("baz")), parent);

            parent.Verify();

            c1.WasVerified.Should().BeTrue();
            c2.WasVerified.Should().BeTrue();
            c3.WasVerified.Should().BeTrue();
        }
 public void control_driver_verification_passes_when_element_exists_on_the_page()
 {
     var ctrl = new ControlDriverForTesting("lBtnLogin", _ie.Element("lBtnLogin"), new DriverPageForTesting())
                    {
                        VerificationResult = ControlDriverForTesting.VerificationBehaviour.CallSuperClass
                    };
     ctrl.Verify().Should().BeTrue();
 }
 public void control_drivers_have_id()
 {
     var ctrl = new ControlDriverForTesting("foo", _ie.Element("foo"), new DriverPageForTesting());
     ctrl.Id.Should().Be("foo");
 }
        public void page_verification_returns_ids_controls_that_failed_verification()
        {
            var parent = new DriverPageForTesting();

            var c1 = new ControlDriverForTesting("foo", _ie.Element(Find.ById("foo")), parent)
                         {
                             VerificationResult = ControlDriverForTesting.VerificationBehaviour.Fail
                         };
            var c2 = new ControlDriverForTesting("bar", _ie.Element(Find.ById("bar")), parent);
            var c3 = new ControlDriverForTesting("baz", _ie.Element(Find.ById("bar")), parent)
                         {
                             VerificationResult = ControlDriverForTesting.VerificationBehaviour.Fail
                         };

            parent.Verify().Should().Be("foo baz ");
        }
Exemplo n.º 12
0
        public void control_drivers_have_id()
        {
            var ctrl = new ControlDriverForTesting("foo", _ie.Element("foo"), new DriverPageForTesting());

            ctrl.Id.Should().Be("foo");
        }