Text Inputs

Поделиться
HTML-код
  • Опубликовано: 8 фев 2025
  • We will work through creating our first real test and implementing the feature under test as we go. We will see how to find and interact with elements on the page and how to make assertions about their behavior. We will also look into some best practices like using beforeEach and defining our application’s baseUrl to remove duplicated code. Follow along at on.cypress.io/tutorials

Комментарии • 8

  • @RobertKeszeg
    @RobertKeszeg 4 года назад

    Thank you for the tutorial, it was very useful. It went a little outdated, because react changed a lot in the meantime, but still useful.

  • @hn031
    @hn031 4 года назад

    Will I need to write a test for each field if I have 10 input fields in my form?

  • @patrickrashid2693
    @patrickrashid2693 5 лет назад +1

    this is a nice tutorial for automated test, but I'm facing an error
    FOCUSED
    2 ASSERT
    expected { Object (selector) } to have class new-todo. can someone help me out

    • @gleb
      @gleb 5 лет назад +1

      well, if you click on the element in the failing assertion you can inspect it - to see which element is focused. It probably focuses on the wrong element (not on the input box). Just be aware: `cy.focused()` is REALLY dependent on how you change focus while the test is running. Let's say during the test you click on your code editor - this takes the focus away from Cypress browser and away from the focused element, or even if you click somewhere in the Cypress browser during the test. Then the focused element will NOT be the input box anymore and the test will fail.

    • @patrickrashid2693
      @patrickrashid2693 5 лет назад +1

      @@gleb thank you for your help

    • @ihorvolkov5600
      @ihorvolkov5600 4 года назад +1

      I got the same problem. You just need to stop your app and run it again for saving all changes.

  • @lakshmis5860
    @lakshmis5860 4 года назад

    Can you please show deleting a task testing please or give code for that

  • @asdfaam
    @asdfaam 2 года назад

    Beware that he is getting elements using classes not data attributes which is the standard today.