示例#1
0
        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");
        }
示例#2
0
        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");
        }
示例#3
0
        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");
        }