Skip to content

Commit

Permalink
Merge pull request #5601 from tvdeyen/fix-flaky-stock-items-spec
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdeyen authored Jan 17, 2024
2 parents be710f3 + 2a61adc commit 338657a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions admin/spec/features/stock_items_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,28 @@
expect(find('tr', text: 'MY-SKU-1234567890')).to have_content('1 stock movement')

click_on 'Back Orderable'
expect(page).to have_css('[aria-current="true"]', text: 'Back Orderable')
expect(page).to_not have_content(non_backorderable.variant.sku)
expect(page).to have_content(backorderable.variant.sku)
expect(page).to_not have_content(out_of_stock.variant.sku)
expect(page).to_not have_content(low_stock.variant.sku)

click_on 'Out Of Stock'
expect(page).to have_css('[aria-current="true"]', text: 'Out Of Stock')
expect(page).to_not have_content(non_backorderable.variant.sku)
expect(page).to_not have_content(backorderable.variant.sku)
expect(page).to have_content(out_of_stock.variant.sku)
expect(page).to_not have_content(low_stock.variant.sku)

click_on 'Low Stock'
expect(page).to have_css('[aria-current="true"]', text: 'Low Stock')
expect(page).to_not have_content(non_backorderable.variant.sku)
expect(page).to_not have_content(backorderable.variant.sku)
expect(page).to_not have_content(out_of_stock.variant.sku)
expect(page).to have_content(low_stock.variant.sku)

click_on 'In Stock'
expect(page).to have_css('[aria-current="true"]', text: 'In Stock')
expect(page).to have_content(non_backorderable.variant.sku)
expect(page).to have_content(backorderable.variant.sku)
expect(page).to_not have_content(out_of_stock.variant.sku)
Expand Down

0 comments on commit 338657a

Please sign in to comment.