Remove sleep. Use Capybara select helper #11326

This commit is contained in:
Abdul Aziz Ali
2024-07-10 08:12:19 +08:00
parent 8955972b05
commit 1e08f2713e

View File

@@ -278,9 +278,7 @@ describe '
expect(page).to have_select(
"order_cycle_incoming_exchange_1_enterprise_fees_0_enterprise_id", minimum: 1
)
page.find("select#order_cycle_incoming_exchange_1_enterprise_fees_0_enterprise_id")
.all('option[label]').first.select_option
sleep 1
select "Permitted supplier", from: "order_cycle_incoming_exchange_1_enterprise_fees_0_enterprise_id"
expect(page).to have_select(
"order_cycle_incoming_exchange_1_enterprise_fees_0_enterprise_fee_id",
options: ["", supplier_permitted_fee1.name, supplier_permitted_fee3.name]