Skip to content

Commit f2ce53c

Browse files
authored
ci: update locator for uploading files test (#7900)
1 parent 9be32fb commit f2ce53c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/browser/test/userEvent.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,7 @@ describe('uploading files', async () => {
875875
test.skipIf(server.provider === 'webdriverio')('can upload an instance of File', async () => {
876876
const file = new File(['hello'], 'hello.png', { type: 'image/png' })
877877
const input = document.createElement('input')
878+
input.id = 'file'
878879
input.type = 'file'
879880
document.body.appendChild(input)
880881
await userEvent.upload(input, file)
@@ -889,6 +890,7 @@ describe('uploading files', async () => {
889890
const file1 = new File(['hello1'], 'hello1.png', { type: 'image/png' })
890891
const file2 = new File(['hello2'], 'hello2.png', { type: 'image/png' })
891892
const input = document.createElement('input')
893+
input.id = 'file'
892894
input.type = 'file'
893895
input.multiple = true
894896
document.body.appendChild(input)
@@ -908,6 +910,7 @@ describe('uploading files', async () => {
908910
server.provider === 'webdriverio' && server.browser === 'firefox',
909911
)('can upload a file by filepath relative to test file', async () => {
910912
const input = document.createElement('input')
913+
input.id = 'file'
911914
input.type = 'file'
912915
document.body.appendChild(input)
913916
await userEvent.upload(input, '../src/button.css')
@@ -922,6 +925,7 @@ describe('uploading files', async () => {
922925
server.provider === 'webdriverio' && server.browser === 'firefox',
923926
)('can upload several files by filepath relative to test file', async () => {
924927
const input = document.createElement('input')
928+
input.id = 'file'
925929
input.type = 'file'
926930
input.multiple = true
927931
document.body.appendChild(input)

0 commit comments

Comments
 (0)