garris / garris/ember-backstop

Old reference images are not cleaned up

Open
#65 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
57
Forks
20
PR merge metrics
No merged PRs in 30d

Description

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.
```js
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.
```diff
- test('shows specific rental details', async function(assert) {
+ test('foobar', async function(assert) {
```

```
$ ember test
$ ember backstop-approve
```

--->

actual:

```diff
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:

```diff
- 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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.