Class: MatChip

Inherits:
MaterialAngularIO::Component
  • Object
show all
Defined in:
lib/insite/examples/material_angular_io/components/mat_chip.rb

Direct Known Subclasses

OverwrittenSelector

Instance Method Summary collapse

Instance Method Details

#disabled?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/insite/examples/material_angular_io/components/mat_chip.rb', line 6

def disabled?
  element(class: 'mat-chip-disabled').exist?
end

#labelObject



10
11
12
# File 'lib/insite/examples/material_angular_io/components/mat_chip.rb', line 10

def label
  nokogiri.xpath('//text()')[0]
end

#removable?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/insite/examples/material_angular_io/components/mat_chip.rb', line 18

def removable?
  element(class: 'mat-chip-remove').exist?
end

#removeObject



14
15
16
# File 'lib/insite/examples/material_angular_io/components/mat_chip.rb', line 14

def remove
  element(class: 'mat-chip-remove').click
end

#selectable?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/insite/examples/material_angular_io/components/mat_chip.rb', line 26

def selectable?
  element(class: 'mat-chip-select').exist?
end

#selected?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/insite/examples/material_angular_io/components/mat_chip.rb', line 22

def selected?
  aria_selected == 'true'
end