Sha256: 5fa1e917192974f26387c9e89a3db23e73b38d51b470a99e6c760ca0415ee3eb

Contents?: true

Size: 1.35 KB

Versions: 5

Compression:

Stored size: 1.35 KB

Contents

# frozen_string_literal: true

describe TestCentricity::ScreenSection, required: true do
  before :context do
    @test_page = TestScreen.new
    @test_section = @test_page.section1
  end

  context 'section object traits' do
    it 'returns section name' do
      expect(@test_section.section_name).to eq('Basic Test Section')
    end

    it 'returns section locator' do
      expect(@test_section.get_locator).to eq([{ accessibility_id: 'test section' }])
    end

    it 'returns class' do
      expect(@test_section.class).to eql TestScreenSection
    end

    it 'registers with type section' do
      expect(@test_section.get_object_type).to eql :section
    end
  end

  context 'section object with UI elements' do
    it 'responds to element' do
      expect(@test_section).to respond_to(:element1)
    end

    it 'responds to button' do
      expect(@test_section).to respond_to(:button1)
    end

    it 'responds to textfield' do
      expect(@test_section).to respond_to(:field1)
    end

    it 'responds to image' do
      expect(@test_section).to respond_to(:image1)
    end

    it 'responds to switch' do
      expect(@test_section).to respond_to(:switch1)
    end

    it 'responds to checkbox' do
      expect(@test_section).to respond_to(:check1)
    end

    it 'responds to section' do
      expect(@test_section).to respond_to(:section2)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
testcentricity-3.0.4 spec/testcentricity/mobile/screen_section_object_spec.rb
testcentricity-3.0.3 spec/testcentricity/mobile/screen_section_object_spec.rb
testcentricity-3.0.2 spec/testcentricity/mobile/screen_section_object_spec.rb
testcentricity-3.0.1 spec/testcentricity/mobile/screen_section_object_spec.rb
testcentricity-3.0.0 spec/testcentricity/mobile/screen_section_object_spec.rb