File tree 1 file changed +9
-0
lines changed
spec/support/components/work_packages
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -56,11 +56,18 @@ def find_relatable(relatable)
56
56
end
57
57
end
58
58
59
+ def expect_tab_is_loaded
60
+ within ( "wp-relations-tab" ) do
61
+ expect ( page ) . to have_no_css ( "op-content-loader" )
62
+ end
63
+ end
64
+
59
65
def expect_add_relation_button
60
66
expect ( page ) . to have_test_selector ( "new-relation-action-menu" )
61
67
end
62
68
63
69
def expect_no_add_relation_button
70
+ expect_tab_is_loaded # Make sure the tab is loaded before checking non existing elements
64
71
expect ( page ) . not_to have_test_selector ( "new-relation-action-menu" )
65
72
end
66
73
@@ -83,6 +90,7 @@ def expect_row(work_package)
83
90
end
84
91
85
92
def expect_no_row ( relatable )
93
+ expect_tab_is_loaded # Make sure the tab is loaded before checking non existing elements
86
94
actual_relatable = find_relatable ( relatable )
87
95
expect ( page ) . not_to have_test_selector ( "op-relation-row-visible-#{ actual_relatable . id } " ) ,
88
96
"expected no relation row for work package " \
@@ -303,6 +311,7 @@ def expect_parent(work_package)
303
311
end
304
312
305
313
def expect_no_parent
314
+ expect_tab_is_loaded # Make sure the tab is loaded before checking non existing elements
306
315
expect ( page ) . not_to have_test_selector "op-wp-breadcrumb-parent" , wait : 10
307
316
end
308
317
You can’t perform that action at this time.
0 commit comments