Base solution for your next web application
Open Closed

Playwright: All test failing #10663


User avatar
0
pbstandards created

Version: 10.5, MVC JQuery, .net core

I'm trying to get the UI tests working in ASPNetZero and I'm running into issues. I have the newest version and after using the instructions here (https://docs.aspnetzero.com/en/aspnet-core-mvc/latest/Playwright-UI-Testing) all the tests fail. It looks like the navigation is failing (see first screen shot ) and then all the screenshots that are captured are of that of the dashboard page. Am I missing a step? I set up a very simple test that directly navigated to a page (not using menu clicks) and looked for a div with certain text and that passed without problem so playwright and jest are up and running. I would appriciate any help or pointers on how I can get the tests shipped with the framework passing so I can use them as a model when I build out new functionality. Thanks!


3 Answer(s)
  • User Avatar
    0
    musa.demir created

    Hi @pbstandards

    I could not reproduce it in a new clean project. Did you change anything in your project?. It seems like it is not able to find menu button with the class named menu-text or by name. Can you please check if your menu buttons fits search query.

  • User Avatar
    0
    pbstandards created

    I've added few appservices that I was begining to code a UI for. Which is why I wanted to get the UI tests working. I've checked and I do have the class names and I haven't touched to menu css. I did apply the dark menu skin under visual settings. The one other thing I can think of is that I ran npm audit fix after npm install since I noticed some warnings in the console.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @pbstandards

    Could you remove your node_modules folder nad install client side dependencies using yarn ? yarn will install exact same packages that we use.

    Thanks,