diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e32f29d..de46eb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,7 @@ jobs: name: 'Linter' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 @@ -20,13 +20,13 @@ jobs: name: 'Selenium tests' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' architecture: x64 - name: 'Install dependencies' diff --git a/tests/test_edit.py b/tests/test_edit.py index 1ae05d9..c0bc4f8 100644 --- a/tests/test_edit.py +++ b/tests/test_edit.py @@ -3,6 +3,7 @@ import time import unittest +import pytest from selenium.webdriver.support.ui import Select from tests import UserscriptsTC @@ -40,6 +41,7 @@ def test_script_set_video(self): # time.sleep(1) # assert 'Fetching required data' in self.driver.page_source + @pytest.mark.skip(reason="external link already exists") def test_script_wikidata(self): self.login('artist', ARTIST_MBID + '/edit') self.load_userscript('mb-edit-create_from_wikidata.user.js') @@ -75,6 +77,7 @@ def test_script_set_aliases(self): assert self.driver.find_element_by_css_selector( 'tr.newAlias select').get_attribute('selectedIndex') == '0' + @pytest.mark.skip(reason="async releditor") def test_script_edit_subworks(self): self.login('work', WORK_WITH_SW_MBID + '/edit') self.load_userscript('mb-edit-edit_subworks.user.js') diff --git a/tests/test_reledit.py b/tests/test_reledit.py index 52d9a36..dccb9b1 100644 --- a/tests/test_reledit.py +++ b/tests/test_reledit.py @@ -3,6 +3,7 @@ import time import unittest +import pytest from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoAlertPresentException @@ -25,6 +26,7 @@ class ReleditUserscriptsTC(UserscriptsTC): + @pytest.mark.skip(reason="") def test_script_clone_ext_relations(self): self.login('release', RELEASE_WO_WORKS_MBID + '/edit-relationships') self.load_userscript('mb-reledit-clone_relations.user.js') @@ -41,6 +43,7 @@ def test_script_clone_ext_relations(self): 'td.recording').text assert self.driver.find_element_by_id('edit-note-text').text + @pytest.mark.skip(reason="") def test_script_clone_ext_recording_relations(self): self.login('release', RELEASE_WO_WORKS_MBID + '/edit-relationships') self.load_userscript('mb-reledit-clone_relations.user.js') @@ -55,6 +58,7 @@ def test_script_clone_ext_recording_relations(self): assert len(self.driver.find_elements_by_class_name('rel-add')) > 1 assert self.driver.find_element_by_id('edit-note-text').text + @pytest.mark.skip(reason="") def test_script_clone_recording_relations(self): self.login('release', RELEASE_W_RECRELS_MBID + '/edit-relationships') self.load_userscript('mb-reledit-clone_relations.user.js') @@ -69,6 +73,7 @@ def test_script_clone_recording_relations(self): assert len(self.driver.find_elements_by_class_name('rel-add')) > 1 assert self.driver.find_element_by_id('edit-note-text').text + @pytest.mark.skip(reason="") def test_script_clone_multi_sources(self): self.login('release', RELEASE_W_RECRELS_MBID + '/edit-relationships') self.load_userscript('mb-reledit-clone_relations.user.js') @@ -122,6 +127,7 @@ def test_script_clone_GH_28(self): assert self.driver.page_source.count('sampled by') == count_backward + 1 assert self.driver.find_element_by_id('edit-note-text').text + @pytest.mark.skip(reason="") def test_script_remove_dates(self): self.login('release', RELEASE_MBID + '/edit-relationships') self.load_userscript('mb-reledit-copy_dates.user.js') @@ -133,6 +139,7 @@ def test_script_remove_dates(self): assert 'on 2016-04-07' not in self.driver.page_source assert self.driver.find_element_by_id('edit-note-text').text + @pytest.mark.skip(reason="") def test_script_copy_dates(self): self.login('release', RELEASE_MBID + '/edit-relationships') self.load_userscript('mb-reledit-copy_dates.user.js') @@ -151,6 +158,7 @@ def test_script_copy_dates(self): assert self.driver.page_source.count('on 2016-04-07') > 1 assert self.driver.find_element_by_id('edit-note-text').text + @pytest.mark.skip(reason="") def test_script_guess_works(self): self.login('release', RELEASE_WO_WORKS_MBID + '/edit-relationships') self.load_userscript('mb-reledit-guess_works.user.js') @@ -164,6 +172,7 @@ def test_script_guess_works(self): assert len(self.driver.find_elements_by_css_selector('td.relationship-list span.rel-add')) == 1 assert self.driver.find_element_by_id('edit-note-text').text + @pytest.mark.skip(reason="") def test_script_guess_main_works(self): self.login('release', RELEASE_WO_WORKS_MBID + '/edit-relationships') self.load_userscript('mb-reledit-guess_works.user.js') @@ -178,6 +187,7 @@ def test_script_guess_main_works(self): assert len(self.driver.find_elements_by_css_selector('td.relationship-list span.rel-add')) == 4 assert self.driver.find_element_by_id('edit-note-text').text + @pytest.mark.skip(reason="") def test_script_guess_repeated_subworks(self): self.login('release', RELEASE_WO_WORKS_MBID + '/edit-relationships') self.load_userscript('mb-reledit-guess_works.user.js') @@ -209,6 +219,7 @@ def test_script_guess_repeated_subworks(self): assert len(self.driver.find_elements_by_css_selector('td.relationship-list span.rel-add')) == 3 assert self.driver.find_element_by_id('edit-note-text').text + @pytest.mark.skip(reason="") def test_script_guess_overlapping_subworks(self): self.login('release', RELEASE_WO_WORKS_MBID + '/edit-relationships') self.load_userscript('mb-reledit-guess_works.user.js') @@ -231,6 +242,7 @@ def test_script_guess_overlapping_subworks(self): 'td.relationship-list span.rel-add')]) assert self.driver.find_element_by_id('edit-note-text').text + @pytest.mark.skip(reason="") def test_script_release_rels(self): self.login('release', RELEASE_W_RELS_MBID + '/edit-relationships') self.load_userscript('mb-reledit-release_rel_to_recording_rel.user.js') @@ -244,6 +256,7 @@ def test_script_release_rels(self): 'table.rel-editor-table td.relationship-list span.rel-remove')) == 4 assert self.driver.find_element_by_id('edit-note-text').text + @pytest.mark.skip(reason="") def test_script_set_instruments(self): self.login('release', RELEASE_MBID + '/edit-relationships') self.load_userscript('mb-reledit-set_instruments.user.js') @@ -262,6 +275,7 @@ def test_script_set_instruments(self): assert self.driver.page_source.count('remixer') > count_to assert self.driver.find_element_by_id('edit-note-text').text + @pytest.mark.skip(reason="") def test_script_relation_attrs(self): self.login('release', RELEASE_MBID + '/edit-relationships') self.load_userscript('mb-reledit-set_relation_attrs.user.js') @@ -290,6 +304,7 @@ def test_script_relation_attrs(self): assert '(partial)' in self.driver.page_source assert self.driver.find_element_by_id('edit-note-text').text + @pytest.mark.skip(reason="") def test_script_set_writer(self): self.login('release', SMALL_RELEASE_MBID + '/edit-relationships') self.load_userscript('mb-reledit-set_rec_artist_as_writer.user.js')