public async Task NewItemAutoAppearsOnOtherPersonsWishlist() { var rand = Guid.NewGuid().ToString(); var nameOfWishlist = "NewItemAutoAppearsOnOtherPersonsWishlist " + rand; await PlaywrightHelpers.CreateWishlist(baseUrl, nameOfWishlist, CreatorId, page); var wishlistPage = new WishlistPageObject(page); await wishlistPage.AddNewPerson("New", "*****@*****.**"); var page2 = await browser.NewPageAsync(); var loginPage2 = new LoginPageObject(page2); await page2.GoToAsync(baseUrl); await loginPage2.LoginUsingForm("*****@*****.**", "New"); await page2.GoToAsync(baseUrl); await page2.ClickAsync("text=" + nameOfWishlist); await page2.WaitForTimeoutAsync(1000); await wishlistPage.AddItem("New present idea"); await page2.ClickAsync("text=New present idea"); }
public async Task AllowsNewPeopleToBeAdded() { await PlaywrightHelpers.CreateWishlist(baseUrl, "AllowsNewPeopleToBeAdded", CreatorId, page); var wishlistPage = new WishlistPageObject(page); await wishlistPage.AddNewPerson("*****@*****.**", "Ed"); }
public async Task AllowsYouToAddItem() { await PlaywrightHelpers.CreateWishlist(baseUrl, "AllowsYouToAddItem", CreatorId, page); var wishlistPage = new WishlistPageObject(page); await wishlistPage.AddNewPerson("Ed", "*****@*****.**"); await wishlistPage.AddItem("New present idea"); }
public async Task DoesntAllowDuplicateNamesToBeAdded() { await PlaywrightHelpers.CreateWishlist(baseUrl, "DoesntAllowDuplicateNamesToBeAdded", CreatorId, page); var wishlistPage = new WishlistPageObject(page); await wishlistPage.AddNewPerson("Ed", "*****@*****.**"); await wishlistPage.ClickAddNewPerson(); await wishlistPage.EnterNameAndEmail("Ed", "*****@*****.**"); var createNewPersonIsEnabled = await wishlistPage.CreateNewPersonIsEnabled(); createNewPersonIsEnabled.Should().BeFalse(); await wishlistPage.EnterNameAndEmail("Ed", "*****@*****.**"); createNewPersonIsEnabled = await wishlistPage.CreateNewPersonIsEnabled(); createNewPersonIsEnabled.Should().BeTrue(); }
public async Task AllowsYouToClaimAndUnclaim() { var rand = Guid.NewGuid().ToString(); var nameOfWishlist = "AllowsYouToClaimAndUnclaim " + rand; await PlaywrightHelpers.CreateWishlist(baseUrl, nameOfWishlist, CreatorId, page); var wishlistPage = new WishlistPageObject(page); await wishlistPage.AddNewPerson("New", "*****@*****.**"); await wishlistPage.AddItem("New present idea"); await page.Context.ClearCookiesAsync(); await page.GoToAsync(baseUrl); await loginPage.LoginUsingForm("*****@*****.**", "New"); await page.GoToAsync(baseUrl); await page.ClickAsync("text=" + nameOfWishlist); await page.ClickAsync("text=New present idea"); }