Sha256: 9f7c053b367661b3d9e274b467281e22fe4bbf6c1a15db7edb57e9214677f8c1

Contents?: true

Size: 1.46 KB

Versions: 8

Compression:

Stored size: 1.46 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'

    # 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

8 entries across 8 versions & 1 rubygems

Version Path
iqvoc-4.13.2 test/integration/create_concept_test.rb
iqvoc-4.13.0 test/integration/create_concept_test.rb
iqvoc-4.12.1 test/integration/create_concept_test.rb
iqvoc-4.12.0 test/integration/create_concept_test.rb
iqvoc-4.11.1 test/integration/create_concept_test.rb
iqvoc-4.11.0 test/integration/create_concept_test.rb
iqvoc-4.10.0 test/integration/create_concept_test.rb
iqvoc-4.9.0 test/integration/create_concept_test.rb