Exemplo n.º 1
0
        public void Create()
        {
            var before = new PartyRelationships(this.Session).Extent().ToArray();

            var extent = new Organisations(this.Session).Extent();
            var internalOrganisation = extent.First(v => v.DisplayName().Equals("Allors BVBA"));

            this.organisations.Table.DefaultAction(internalOrganisation);
            var partyRelationshipEdit = new OrganisationOverviewComponent(this.organisations.Driver).PartyrelationshipOverviewPanel.Click().CreateCustomerRelationship();

            partyRelationshipEdit
            .FromDate.Set(DateTimeFactory.CreateDate(2018, 12, 22))
            .ThroughDate.Set(DateTimeFactory.CreateDate(2018, 12, 22).AddYears(1))
            .SAVE.Click();

            this.Driver.WaitForAngular();
            this.Session.Rollback();

            var after = new PartyRelationships(this.Session).Extent().ToArray();

            Assert.Equal(after.Length, before.Length + 1);

            var partyRelationship = after.Except(before).First();

            // Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 22).Date, partyRelationship.FromDate.Date.ToUniversalTime().Date);
            // Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 22).AddYears(1).Date, partyRelationship.ThroughDate.Value.Date.ToUniversalTime().Date);
        }
Exemplo n.º 2
0
        public void Create()
        {
            var before = new PartyRelationships(this.Session).Extent().ToArray();

            var person = new People(this.Session).Extent().First;

            this.personListPage.Table.DefaultAction(person);
            var customerRelationshipEdit = new PersonOverviewComponent(this.personListPage.Driver).PartyrelationshipOverviewPanel.Click().CreateCustomerRelationship();

            customerRelationshipEdit
            .FromDate.Set(DateTimeFactory.CreateDate(2018, 12, 22))
            .ThroughDate.Set(DateTimeFactory.CreateDate(2018, 12, 22).AddYears(1))
            .SAVE.Click();

            this.Driver.WaitForAngular();
            this.Session.Rollback();

            var after = new PartyRelationships(this.Session).Extent().ToArray();

            Assert.Equal(after.Length, before.Length + 1);

            var partyRelationship = after.Except(before).First();

            // Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 22).Date, partyRelationship.FromDate.Date.ToUniversalTime().Date);
            // Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 22).AddYears(1).Date, partyRelationship.ThroughDate.Value.Date.ToUniversalTime().Date);
        }
        public void Create()
        {
            var before = new PartyRelationships(this.Session).Extent().ToArray();

            var extent = new Organisations(this.Session).Extent();
            var internalOrganisation = extent.First(v => v.PartyName.Equals("Allors BVBA"));

            var organisationOverviewPage = this.organisations.Select(internalOrganisation);
            var page = organisationOverviewPage.NewCustomerRelationship();

            page.FromDate.Set(DateTimeFactory.CreateDate(2018, 12, 22))
            .ThroughDate.Set(DateTimeFactory.CreateDate(2018, 12, 22).AddYears(1))
            .Save.Click();

            this.Driver.WaitForAngular();
            this.Session.Rollback();

            var after = new PartyRelationships(this.Session).Extent().ToArray();

            Assert.Equal(after.Length, before.Length + 1);

            var partyRelationship = after.Except(before).First();

            //Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 22).Date, partyRelationship.FromDate.Date.ToUniversalTime().Date);
            //Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 22).AddYears(1).Date, partyRelationship.ThroughDate.Value.Date.ToUniversalTime().Date);
        }
        public void Create()
        {
            var before = new PartyRelationships(this.Session).Extent().ToArray();

            var people = new People(this.Session).Extent();
            var person = people.First(v => v.PartyName.Equals("John0 Doe0"));

            var page = this.personListPage.Select(person).NewCustomerRelationship();

            page.FromDate.Set(DateTimeFactory.CreateDate(2018, 12, 22))
            .ThroughDate.Set(DateTimeFactory.CreateDate(2018, 12, 22).AddYears(1))
            .Save.Click();

            this.Driver.WaitForAngular();
            this.Session.Rollback();

            var after = new PartyRelationships(this.Session).Extent().ToArray();

            Assert.Equal(after.Length, before.Length + 1);

            var partyRelationship = after.Except(before).First();

            //Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 22).Date, partyRelationship.FromDate.Date.ToUniversalTime().Date);
            //Assert.Equal(DateTimeFactory.CreateDate(2018, 12, 22).AddYears(1).Date, partyRelationship.ThroughDate.Value.Date.ToUniversalTime().Date);
        }