-1

I'd like to write some tests witch codecept.js but I'm not able to access the vuetify components.

    <v-layout>
      <v-flex xs7>
        <v-text-field
          ref="video1min"
          v-model="video1min"
          :rules="[rules.required, rules.youtubeVideo]"
          clearable
          class="pt-0"
          placeholder="Youtube Link"
        />
      </v-flex>
      <v-flex xs5>
        <v-checkbox
          v-model="defaultVideo"
          v-ruid="'defaultVideo'"
          label="Default Video"
          color="primary"
          class="default-video"
          @change="setDefaultVideo"
        />
      </v-flex>
    </v-layout>

I added an v-ruid which normally can be clicked like that:

I.click('[data-ruid=defaultVideo]');

But witch the vuetify components, I always got that error message: element not interactable

It's because the data-ruid is added to div around the checkbox. How can I access the checkbox directly?

enter image description here

SecretAgentMan
  • 2,856
  • 7
  • 21
  • 41
carl
  • 17
  • 4

1 Answers1

0

You can use CSS Selector to get input dom element inside.

This selector should work:

'[data-ruid=defaultVideo] input'

Edit:

Also in case of v-checkbox you also can click on label.

Selector is:

'[data-ruid=defaultVideo] label'
Đorđe Zeljić
  • 1,689
  • 2
  • 13
  • 30