Skip to content

Commit

Permalink
Update react-scripts and depending libraries.
Browse files Browse the repository at this point in the history
This currently breaks. Waiting for PR: facebook/create-react-app#11886

Update Spotify wrapper.
  • Loading branch information
schmidti159 committed Jun 8, 2022
1 parent 3eddbe9 commit 040333a
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion songskipper-backend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:1.6.0")
implementation("se.michaelthelin.spotify:spotify-web-api-java:6.5.4")
implementation("se.michaelthelin.spotify:spotify-web-api-java:7.0.0")
implementation("org.slf4j:slf4j-api")
implementation("org.liquibase:liquibase-core")
implementation("org.springdoc:springdoc-openapi-ui:1.6.3")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package de.adschmidt.songskipper.backend.api

import com.wrapper.spotify.model_objects.specification.AlbumSimplified
import com.wrapper.spotify.model_objects.specification.ArtistSimplified
import com.wrapper.spotify.model_objects.specification.Track as SpotifyTrack
import se.michaelthelin.spotify.model_objects.specification.AlbumSimplified
import se.michaelthelin.spotify.model_objects.specification.ArtistSimplified
import se.michaelthelin.spotify.model_objects.specification.Track as SpotifyTrack

data class Artist(
val name: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package de.adschmidt.songskipper.backend.services

import com.wrapper.spotify.model_objects.miscellaneous.CurrentlyPlaying
import com.wrapper.spotify.model_objects.specification.PlayHistory
import com.wrapper.spotify.model_objects.specification.Track
import se.michaelthelin.spotify.model_objects.miscellaneous.CurrentlyPlaying
import se.michaelthelin.spotify.model_objects.specification.PlayHistory
import se.michaelthelin.spotify.model_objects.specification.Track
import de.adschmidt.songskipper.backend.spotify.SpotifyApiSupplier
import kotlinx.coroutines.future.await
import org.springframework.stereotype.Service
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package de.adschmidt.songskipper.backend.spotify

import com.wrapper.spotify.SpotifyApi
import de.adschmidt.songskipper.backend.Loggable
import de.adschmidt.songskipper.backend.logger
import de.adschmidt.songskipper.backend.persistence.model.SpotifyUserModel
import de.adschmidt.songskipper.backend.persistence.repo.SpotifyUserRepo
import kotlinx.coroutines.future.await
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Component
import se.michaelthelin.spotify.SpotifyApi
import java.lang.Integer.min
import java.time.Instant
import java.time.temporal.ChronoUnit.SECONDS
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.adschmidt.songskipper.backend.services

import com.wrapper.spotify.model_objects.miscellaneous.CurrentlyPlaying
import com.wrapper.spotify.model_objects.specification.*
import se.michaelthelin.spotify.model_objects.miscellaneous.CurrentlyPlaying
import se.michaelthelin.spotify.model_objects.specification.*
import de.adschmidt.songskipper.backend.persistence.repo.SpotifyUserRepo
import de.adschmidt.songskipper.backend.spotify.SpotifyApiSupplier
import java.util.*
Expand Down
2 changes: 2 additions & 0 deletions songskipper-frontend/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ plugins {
val npmRunTests = tasks.register<NpmTask>("npmRunTests") {
dependsOn(tasks.npmInstall)
outputs.dir("coverage")
inputs.file("package-lock.json")
inputs.dir("src")
environment.put("CI", "true")
args.set(listOf("run", "test"))
Expand All @@ -21,6 +22,7 @@ val npmRunBuild = tasks.register<NpmTask>("npmRunBuild") {
outputs.dir("build/resources/main/static")
inputs.dir("src")
inputs.dir("public")
inputs.file("package-lock.json")
args.set(listOf("run", "build"))
}
tasks.jar {
Expand Down
14 changes: 7 additions & 7 deletions songskipper-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.1.2",
"@testing-library/user-event": "^12.8.3",
"@types/jest": "^26.0.24",
"@types/node": "^12.20.27",
"@types/react": "^17.0.24",
"@types/react-dom": "^17.0.9",
"@types/react-router-dom": "^5.3.1",
"@types/jest": "^27.4.0",
"@types/node": "^17.0.12",
"@types/react": "^17.0.38",
"@types/react-dom": "^17.0.11",
"@types/react-router-dom": "^5.3.3",
"@types/sockjs-client": "^1.5.1",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-redux": "^7.2.5",
"react-router-dom": "^5.3.0",
"react-scripts": "4.0.3",
"react-scripts": "5.0.0",
"recharts": "^2.1.4",
"redux-thunk": "^2.3.0",
"sockjs-client": "^1.5.2",
"typescript": "^4.4.3",
"typescript": "^4.5.5",
"web-vitals": "^1.1.2"
},
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
import { rest } from 'msw';
import { setupServer } from 'msw/node';
import { TextDecoder, TextEncoder } from 'util';
import { act } from 'react-dom/test-utils';
import { api } from '../../api/api';
import { store } from '../../app/store';
import { Track } from '../../common/types';
import { act, fireEvent, render, screen, waitFor, within } from '../../test-utils';
import { fireEvent, render, screen, waitFor, within } from '../../test-utils';
import CurrentlyPlayingPage from './CurrentlyPlayingPage';
import PlayerControlButtons from './PlayerControlButtons';
import SkipperCard from './SkipperCard';
import TrackCardContent from './TrackCardContent';
import TrackCardMedia from './TrackCardMedia';

global.TextEncoder = TextEncoder;
global.TextDecoder = TextDecoder;

describe('CurrentlyPlayingPage', () => {
const track: Track = {
title: 'myTitle',
Expand Down Expand Up @@ -141,9 +138,10 @@ describe('CurrentlyPlayingPage', () => {
expect(progressbar.getAttribute('aria-valuemin')).toEqual('0');
expect(progressbar.getAttribute('aria-valuenow')).toEqual('55');

act(() =>
jest.advanceTimersByTime(2000)
);
act(() => {
jest.advanceTimersByTime(2000);
});

progressbar = screen.getByRole('progressbar');
expect(screen.getByText(/0:25\s*\/\s*0:42/)).toBeInTheDocument();
expect(progressbar.getAttribute('aria-valuemax')).toEqual('100');
Expand Down

0 comments on commit 040333a

Please sign in to comment.