From cf3dda7b7458bfb9820b80989d71a750c3114abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20B=C3=A4dorf?= Date: Tue, 19 Apr 2022 12:15:39 +0200 Subject: [PATCH] Fix inline create button selection in specs --- .../components/wp-inline-create/wp-inline-create.component.html | 2 ++ spec/support/components/work_packages/relations.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/features/work-packages/components/wp-inline-create/wp-inline-create.component.html b/frontend/src/app/features/work-packages/components/wp-inline-create/wp-inline-create.component.html index 79d231597c..eb54f32740 100644 --- a/frontend/src/app/features/work-packages/components/wp-inline-create/wp-inline-create.component.html +++ b/frontend/src/app/features/work-packages/components/wp-inline-create/wp-inline-create.component.html @@ -15,6 +15,7 @@ (click)="handleAddRowClick()" [attr.aria-label]="text.create" aria-haspopup="true" + data-qa-selector="op-wp-inline-create" > @@ -26,6 +27,7 @@ (click)="handleReferenceClick()" [attr.aria-label]="text.create" aria-haspopup="true" + data-qa-selector="op-wp-inline-create-reference" > diff --git a/spec/support/components/work_packages/relations.rb b/spec/support/components/work_packages/relations.rb index bfdb863480..5c56e32393 100644 --- a/spec/support/components/work_packages/relations.rb +++ b/spec/support/components/work_packages/relations.rb @@ -164,7 +164,7 @@ module Components def inline_create_child(subject_text) container = find('.wp-relations--children') - scroll_to_and_click(container.find('.wp-inline-create-button-row .wp-inline-create--add-link')) + scroll_to_and_click(container.find('[data-qa-selector="op-wp-inline-create"]')) subject = ::EditField.new(container, 'subject') subject.expect_active!