public async Task ThenTheRelatedOrganisationOdsCodesAreDisplayedAsync() { var currentOrgCode = Test.Driver.Url.Split('/').Last(); var relatedOrgs = await RelatedOrganisations.GetRelatedOrganisations(Test.ConnectionString, new Guid(currentOrgCode)); List <string> odsCodes = new(); foreach (var org in relatedOrgs) { odsCodes.Add((await Organisation.RetrieveById(Test.ConnectionString, org.RelatedOrganisationId)).OdsCode); } Test.Pages.UserAccountsDashboard.GetRelatedODSCodes().Should().BeEquivalentTo(odsCodes); }
public async Task ThenTheUserCanSeeAListOfAllAvailableOrganisationsInTheBuyingCatalogueAsync() { var selectedOrg = Test.Driver.Url.Split('/').Last(); var expectedOrg = await RelatedOrganisations.GetRelatedOrganisations(Test.ConnectionString, new Guid(selectedOrg)); List <string> orgNames = new(); foreach (var org in expectedOrg) { orgNames.Add((await Organisation.RetrieveById(Test.ConnectionString, org.RelatedOrganisationId)).OdsCode); } Test.Pages.UserAccountsDashboard.GetRelatedODSCodes().Should().BeEquivalentTo(orgNames); }
public async Task ClickRemoveLinkAsync(string connectionString, string orgId) { var relatedOrganisation = await RelatedOrganisations.GetRelatedOrganisations(connectionString, new Guid(orgId)); Driver.FindElement(Objects.Pages.UserAccountsDashboard.RemoveLink(relatedOrganisation.First().RelatedOrganisationId.ToString())).Click(); }