UI Testing Pushing To Screen In SwiftUI, How To Write UI Tests for Our DetailView

Поделиться
HTML-код
  • Опубликовано: 7 ноя 2024

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

  • @lincolndickerson1293
    @lincolndickerson1293 2 года назад +2

    It is great to see a UITesting video that goes beyond the basics. Thank you!

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

      That was my aim, glad you enjoy it. UI Testing is never simple 🥴

  • @shuvayansaha2522
    @shuvayansaha2522 2 года назад +2

    That’s awesome 👏 Thanks a lot🤘

    • @tundsdev
      @tundsdev  2 года назад +1

      Glad you enjoyed it 👌🏾

  • @KimbrellBrad
    @KimbrellBrad 2 года назад +2

    Great set of advanced UI testing here!
    I am having a problem with the DetailsUITests. For some reason the .tap does tap on my 1st item but then brings up the 2nd item which of course does not match our tests. When I run the process manually (not in test mode) and click that first item (George Bluth) his detail page comes up just fine. My code in the DetailsUITests matches yours exactly (I even copied and pasted from the video). It would seem that this points to an issue in the Mocks but I have checked them and they appear correct. Any hints on how to troubleshoot this? Thanks in advance TD!
    Full disclosure, I changed my tests temporarily to use item #2 so I can continue with the project but surely need to find my error and correct it.

    • @tundsdev
      @tundsdev  2 года назад +2

      Glad you’re enjoying it. So one thing to note is on the detail view the mock I created a detail mock that always return a specific user in our mock which is George Bluth which is reading from our static JSON file. It sounds to me that your mock data is different to what i’ve done in the video if you want to compare you can check out the PR in this repo that has all the source code in it.
      github.com/tunds/SwiftUIiOSTakeHomeTest/pull/1

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

      ​@@tundsdev Exactly the issue! I had used the 2nd record and forgot / did not check what was in the "SingleUserData" Resource folder. Thanks for the tip! Feel really weak for not looking at that! Forgot that we were not just using the 6 users to derive that. 🥵