Add screenshotting
This commit is contained in:
@@ -151,7 +151,7 @@ function NowPlaying() {
|
||||
</Shadow>
|
||||
</ShadowOverlay>
|
||||
<ColoredBlurView style={{ borderRadius: 8 }}>
|
||||
<InnerContainer onPress={openNowPlayingModal} activeOpacity={0.5}>
|
||||
<InnerContainer onPress={openNowPlayingModal} activeOpacity={0.5} testID="open-player-modal">
|
||||
<ShadowWrapper size="small">
|
||||
<Cover source={{ uri: (track.artwork || '') as string }} style={defaultStyles.imageBackground} />
|
||||
</ShadowWrapper>
|
||||
|
||||
@@ -37,8 +37,8 @@ const NavigationHeader: React.FC = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<ListButton onPress={handleAllAlbumsClick}>{t('all-albums')}</ListButton>
|
||||
<ListButton onPress={handlePlaylistsClick}>{t('playlists')}</ListButton>
|
||||
<ListButton onPress={handleAllAlbumsClick} testID="all-albums">{t('all-albums')}</ListButton>
|
||||
<ListButton onPress={handlePlaylistsClick} testID="playlists">{t('playlists')}</ListButton>
|
||||
<ListContainer>
|
||||
<HeaderContainer>
|
||||
<Header>{t('recent-albums')}</Header>
|
||||
@@ -80,7 +80,7 @@ const RecentAlbums: React.FC = () => {
|
||||
columnWrapperStyle={styles.columnWrapper}
|
||||
ListHeaderComponent={NavigationHeader}
|
||||
renderItem={({ item }) => (
|
||||
<TouchableHandler id={item} onPress={selectAlbum}>
|
||||
<TouchableHandler id={item} onPress={selectAlbum} testID={`select-album-${item}`}>
|
||||
<AlbumItem>
|
||||
<ShadowWrapper size="medium">
|
||||
<AlbumImage source={{ uri: getImage(item) }} style={defaultStyles.imageBackground} />
|
||||
|
||||
@@ -125,8 +125,8 @@ const TrackListView: React.FC<TrackListViewProps> = ({
|
||||
<Header>{title}</Header>
|
||||
<SubHeader>{artist}</SubHeader>
|
||||
<WrappableButtonRow>
|
||||
<WrappableButton title={playButtonText} icon={Play} onPress={playEntity} />
|
||||
<WrappableButton title={shuffleButtonText} icon={Shuffle} onPress={shuffleEntity} />
|
||||
<WrappableButton title={playButtonText} icon={Play} onPress={playEntity} testID="play-album" />
|
||||
<WrappableButton title={shuffleButtonText} icon={Shuffle} onPress={shuffleEntity} testID="shuffle-album" />
|
||||
</WrappableButtonRow>
|
||||
<View style={{ marginTop: 8 }}>
|
||||
{trackIds.map((trackId, i) =>
|
||||
@@ -135,6 +135,7 @@ const TrackListView: React.FC<TrackListViewProps> = ({
|
||||
id={i}
|
||||
onPress={selectTrack}
|
||||
onLongPress={longPressTrack}
|
||||
testID={`play-track-${trackId}`}
|
||||
>
|
||||
<TrackContainer
|
||||
isPlaying={currentTrack?.backendId === trackId || false}
|
||||
@@ -183,12 +184,14 @@ const TrackListView: React.FC<TrackListViewProps> = ({
|
||||
title={downloadButtonText}
|
||||
onPress={downloadAllTracks}
|
||||
disabled={downloadedTracks.length === trackIds.length}
|
||||
testID="download-album"
|
||||
/>
|
||||
<WrappableButton
|
||||
icon={Trash}
|
||||
title={deleteButtonText}
|
||||
onPress={deleteAllTracks}
|
||||
disabled={downloadedTracks.length === 0}
|
||||
testID="delete-album"
|
||||
/>
|
||||
</WrappableButtonRow>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user