-
Notifications
You must be signed in to change notification settings - Fork 218
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
Create the docs for the locator
api for xk6-browser
#743
Create the docs for the locator
api for xk6-browser
#743
Conversation
51e5ae0
to
7928525
Compare
b5779c5
to
8b9912d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done! Just left some minor suggestions.
Also, I think we need examples, at least for some of the trickier methods like click()
, selectOption()
, type()
, etc. We can follow Playwright's lead here and not include a fully working script, but just an example usage of each method.
We might want to add a full script to the main Locator page though. Maybe one of the scripts that @inancgumus added to the xk6-browser repo?
@@ -1437,6 +1437,8 @@ const createRedirects = ({ actions }) => { | |||
'/javascript-api/xk6-browser/jshandle/', | |||
'/javascript-api/k6-x-browser/keyboard/': | |||
'/javascript-api/xk6-browser/keyboard/', | |||
'/javascript-api/k6-x-browser/locator/': | |||
'/javascript-api/xk6-browser/locator/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's silly that we need these redirects for every xk6-browser page 😕 These are not some unique pages, so we should try to get rid of this (not in this PR, of course).
... Wait, we also have this for some k6 JS API pages. 😦
@ppcano Any ideas why this is needed? Can we change the directory-to-URL mapping instead?
src/data/markdown/docs/30 xk6-browser/01 xk6-browser/09 Locator/check--options--.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/30 xk6-browser/01 xk6-browser/09 Locator/click--options--.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/30 xk6-browser/01 xk6-browser/09 Locator/click--options--.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/30 xk6-browser/01 xk6-browser/09 Locator.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/30 xk6-browser/01 xk6-browser/09 Locator.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/30 xk6-browser/01 xk6-browser/09 Locator/inputvalue--options--.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/30 xk6-browser/01 xk6-browser/09 Locator/selectoption--options--.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/30 xk6-browser/01 xk6-browser/09 Locator/textcontent--options--.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/30 xk6-browser/01 xk6-browser/09 Locator/press--options--.md
Outdated
Show resolved
Hide resolved
3ca9b89
to
4afb73c
Compare
Resolves: #743 (comment) Resolves: #743 (comment)
8d0fc6b
to
2a3d1d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍 Just a couple minor suggestions, and maybe clean up the history before merging if you have time. Not necessarily squashing it into a single commit, though that might be OK in this case.
Great job with the examples!
src/data/markdown/docs/30 xk6-browser/01 xk6-browser/07 Locator/check--options--.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/30 xk6-browser/01 xk6-browser/07 Locator/click--options--.md
Outdated
Show resolved
Hide resolved
src/data/markdown/docs/30 xk6-browser/01 xk6-browser/07 Locator/inputvalue--options--.md
Show resolved
Hide resolved
Resolves: #743 (comment) Resolves: #743 (comment)
19d2a60
to
5ed89cc
Compare
Resolves: #743 (comment) Resolves: #743 (comment)
cd978b0
to
6775f46
Compare
This adds the locator docs for xk6-browser, and all the options that go along with it. It only documents the APIs that work or have known issues. Closes: grafana/xk6-browser#459
6775f46
to
573258c
Compare
Closes: grafana/xk6-browser#459
This change documents all the methods for the
locator
api forxk6-browser
. It was tested against grafana/xk6-browser@dbede12. Several issues were also raised that need to be resolved. Testing was only done on a Mac, and not on a Windows or Linux based system.