garris / ember-backstop

BackstopJS visual regression testing addon for Ember.
MIT License
56 stars 21 forks source link

Old reference images are not cleaned up #65

Open nag5000 opened 2 years ago

nag5000 commented 2 years ago

If I remove await backstop(assert); from a test or remove/rename a test with await backstop(assert);, ember test && ember backstop-approve does not remove according (obsolete) image reference from bitmaps_reference/. This is not a big problem, but since bitmaps_reference/ is committed to git, it would be great to autoremove old image references via ember backstop-approve.

For example: 1.

test('shows specific rental details', async function(assert) {
  await visit('/rentals');
  await click('.grand-old-mansion');
  await backstop(assert);
});
bitmaps_reference/ember-backstoptest_Acceptance__list_rentals__shows_specific_rental_details__assert0_0_document_0_webview.png

2.

- test('shows specific rental details', async function(assert) {
+ test('foobar', async function(assert) {
$ ember test
$ ember backstop-approve

--->

actual:

bitmaps_reference/ember-backstoptest_Acceptance__list_rentals__shows_specific_rental_details__assert0_0_document_0_webview.png
+ bitmaps_reference/ember-backstoptest_Acceptance__list_rentals__foobar__assert0_0_document_0_webview.png

expected:

- bitmaps_reference/ember-backstoptest_Acceptance__list_rentals__shows_specific_rental_details__assert0_0_document_0_webview.png
+ bitmaps_reference/ember-backstoptest_Acceptance__list_rentals__foobar__assert0_0_document_0_webview.png