Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeop committed May 3, 2022
1 parent 5767507 commit 938d233
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,6 @@ exports[`Track view container should display favorite tracks 1`] = `
>
Your favorite tracks
</div>
<div
class="button_container"
>
<a
class="play_button"
href="#"
>
<i
aria-hidden="true"
class="play icon"
/>
Play
</a>
</div>
<div
class="ui segment"
>
Expand Down Expand Up @@ -402,20 +388,6 @@ exports[`Track view container should show a popup when a track is clicked 1`] =
>
Your favorite tracks
</div>
<div
class="button_container"
>
<a
class="play_button"
href="#"
>
<i
aria-hidden="true"
class="play icon"
/>
Play
</a>
</div>
<div
class="ui segment"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ describe('Library view container', () => {
);
});

it('should add a track from the local library to the queue', () => {
const { component, store } = mountComponent();

waitFor(() => component.getByText(/local track 1/i).click());
waitFor(() => component.getByText(/add to queue/i).click());

const state = store.getState();

expect(state.queue.queueItems.length).toBe(1);
});

const mountComponent = mountedComponentFactory(
['/library'],
buildStoreState()
Expand Down

0 comments on commit 938d233

Please sign in to comment.