mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 10:07:35 +00:00
Fix some tests (but not all)
This commit is contained in:
parent
56a5388cdf
commit
2a43de28cb
7 changed files with 21 additions and 3 deletions
|
|
@ -1,5 +1,7 @@
|
|||
const media = {
|
||||
addEventListener: jest.fn(),
|
||||
setVolume: jest.fn(),
|
||||
setBalance: jest.fn(),
|
||||
_analyser: null
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -253,12 +253,12 @@ exports[`MainWindow renders to snapshot 1`] = `
|
|||
step="1"
|
||||
style={
|
||||
Object {
|
||||
"backgroundPosition": "0 -195px",
|
||||
"backgroundPosition": "0 -315px",
|
||||
}
|
||||
}
|
||||
title="Volume Bar"
|
||||
type="range"
|
||||
value={50}
|
||||
value={78}
|
||||
/>
|
||||
<input
|
||||
className={undefined}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
const media = {
|
||||
addEventListener: jest.fn(),
|
||||
setVolume: jest.fn(),
|
||||
setBalance: jest.fn(),
|
||||
_analyser: null
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
const media = {
|
||||
addEventListener: jest.fn(),
|
||||
loadFromUrl: jest.fn(),
|
||||
setVolume: jest.fn(),
|
||||
setBalance: jest.fn(),
|
||||
_analyser: null
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,12 @@ exports[`PlaylistWindow renders to snapshot 1`] = `
|
|||
>
|
||||
<div
|
||||
className="playlist-tracks"
|
||||
onClick={[Function]}
|
||||
style={
|
||||
Object {
|
||||
"height": "100%",
|
||||
}
|
||||
}
|
||||
>
|
||||
<div
|
||||
className="playlist-track-numbers"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
const media = {
|
||||
addEventListener: jest.fn(),
|
||||
setVolume: jest.fn(),
|
||||
setBalance: jest.fn(),
|
||||
_analyser: null
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -206,7 +206,11 @@ const playlist = (state = defaultPlaylistState, action) => {
|
|||
export default playlist;
|
||||
|
||||
export const getTrackDisplayName = (state, id) => {
|
||||
const { artist, title } = state.tracks[id];
|
||||
const track = state.tracks[id];
|
||||
if (track == null) {
|
||||
return null;
|
||||
}
|
||||
const { artist, title } = track;
|
||||
if (artist && title) {
|
||||
return `${artist} - ${title}`;
|
||||
} else if (title) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue