OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#41849] add data-qa-selector to new attachment html
Eric Schubert53e2cecaf7f3
diff --git a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.html b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.htmlindex a271bcfe5a7..6d41e400097 100644--- a/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.html+++ b/frontend/src/app/shared/components/attachments/attachment-list/attachment-list-item.html@@ -13,6 +13,7 @@[textContent]="attachment.fileName"[title]="attachment.fileName"class="spot-list--item-title op-files-tab--file-list-item-title"+ data-qa-selector="op-files-tab--file-list-item-title"></span><spandiff --git a/modules/meeting/spec/features/meetings_attachments_spec.rb b/modules/meeting/spec/features/meetings_attachments_spec.rbindex 79f8cbacda7..2c45a61b4f7 100644--- a/modules/meeting/spec/features/meetings_attachments_spec.rb+++ b/modules/meeting/spec/features/meetings_attachments_spec.rb@@ -36,9 +36,9 @@ describe 'Add an attachment to a meeting (agenda)', js: true doenddescribe 'wysiwyg editor' do- context 'on an existing page' do+ context 'if on an existing page' doit 'can upload an image via drag & drop' do- target = find('.ck-content')+ find('.ck-content')editor.expect_button 'Insert image'@@ -63,16 +63,17 @@ describe 'Add an attachment to a meeting (agenda)', js: true do### Attach file manually- expect(page).to have_no_selector('.work-package--attachments--filename')+ expect(page).to have_no_selector('[data-qa-selector="op-files-tab--file-list-item-title"]')attachments.attach_file_on_input(image_fixture.path)expect(page).not_to have_selector('op-toasters-upload-progress')- expect(page).to have_selector('.work-package--attachments--filename', text: 'image.png', wait: 5)+ expect(page).to have_selector('[data-qa-selector="op-files-tab--file-list-item-title"]', text: 'image.png', wait: 5)### and via drag & dropattachments.drag_and_drop_file(container, image_fixture.path)expect(page).not_to have_selector('op-toasters-upload-progress')- expect(page).to have_selector('.work-package--attachments--filename', text: 'image.png', count: 2, wait: 5)+ expect(page)+ .to have_selector('[data-qa-selector="op-files-tab--file-list-item-title"]', text: 'image.png', count: 2, wait: 5)endendenddiff --git a/spec/features/admin/attribute_help_texts_spec.rb b/spec/features/admin/attribute_help_texts_spec.rbindex 6322ee148d0..ab21ec7a772 100644--- a/spec/features/admin/attribute_help_texts_spec.rb+++ b/spec/features/admin/attribute_help_texts_spec.rb@@ -99,7 +99,7 @@ describe 'Attribute help texts', js: true do# Expect files section to be presentexpect(modal.modal_container).to have_selector('.form--fieldset-legend', text: 'ATTACHMENTS')- expect(modal.modal_container).to have_selector('.work-package--attachments--filename')+ expect(modal.modal_container).to have_selector('[data-qa-selector="op-files-tab--file-list-item-title"]')modal.close!diff --git a/spec/features/work_packages/attachments/attachment_upload_spec.rb b/spec/features/work_packages/attachments/attachment_upload_spec.rbindex a02e36c39a1..8bcaca63715 100644--- a/spec/features/work_packages/attachments/attachment_upload_spec.rb+++ b/spec/features/work_packages/attachments/attachment_upload_spec.rb@@ -189,7 +189,7 @@ describe 'Upload attachment to work package', js: true do:center,page.find('[data-qa-tab-id="files"]')- expect(page).to have_selector('.work-package--attachments--filename', text: 'image.png', wait: 10)+ expect(page).to have_selector('[data-qa-selector="op-files-tab--file-list-item-title"]', text: 'image.png', wait: 10)expect(page).not_to have_selector('op-toasters-upload-progress')wp_page.expect_tab 'Files'end@@ -211,16 +211,17 @@ describe 'Upload attachment to work package', js: true do### Attach file manually- expect(page).to have_no_selector('.work-package--attachments--filename')+ expect(page).to have_no_selector('[data-qa-selector="op-files-tab--file-list-item-title"]')attachments.attach_file_on_input(image_fixture.path)expect(page).not_to have_selector('op-toasters-upload-progress')- expect(page).to have_selector('.work-package--attachments--filename', text: 'image.png', wait: 5)+ expect(page).to have_selector('[data-qa-selector="op-files-tab--file-list-item-title"]', text: 'image.png', wait: 5)### and via drag & dropattachments.drag_and_drop_file(container, image_fixture.path)expect(page).not_to have_selector('op-toasters-upload-progress')- expect(page).to have_selector('.work-package--attachments--filename', text: 'image.png', count: 2, wait: 5)+ expect(page)+ .to have_selector('[data-qa-selector="op-files-tab--file-list-item-title"]', text: 'image.png', count: 2, wait: 5)endendenddiff --git a/spec/features/work_packages/navigation_spec.rb b/spec/features/work_packages/navigation_spec.rbindex 548e253577c..7f948e7f5d0 100644--- a/spec/features/work_packages/navigation_spec.rb+++ b/spec/features/work_packages/navigation_spec.rb@@ -259,7 +259,8 @@ describe 'Work package navigation', js: true, selenium: true dofull_view.ensure_page_loadedfull_view.switch_to_tab(tab: 'FILES')- expect(page).to have_selector('.work-package--attachments--filename', text: 'attachment-first.pdf', wait: 10)+ expect(page)+ .to have_selector('[data-qa-selector="op-files-tab--file-list-item-title"]', text: 'attachment-first.pdf', wait: 10)endend