Skip to content
Snippets Groups Projects
Select Git revision
  • d42d528d418ef5cdf6acf91a2784f47082a19d7d
  • main default protected
  • OZG-8073-date-component
  • OZG-7856_schadcode_scanner
  • OZG-7985-Statistik-Datenfreigabe
  • OZG-8305-Create-webpack-sbom
  • tooltip-improvements
  • ods-remove-class-inputs
  • release-info
  • release-administration
  • release
  • OZG-7714-UpgradeKeycloakDependencyTo25
  • OZG-8086-Admin-Datenanfrage-erstellen
  • OZG-8086-Datenanfrage-Umbenennung
  • mongodb-7-0-16-e2e
  • OZG-6220-Bescheid-speichern-ohne-Postfach
  • OZG-7922-KeycloakOperatorExceptions
  • OZG-8142-poc-cards
  • OZG-8086-E2E
  • OZG-8086-E2E2
  • OZG-8142-ProjectionStuff
  • 1.11.0-info
  • 1.11.0-administration
  • 2.26.0-alfa
  • 1.10.0-info
  • 1.10.0-administration
  • 2.25.0-alfa
  • 1.9.0-info
  • 1.9.0-administration
  • 2.24.0-alfa
  • 1.8.0-info
  • 1.8.0-administration
  • 2.23.0-alfa
  • 1.7.0-info
  • 1.7.0-administration
  • 2.22.0-alfa
  • 1.6.0-info
  • 1.6.0-administration
  • 2.21.0-alfa
  • 1.5.0-info
  • 1.5.0-administration
41 results

jest.preset.js

Blame
  • test_selenium.py 2.36 KiB
    # coding: utf-8
    from nosedep import depends
    
    from ckanext.odsh.tests.ckan_selenium import SeleniumCkanApp
    import pdb
    import uuid
    
    
    test_org = 'testherausgeber'
    
    
    class TestSelenium:
    
        app = None
    
        @classmethod
        def setup_class(cls):
            TestSelenium.app = SeleniumCkanApp()
            # TestSelenium.app.login()
    
        def test_login(self):
            TestSelenium.app.login()
            assert '/dataset' in TestSelenium.app.currentUrl()
    
        @depends(after=test_login)
        def test_create_dataset(self):
            TestSelenium.app.got_to_url('/dataset/new?group=')
            # assert TestSelenium.app.onMaster()
    
            guid = str(uuid.uuid4())
            title = 'test_' + guid
            data = {"field-title": title, "field-notes": title, 'datepicker_start': '26.06.2019',
                    'field-spatial_uri-value': 'http://dcat-ap.de/def/politicalGeocoding/districtKey/01001'}
            TestSelenium.app.fill_form(data)
            TestSelenium.app.select_by_visible_text(
                'field-license', 'Creative Commons CC Zero License (cc-zero)')
    
            elem = TestSelenium.app.findElementByClassName(
                'multiselect-native-select')
            TestSelenium.app.clickOnElement(elem)
            TestSelenium.app.findElementByXPath("//input[@value = 'soci']").click()
            TestSelenium.app.clickOnElement(elem)
    
            TestSelenium.app.findElementByName('save').click()
            TestSelenium.app.findElementByXPath("//a[text()='Link']").click()
    
            TestSelenium.app.fill_form(
                {'field-image-url': 'url.png', 'field-format': 'png'})
            TestSelenium.app.findElementById('form-submit-button').click()
    
            assert 'dataset/'+title in TestSelenium.app.currentUrl()
    
        # def test_search_order(self):
            # TestSelenium.app.got_to_url('/dataset/')
    
    
        @depends(after=test_create_dataset)
        def test_edit_paths(self):
            paths = ['/organization/edit/' + test_org,
                     '/dataset/edit/testtesttest',
                     '/dataset/testtesttest/resource_edit/afaec407-d033-439d-a699-fe9279b20e6b',
                     '/dataset/new_resource/testtesttest',
                     '/dataset/new?group=',
                     '/harvest',
                     '/harvest/test2',
                     '/harvest/admin/test2'
                     ]
            for path in paths:
                TestSelenium.app.got_to_url(path)
                cont = TestSelenium.app.get_slave_flag()
                assert cont == u'0'