javascript 性感日期测试片段

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了javascript 性感日期测试片段相关的知识,希望对你有一定的参考价值。

  describe("Dashboard Page", async() => {
    it("Login as Basic", async() => {
      await page.goto(baseUrl, {waitUntil: "networkidle0"})
      await page.click(".login-btn")
      await page.waitForSelector('app-login form > input:nth-child(2)')
      await page.type('app-login form > input:nth-child(2)', process.env.USERNAME)
      await page.type('app-login form > input:nth-child(4)', process.env.PASSWORD)
      await page.click('app-login form > button')
      await page.waitForSelector('div.content-container > swiper')
    })
    describe("Popular Members Carousel Test", async() => {
      it("Next Arrow Slides Carousel To Right", async() => {
        const nextIndex = 
                await page.$$eval('div.feature-profiles + swiper app-member', els => 
                          Array.from(els).findIndex( e => e.className.indexOf('swiper-slide-active') > -1 )) + 2;
        const nextName = await page.$eval(`div.feature-profiles + swiper app-member:nth-child(${nextIndex}) span.member-name`, el => el.innerHTML)
        await page.waitForSelector('div.feature-profiles i.icon-next.slide-one-next')
        await page.click('div.feature-profiles i.icon-next.slide-one-next')
        const activeIndex = 
        await page.$$eval('div.feature-profiles + swiper app-member', els => 
                  Array.from(els).findIndex( e => e.className.indexOf('swiper-slide-active') > -1 )) + 1;
        const activeName = await page.$eval(`div.feature-profiles + swiper app-member:nth-child(${activeIndex}) span.member-name`, el => el.innerHTML)
        expect(nextName).toBe(activeName);
      })
      it("Previous Arrow Slides Carousel To Left", async() => {
        const nextIndex = 
                await page.$$eval('div.feature-profiles + swiper app-member', els => 
                          Array.from(els).findIndex( e => e.className.indexOf('swiper-slide-active') > -1 )) + 2;
        const nextName = await page.$eval(`div.feature-profiles + swiper app-member:nth-child(${nextIndex}) span.member-name`, el => el.innerHTML)
        await page.waitForSelector('div.feature-profiles i.icon-back.slide-one-prev')
        await page.click('div.feature-profiles i.icon-back.slide-one-prev')
        const activeIndex = 
        await page.$$eval('div.feature-profiles + swiper app-member', els => 
                  Array.from(els).findIndex( e => e.className.indexOf('swiper-slide-active') > -1 )) + 3;
        const activeName = await page.$eval(`div.feature-profiles + swiper app-member:nth-child(${activeIndex}) span.member-name`, el => el.innerHTML)
        expect(nextName).toBe(activeName);
        })
    })
  })

  describe("Contact Page", async() => {
    it("Contact Form Validate Submission without Data", async() => {
      await page.goto(`${baseUrl}soporte`, {waitUntil: "networkidle0"})
      await page.click('app-contact-form div.heading-wrapper')
      await page.waitForSelector('#form-wrapper > form > div:nth-child(8) > button')
      await page.click('#form-wrapper > form > div:nth-child(8) > button')
      await page.waitForSelector('#form-wrapper > form > div:nth-child(1) > div.msg.msg--error')
      await page.waitForSelector('#form-wrapper > form > div:nth-child(2) > div.msg.msg--error')
      await page.waitForSelector('#form-wrapper > form > div:nth-child(3) > div.msg.msg--error')
      await page.waitForSelector('#form-wrapper > form > div:nth-child(4) > div.msg.msg--error')
      await page.waitForSelector('#form-wrapper > form > div:nth-child(5) > div.msg.msg--error')
      await page.waitForSelector('#form-wrapper > form > div:nth-child(6) > div.msg.msg--error')
      await page.waitForSelector('#form-wrapper > form > div:nth-child(6) > div.msg.msg--error')
      await page.waitForSelector('#form-wrapper > form > div:nth-child(7) > div.msg.msg--error')
    })
    it("Contact Form Submission with Data", async() => {
      await page.type('#form-wrapper > form > div:nth-child(2) > input', 'rajdeep')
      await page.type('#form-wrapper > form > div:nth-child(3) > input', 'This Is Test Subject')
      await page.type('#form-wrapper > form > div:nth-child(4) > input', 'rajdeep@itobuz.com')
      await page.type('#form-wrapper > form > div:nth-child(5) > input', 'rajdeep@itobuz.com')
      await page.type('#form-wrapper textarea', 'This is my test message to submit form')
      await page.click('#form-wrapper > form > div:nth-child(8) > button')
      await page.waitForSelector('#form-wrapper > form > div:nth-child(7) > div.msg.msg--error')
    })
  })

  describe("Login Page - Forgot Password", async() => {
    it("Validation for submitting without entering email", async() => {
      await page.goto(`${baseUrl}iniciar-sesion`, {waitUntil: "networkidle0"})
      await page.click('app-login form > div > a')
      await page.waitForSelector('ngb-modal-window form button')
      await page.click('ngb-modal-window form button')
      await page.waitForSelector('ngb-modal-window form > div.msg.msg--error')
    })
    it("Validation for submitting with an invalid email", async() => {
      await page.waitForSelector('ngb-modal-window form > input')
      await page.type('ngb-modal-window form > input', 'rajib@xyzs.co.qwerty')
      await page.click('ngb-modal-window form button')
      await page.waitForSelector('ngb-modal-window form > div.msg.msg--error')
    })
    it("Clicking X closes modal", async() => {
      await page.click('ngb-modal-window div.heading-wrap > button')
      try {
        await page.waitForSelector('ngb-modal-window', {timeout: 5000})
      }
      catch(err) {
        console.log('Modal Not Found Hence Test Passed')
      }
    })
  })
  
  describe("Landing Page - Register Focus", async() => {
    it("Click on Urnime Gratis / Find members section focuses email field", async() => {
      await page.goto(baseUrl, {waitUntil: "networkidle0"})
      await page.click('div.find-members a')
      await page.focus('app-register-step-one form input')
    })
    it("Click Left Urnime Gratis / Casual Meet section focuses email field", async() => {
      await page.click('div.casual-meet div.column:nth-child(1) a')
      await page.focus('app-register-step-one form input')
    })
    it("Click Right Urnime Gratis / Casual Meet section focuses email field", async() => {
      await page.click('div.casual-meet div.column:nth-child(2) a')
      await page.focus('app-register-step-one form input')
    })
  })

  describe("Landing Page - Member Click", async() => {
    it("Click on a member redirects to login page", async() => {
      await page.goto(baseUrl, {waitUntil: "networkidle0"})
      await page.click('app-member')
      await page.waitForSelector('div.login-details')
    })
  })

  describe("Registration - Incorrect Email ID", async() => {
    it("Submit form with incorrect email", async() => {
      await page.goto(baseUrl, {waitUntil: "networkidle0"})
      await page.type('form input', 'testing123@test.co.in')
      await page.click('#register-form form button')
      await page.waitForSelector('app-register-step-one p-autocomplete + div.msg.msg--error')
    })
  })

  describe("Registration - No Email ID", async() => {
    it("Submit form with blank email", async() => {
      await page.goto(baseUrl, {waitUntil: "networkidle0"})
      await page.click('#register-form form button')
      await page.waitForSelector('app-register-step-one p-autocomplete + div.msg--error')
    })
  })

  describe("Registration - Email Domain Autocomplete", async() => {
    it("Type into registration Input", async() => {
      await page.goto(baseUrl, {waitUntil: "networkidle0"})
      await page.type('form input', 'rajdeep@o')
      await page.waitForSelector('form > div > div:nth-child(2) > div > p-autocomplete > span > div > ul')
    })
  })

以上是关于javascript 性感日期测试片段的主要内容,如果未能解决你的问题,请参考以下文章

javascript 最终性感日期测试文件

javascript 性感日期测试代码

javascript 性感日期桌面测试用例无头模式全部通过

javascript [测试片段]我的片段描述是一个非常重要的javascript片段,不能忘记#tagtest

javascript 测试片段

javascript 测试片段