Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Nothing works in this course #3

Open
CIALdev opened this issue Oct 15, 2023 · 2 comments
Open

[BUG] Nothing works in this course #3

CIALdev opened this issue Oct 15, 2023 · 2 comments
Assignees
Labels
answered bug Something isn't working

Comments

@CIALdev
Copy link

CIALdev commented Oct 15, 2023

🐞 Describe the bug:
Tests fail
UI Mode does not open

👻 To Reproduce:
Follow the setup steps from the course (there are lots of gaps. test the course on several newbies before posting it)

🌵 Expected behavior:
Tests run and pass
UI Mode opens

📸 Screenshots/GIFs/Videos:
....npx playwright test --ui
Error: Timed out 5000ms waiting for expect(locator).toHaveURL(expected)

Locator: locator(':root')
Expected pattern: /.*profile/
Received string: "https://demoqa.com/login"
Call log:

at tests\ui\pages\login-page.ts:34

32 |
33 | async checkLoggedIn() {

34 | await expect(this.page).toHaveURL(/.*profile/);
| ^
35 | await expect(this.page).toHaveTitle(/DEMOQA/);
36 | }
37 |

at LoginPage.checkLoggedIn (C:\.......\tests\ui\pages\login-page.ts:34:29)
at globalSetup (C:\.......\tests\setup\global-setup.ts:15:19)

💈 Dependencies' Version (please complete the following information):

  • OS: Windows
  • Browser course default
  • Playwright Version 1.39
  • npm Version 10.2.0

🛝 Additional context:
I understand it's a free course but it's expected to teach student to use playwright, not to debug your course code.

@CIALdev CIALdev added bug Something isn't working pending labels Oct 15, 2023
@raptatinha
Copy link
Owner

Hi @CIALdev,
I understand your frustration and I'm sorry you feel this way. I prepared this training with only good intentions, and I did test with many people (in fact more than 500 people already completed it and it went well) but definitely it's not possible to map every single student's background.
I agree when you say "it's expected to teach student to use playwright, not to debug your course code" and I'll try to make the commands more explicit so you and other students don't have the feeling you need to debug the code to make it run successfully, thank you for the feedback. This is an advanced course and some background is necessary too, it's a 50%-50% work. Also, I always reply to the questions and try to point people in the right direction.

As I explained in your other comment the tests are not meant to run altogether, they are examples for each chapter tackled in the course.
To run the UI Mode, try the following steps:

  1. Rename the playwright.config.ts file to playwright-full.config.ts
  2. Rename the playwright-standard.config.ts file to playwright.config.ts
  3. Go to your terminal and type npx playwright test --ui
  4. Run the tests independently (1 spec at a time)
    NOTE: The tests inside specs-auth will need the content inside the playwright-auth.config and as I mentioned in one of the chapters of the course, the application doesn't support one of the scenarios. I implemented it only to show you how to do it, so you can replicate it in your real application.

Let me know if you need more support, I'm happy to help.

@raptatinha
Copy link
Owner

raptatinha commented Oct 15, 2023

@CIALdev One more note: In the readme file I mentioned the versions the training was recorded. It's a good practice to use the same versions listed there, I cannot guarantee that the code will work with newer versions since breaking changes can be released at any moment and this training will not be upgraded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants