Skip to content

Conversation

@jemayn
Copy link

@jemayn jemayn commented Oct 18, 2023

This PR fixes #24

It adds the initial test setup for playwright, and adds the first test which logs in and tests if a property is first visible as an admin, then logs in as editor and tests if the same property is hidden.

playwright

@LottePitcher
Copy link
Owner

This looks so cool @jemayn

Of course I need to test your test ;-) myself before merging but thank you so much!

@LottePitcher
Copy link
Owner

Hey @jemayn

When I ran npm install in the AdminOnlyProperty.Tests folder I got the following error

npm ERR! Unexpected token '.'

Could this be a npm version issue? I have nvm installed and it confirms that I have 19.0.0 as the current version. Any idea what version I would need?

@jemayn
Copy link
Author

jemayn commented Dec 20, 2023

I tried both v18.6 and 19.9 and they both worked for me on a fresh clone.

Did notice an issue though, where the popup marketing banner makes the tests fail if it has not been disabled, haven't found a quick fix, tried porting some of the logic from https://github.com/umbraco/Umbraco.Playwright.Testhelpers/blob/a0c00831094496e81bb779c66c5d392ac69ba0bf/lib/helpers/ApiHelpers.ts#L139-L166 and I could not make it work at all. Also couldn't get their standard login to work, so not sure what's happening there.

Will have to take another look some other time when I have more time on my hands.

@LottePitcher
Copy link
Owner

I did try with v19.9 and still same issue. I'm switching to a new machine over the holidays, I'll try again from there 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Playwright tests

2 participants