-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1050 from Klantinteractie-Servicesysteem/PC-839-C…
…ontactmoment-Search PC-839: End to end tests for Search Person & Search Company
- Loading branch information
Showing
5 changed files
with
659 additions
and
0 deletions.
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
Kiss.Bff.EndToEndTest/ContactMomentSearch/Helpers/Locators.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Kiss.Bff.EndToEndTest.ContactMomentSearch.Helpers | ||
{ | ||
internal static class Locators | ||
{ | ||
|
||
public static ILocator Personen_LastNameInput(this IPage page) => | ||
page.GetByRole(AriaRole.Textbox, new() { Name = "Achternaam" }); | ||
|
||
public static ILocator Personen_BirthDateInput(this IPage page) => | ||
page.GetByRole(AriaRole.Textbox, new() { Name = "Geboortedatum" }); | ||
|
||
public static ILocator PersonenFirst_SearchButton(this IPage page) => | ||
page.Locator("form").Filter(new () { HasText = "Achternaam Geboortedatum" }).GetByRole(AriaRole.Button); | ||
public static ILocator PersonenSecond_SearchButton(this IPage page) => | ||
page.Locator("form").Filter(new() { HasText = "Postcode Huisnummer" }).GetByRole(AriaRole.Button); | ||
|
||
public static ILocator PersonenThird_SearchButton(this IPage page) => | ||
page.Locator("form").Filter(new() { HasText = "Bsn Zoeken" }).GetByRole(AriaRole.Button); | ||
public static ILocator Personen_PostCodeInput(this IPage page) => | ||
page.GetByRole(AriaRole.Textbox, new() { Name = "postcode" }); | ||
public static ILocator Personen_HuisnummerInput(this IPage page) => | ||
page.GetByRole(AriaRole.Textbox, new() { Name = "huisnummer" }); | ||
|
||
public static ILocator SearchAddressByPostalAndHuisNummer(this IPage page, string postcode, string huisNummer) | ||
{ | ||
return page.GetByRole(AriaRole.Table).Locator($"tbody tr:has(td:nth-child(4):has-text(\"{postcode.Trim()}\"))" + | ||
$":has(td:nth-child(3):has-text(\"{huisNummer.Trim()}\"))"); | ||
} | ||
public static ILocator Company_BedrijfsnaamInput(this IPage page) => | ||
page.GetByRole(AriaRole.Textbox, new() { Name = "Bedrijfsnaam" }); | ||
|
||
public static ILocator Company_KVKNumberInput(this IPage page) => | ||
page.GetByRole(AriaRole.Textbox, new() { Name = "KVK-nummer" }); | ||
|
||
public static ILocator Company_PostcodeInput(this IPage page) => | ||
page.GetByRole(AriaRole.Textbox, new() { Name = "Postcode" }); | ||
|
||
public static ILocator Company_HuisnummerInput(this IPage page) => | ||
page.GetByRole(AriaRole.Textbox, new() { Name = "Huisnummer" }); | ||
|
||
public static ILocator Company_FirstSearchButton(this IPage page) => | ||
page.Locator("form").Filter(new() { HasText= "Bedrijfsnaam Zoeken" }).GetByRole(AriaRole.Button); | ||
|
||
|
||
public static ILocator GetSearchResultsByPostcodeAndHuisnummer(this IPage page, string postcode, string huisnummer) => | ||
page.GetByRole(AriaRole.Table).Locator($"tbody tr:has(td:nth-child(4):has-text(\"{postcode.Trim()}\"))" + | ||
$":has(td:nth-child(3):has-text(\"{huisnummer.Trim()}\"))"); | ||
|
||
public static ILocator PersonenBsnInput(this IPage page) => | ||
page.GetByRole(AriaRole.Textbox, new() { Name = "bsn" }); | ||
|
||
|
||
public static ILocator Company_KvknummerInput(this IPage page) => | ||
page.GetByRole(AriaRole.Textbox, new() { Name = "KVK-nummer of vestigingsnummer" }); | ||
|
||
public static ILocator Company_KvknummerSearchButton(this IPage page) => | ||
page.Locator("form").Filter(new() { HasText = "KVK-nummer of" }).GetByRole(AriaRole.Button); | ||
|
||
public static ILocator Company_PostcodeHuisnummerSearchButton(this IPage page) => | ||
page.Locator("form").Filter(new() { HasText = "Postcode Huisnummer Zoeken" }).GetByRole(AriaRole.Button); | ||
|
||
public static ILocator SearchCompanyByPostalAndHuisNummer(this IPage page, string postcode, string huisNummer) | ||
{ | ||
return page.GetByRole(AriaRole.Table).Locator($"tbody tr:has(td:nth-child(4):has-text(\"{postcode.Trim()} {huisNummer.Trim()}\"))"); | ||
} | ||
} | ||
|
||
|
||
} | ||
|
16 changes: 16 additions & 0 deletions
16
Kiss.Bff.EndToEndTest/ContactMomentSearch/Helpers/ManageContactmoment.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Kiss.Bff.EndToEndTest.ContactMomentSearch.Helpers | ||
{ | ||
internal static class ManageContactmoment | ||
{ | ||
public static async Task CreateNewContactmomentAsync(this IPage page) | ||
{ | ||
await page.GetByRole(AriaRole.Button, new() { Name = "Nieuw contactmoment" }).ClickAsync(); | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
Kiss.Bff.EndToEndTest/ContactMomentSearch/Helpers/Navigation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Kiss.Bff.EndToEndTest.ContactMomentSearch.Helpers | ||
{ | ||
internal static class Navigation | ||
{ | ||
|
||
|
||
} | ||
} |
Oops, something went wrong.