From 40506a635314d17400a5d060bd2ee1f1f077dd74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarda=20Kot=C4=9B=C5=A1ovec?= Date: Tue, 9 Apr 2024 12:54:55 +0200 Subject: [PATCH] pkp/pkp-lib#9870 Adjust cypress tests for modal chnages --- .prettierignore | 1 + cypress/support/commands.js | 6 ++-- lib/pkp | 2 +- lib/ui-library | 2 +- plugins/generic/preprintToJournal | 1 + vite.config.js | 56 +++++++++++++++---------------- 6 files changed, 35 insertions(+), 33 deletions(-) create mode 160000 plugins/generic/preprintToJournal diff --git a/.prettierignore b/.prettierignore index a1121207a7..65a7e03876 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,4 @@ cypress/tests/**/* lib/pkp/cypress/**/* +cypress/support/**/* package.json \ No newline at end of file diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 79244f1561..7f8afd588e 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -23,11 +23,11 @@ Cypress.Commands.add('addSubmissionGalleys', (files) => { files.forEach(file => { cy.get('a:contains("Add File")').click(); cy.wait(2000); // Avoid occasional failure due to form init taking time - cy.get('div.pkp_modal_panel').then($modalDiv => { + cy.get('[role="dialog"]').then(($modalDiv) => { cy.wait(3000); $modalDiv.find('div.header:contains("Add File")'); - cy.get('div.pkp_modal_panel input[id^="label-"]').type('PDF', {delay: 0}); - cy.get('div.pkp_modal_panel button:contains("Save")').click(); + cy.get('[role="dialog"] input[id^="label-"]').type('PDF', {delay: 0}); + cy.get('[role="dialog"] button:contains("Save")').click(); cy.wait(2000); // Avoid occasional failure due to form init taking time }); cy.get('select[id=genreId]').select(file.genre); diff --git a/lib/pkp b/lib/pkp index aecaefc978..052cf3b573 160000 --- a/lib/pkp +++ b/lib/pkp @@ -1 +1 @@ -Subproject commit aecaefc9788e7cbdfb1edc4905ae8cb187634450 +Subproject commit 052cf3b573282094766ed39585af61b93bde32b1 diff --git a/lib/ui-library b/lib/ui-library index f904289d89..b23473b886 160000 --- a/lib/ui-library +++ b/lib/ui-library @@ -1 +1 @@ -Subproject commit f904289d894d6548be0140cd98dcde93e4e79a86 +Subproject commit b23473b88654805607d69bda40b900b14ef38f63 diff --git a/plugins/generic/preprintToJournal b/plugins/generic/preprintToJournal new file mode 160000 index 0000000000..2385fd4dec --- /dev/null +++ b/plugins/generic/preprintToJournal @@ -0,0 +1 @@ +Subproject commit 2385fd4dece113d7696ca7a9b58df5fec26aa134 diff --git a/vite.config.js b/vite.config.js index c543a1708e..31c7a37c57 100644 --- a/vite.config.js +++ b/vite.config.js @@ -50,35 +50,35 @@ export default defineConfig(({mode}) => { // use vue version with template compiler vue: 'vue/dist/vue.esm-bundler.js', }, + // https://github.com/vitejs/vite/discussions/15906 + dedupe: [ + '@headlessui/vue', + '@lk77/vue3-color', + 'tinymce/tinymce-vue', + '@vue-a11y/announcer', + '@vueuse/core', + 'chart.js', + 'clone-deep', + 'copyfiles', + 'debounce', + 'dropzone-vue3', + 'element-resize-event', + 'floating-vue', + 'highlight.js', + 'moment', + 'ofetch', + 'pinia', + 'swiper', + 'tiny-emitter', + 'tinymce', + 'uuid', + 'vue', + 'vue-chartjs', + 'vue-draggable-plus', + 'vue-scrollto', + 'vue3-highlightjs', + ], }, - // https://github.com/vitejs/vite/discussions/15906 - dedupe: [ - '@headlessui/vue', - '@lk77/vue3-color', - 'tinymce/tinymce-vue', - '@vue-a11y/announcer', - '@vueuse/core', - 'chart.js', - 'clone-deep', - 'copyfiles', - 'debounce', - 'dropzone-vue3', - 'element-resize-event', - 'floating-vue', - 'highlight.js', - 'moment', - 'ofetch', - 'pinia', - 'swiper', - 'tiny-emitter', - 'tinymce', - 'uuid', - 'vue', - 'vue-chartjs', - 'vue-draggable-plus', - 'vue-scrollto', - 'vue3-highlightjs', - ], build: { sourcemap: mode === 'development' ? 'inline' : false, target: ['chrome64', 'edge79', 'firefox67', 'safari12'],