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);
        }
Beispiel #2
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);
        }
Beispiel #3
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();
        }
Beispiel #4
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 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 ");
        }