Exemple #1
0
 public Task AddItem(string description)
 {
     _page.ClickAsync(Cy.Name("AddNewItemButton")).MakeItSync();
     _page.TypeAsync(Cy.TextAreaName("AddItem"), description).MakeItSync();
     _page.ClickAsync(Cy.Name("SaveItemButton")).MakeItSync();
     return(Task.CompletedTask);
 }
Exemple #2
0
 public Task LoginUsingForm(string email, string name)
 {
     _page.TypeAsync(Cy.InputName("EmailLogin"), email).ConfigureAwait(false).GetAwaiter().GetResult();
     _page.TypeAsync(Cy.InputName("NameLogin"), name).ConfigureAwait(false).GetAwaiter().GetResult();
     _page.ClickAsync(Cy.Name("LoginButton")).ConfigureAwait(false).GetAwaiter().GetResult();
     _page.WaitForTimeoutAsync(1000).MakeItSync();
     return(Task.CompletedTask);
 }
        public async Task CanCreateNewWishlist()
        {
            var rand = new Random().Next(0, 10000);
            var name = $"[Test] From Cypress {rand}";
            await page.ClickAsync(Cy.Name("CreateNewWishlist"));

            await page.TypeAsync(Cy.Name("NameOfWishlist"), name);

            await page.ClickAsync(Cy.Name("Create"));

            page.Url.Should().Contain("/wishlist");
        }
Exemple #4
0
 public Task EnterNameAndEmail(string name, string email)
 {
     _page.TypeAsync(Cy.InputName("NewPersonEmail"), email).MakeItSync();
     _page.TypeAsync(Cy.InputName("NewPersonName"), name).MakeItSync();
     return(Task.CompletedTask);
 }
Exemple #5
0
        public async Task <bool> CreateNewPersonIsEnabled()
        {
            var f = await _page.QuerySelectorAsync(Cy.Name("CreateNewPerson"));

            return(await f.IsEnabledAsync());
        }
Exemple #6
0
 public Task ClickCreateNewPerson()
 {
     _page.ClickAsync(Cy.Name("CreateNewPerson")).MakeItSync();
     return(Task.CompletedTask);
 }