public void ThenISeeVendedPrefixIsFromTheAuto_VendRange() { var page = new Pages.Confirmation(Setup.TestSetup.Driver); var vendedPrefix = page.GetVendedPrefix(); var range = Setup.TestSetup.UiisContext.Range2; vendedPrefix.StartsWith(range).ShouldBeTrue(); }
public void ThenISeeANewEntityGLNDisplayed() { var page = new Pages.Confirmation(Setup.TestSetup.Driver); var prefix = page.GetVendedPrefix(); var entityGln = page.GetVendedEntityGLN(); Console.WriteLine($"Vended Prefix = {prefix}; EntityGLN = {entityGln}"); prefix.ShouldStartWith(prefix); }
public void ThenICheckThatCategoryIsX(string category) { var page = new Pages.Confirmation(Setup.TestSetup.Driver); var account = Setup.TestSetup.UiisContext.TestAccount; var names = Setup.TestSetup.Imis.NamesByCoId(account.ID); var prefix = page.GetVendedPrefix().TrimStart('0'); Console.WriteLine($"Vended Prefix = {prefix}"); names.Where(o => o.LAST_FIRST == prefix).First().CATEGORY.ShouldBe(category); }
public void ThenICheckThatVendedIdentifierMatchesLastNameInNameTable() { var page = new Pages.Confirmation(Setup.TestSetup.Driver); var account = Setup.TestSetup.UiisContext.TestAccount; var names = Setup.TestSetup.Imis.NamesByCoId(account.ID); var prefix = page.GetVendedPrefix().TrimStart('0'); Console.WriteLine($"Vended Prefix = {prefix}"); names.Where(o => o.LAST_NAME == prefix).ShouldNotBeEmpty(); }
public void ThenICheckThisPrefixInCompanyPrefixTable() { var page = new Pages.Confirmation(Setup.TestSetup.Driver); var prefix = page.GetVendedPrefix(); Console.WriteLine($"prefix = {prefix}"); PollUtils.Poll( $"Querying prefix {prefix}", 60, 5, () => Setup.TestSetup.UiisDb.GetPrefixByValue(prefix), o => o.Count() > 0 ).First().Value.ShouldBe(prefix); }
public void ThenICheckThatVendedIdentifierMatchesMajorKeyInNameTable(string removeLeading0) { var page = new Pages.Confirmation(Setup.TestSetup.Driver); var account = Setup.TestSetup.UiisContext.TestAccount; var prefix = page.GetVendedPrefix(); if (!String.IsNullOrEmpty(removeLeading0)) { prefix = prefix.TrimStart('0'); } Console.WriteLine($"Vended Prefix = {prefix}"); var names = PollUtils.Poll( $"Querying account by ID {account.ID}", 60, 5, () => Setup.TestSetup.Imis.NamesByCoId(account.ID), xs => xs.Where(x => x.MAJOR_KEY == prefix).Count() > 0 ); names.Where(o => o.MAJOR_KEY == prefix).ShouldNotBeEmpty(); }
public void ThenICheckThatAccountInformationIsCorrect() { var page = new Pages.Confirmation(Setup.TestSetup.Driver); var account = Setup.TestSetup.UiisContext.TestAccount; page.GetAccountNumber().ShouldBe(account.ID); var companyName = Regex.Replace(account.COMPANY.Trim().ToLower(), "\\s+", " "); page.GetCompanyName().ToLower().ShouldBe(companyName); var address = Setup.TestSetup.Imis.AddressForContact(account.ID); var statePart = String.IsNullOrWhiteSpace(address.STATE_PROVINCE) ? "" : (" " + address.STATE_PROVINCE.Trim()); var countryPart = String.IsNullOrWhiteSpace(address.COUNTRY) ? "" : (" " + address.COUNTRY.Trim()); Console.WriteLine($"city=({address.CITY.Trim()}) state=({statePart}) country=({countryPart})"); var loc = $"{address.CITY.Trim()}{statePart}{countryPart}"; if (!String.IsNullOrWhiteSpace(loc)) { page.GetCompanyLocation().ToLower().ShouldBe(loc.ToLower()); } }
public void ThenIfCaseICheckThatDisplayedGLNWithDemog_All_WTable(string case1, string caseVal, string negation) { if (case1 == caseVal) { var page = new Pages.Confirmation(Setup.TestSetup.Driver); var displayedEntityGln = page.GetVendedEntityGLN(); var account = Setup.TestSetup.UiisContext.TestAccount; var entityGln = PollUtils.Poll( $"Querying entity GLN for coid={account.ID}", 60, 5, () => Setup.TestSetup.Imis.EntityGlnByCoId(account.ID), o => !String.IsNullOrEmpty(o) ); if (String.IsNullOrEmpty(negation)) { entityGln.ShouldBe(displayedEntityGln); } else { entityGln.ShouldNotBe(displayedEntityGln); } } }
public void ThenICheckThatUPCRangeIsX(string upcRange) { var page = new Pages.Confirmation(Setup.TestSetup.Driver); page.GetRangeType().ShouldBe(upcRange); }
public void ThenICheckThatCapacityIs(int capacity) { var page = new Pages.Confirmation(Setup.TestSetup.Driver); page.GetCapacity().ShouldBe(capacity); }
public void ThenICheckThatIdentifierTypeIsX(string identifierType) { var page = new Pages.Confirmation(Setup.TestSetup.Driver); page.GetIdentifierType().ShouldBe(identifierType); }
public void WhenIWaitForSyncToBeSuccessful() { var page = new Pages.Confirmation(Setup.TestSetup.Driver); page.IsSyncSucceeded().ShouldBeTrue(); }