Sha256: b01d098f9b984a36f366024e3189e82ff32c73cf17a949530553c285aaf086cf

Contents?: true

Size: 1.57 KB

Versions: 5

Compression:

Stored size: 1.57 KB

Contents

# encoding: UTF-8

# Copyright 2011-2013 innoQ Deutschland GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

require File.join(File.expand_path(File.dirname(__FILE__)), '../integration_test_helper')

class CreateConceptTest < ActionDispatch::IntegrationTest
  test 'concept creation' do
    login('administrator')
    visit dashboard_path(lang: 'en')

    assert page.has_content? 'New Concept'
    click_link_or_button 'New Concept'

    assert page.has_content? 'A concept needs to be published before you can assign mapping properties.'
    # fill in english pref label
    fill_in 'concept_labelings_by_text_labeling_skos_pref_labels_en', with: 'Foo'

    save_check_and_publish
  end

  private

  def save_check_and_publish
    click_link_or_button 'Save'

    assert page.has_content? 'Concept has been successfully created.'
    assert page.has_content? 'Current revision 1'

    click_link_or_button 'Check consistency'
    assert page.has_content? 'Instance is consistent.'

    click_link_or_button 'Publish'
    assert page.has_content? 'Instance has been successfully published.'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
iqvoc-4.8.2 test/integration/create_concept_test.rb
iqvoc-4.8.1 test/integration/create_concept_test.rb
iqvoc-4.8.0 test/integration/create_concept_test.rb
iqvoc-4.7.0 test/integration/create_concept_test.rb
iqvoc-4.6.1 test/integration/create_concept_test.rb