Adds js wait line to reduce flakiness

This commit is contained in:
filipefurtad0
2021-11-01 17:42:41 +00:00
parent a179acff2a
commit 0a14da59d5

View File

@@ -90,7 +90,7 @@ describe '
select2_select product.name, from: 'add_variant_id', search: true
find('button.add_variant').click
page.has_selector? "table.index tbody[data-hook='admin_order_form_line_items'] tr" # Wait for JS
expect(page).to have_selector 'td', text: product.name
expect(order.line_items.reload.map(&:product)).to include product
end