Skip to content

Commit

Permalink
feat: open a lookup record (#43) +semver: minor
Browse files Browse the repository at this point in the history
* New Lookup Binding with a test to cover it

* Updated as per Max recommendation to wait for the page to be loaded.
  • Loading branch information
markcunninghamuk committed Oct 28, 2020
1 parent f3d9e40 commit 94a0148
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,16 @@ public static void ThenICanSeeOnlyTheFollowingRecordsInTheLookup(string lookupNa
recordNames.Rows.Should().Contain(r => r[0] == item, because: "every given records should be present in the flyout");
}
}

/// <summary>
/// Opens the related record by clicking on the link.
/// </summary>
/// <param name="lookupName">The name of the lookup.</param>
[When(@"I select a related '(.*)' lookup field")]
public static void WhenISelectARelatedLookupInTheForm(string lookupName)
{
Driver.WaitUntilAvailable(By.XPath(AppElements.Xpath[AppReference.Entity.LookupFieldExistingValue].Replace("[NAME]", lookupName))).Click();
Driver.WaitForTransaction();
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ Scenario: User switches lookup views
And I select the 'New' command
And I select 'primarycontactid' lookup
#KNOWN BUG (TestCategory - Bug - Fail) https://github.com/microsoft/EasyRepro/blob/aadad319f713e169ce080524f533f20d86b23c97/Microsoft.Dynamics365.UIAutomation.Sample/UCI/Read/OpenContact.cs
And I select the 'All Contacts' view in the lookup
And I select the 'All Contacts' view in the lookup

Scenario: User selects a related record
Given I am logged in to the 'Sales Team Member' app as 'an admin'
And I have created 'an aliased contact'
And I have created 'an account with aliased contact'
And I have opened 'a sample account'
When I select a related 'primarycontactid' lookup field

0 comments on commit 94a0148

Please sign in to comment.