Skip to content

Commit

Permalink
fix: don't override uppercase
Browse files Browse the repository at this point in the history
  • Loading branch information
sheremet-va committed Jun 27, 2024
1 parent cd9cc6b commit caef40a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/browser/src/client/tester/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ export const userEvent: UserEvent = {
const values = provider === 'webdriverio'
? getWebdriverioSelectOptions(element, value)
: getSimpleSelectOptions(element, value)
return triggerCommand('__vitest_selectOptions', convertElementToXPath(element), values)
const xpath = convertElementToXPath(element)
return triggerCommand('__vitest_selectOptions', xpath, values)
},
type(element: Element, text: string, options: UserEventTypeOptions = {}) {
const xpath = convertElementToXPath(element)
Expand Down Expand Up @@ -210,7 +211,7 @@ export const page: BrowserPage = {
screenshotIds[repeatCount][taskName] = number + 1

const name
= options.path || `${taskName.replace(/[^a-z0-9]/g, '-')}-${number}.png`
= options.path || `${taskName.replace(/[^a-z0-9]/gi, '-')}-${number}.png`

return triggerCommand('__vitest_screenshot', name, {
...options,
Expand Down

0 comments on commit caef40a

Please sign in to comment.