codingblocks/qit.cloud

View on GitHub

Showing 50 of 50 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

describe('<AddToQueueButton className="{string}" />', () => {
it('className property should be included', () => {
const expectedValue = (new Date()).getTime().toString()
const wrapper = shallow(<AddToQueueButton className={expectedValue} />)
const button = wrapper.dive().find('button')
Severity: Major
Found in website/src/components/Main/Episode/AddToQueueButton.test.js and 1 other location - About 4 hrs to fix
website/src/components/Main/Episode/RemoveFromQueueButton.test.js on lines 16..23

Similar blocks of code found in 2 locations. Consider refactoring.
Open

describe('<RemoveFromQueueButton className="{string}" />', () => {
it('className property should be included', () => {
const expectedValue = (new Date()).getTime().toString()
const wrapper = shallow(<RemoveFromQueueButton className={expectedValue} />)
const button = wrapper.dive().find('button')
website/src/components/Main/Episode/AddToQueueButton.test.js on lines 18..25

Similar blocks of code found in 2 locations. Consider refactoring.
Open

describe('<AddToQueueButton onclick="{function}" />', () => {
it('should trigger the function on button click', () => {
const customMethod = sinon.spy()
const wrapper = shallow(<AddToQueueButton onClick={customMethod} />)
const button = wrapper.dive().find('button')
Severity: Major
Found in website/src/components/Main/Episode/AddToQueueButton.test.js and 1 other location - About 3 hrs to fix
website/src/components/Main/Episode/RemoveFromQueueButton.test.js on lines 25..33

Similar blocks of code found in 2 locations. Consider refactoring.
Open

describe('<RemoveFromQueueButton onclick="{function}" />', () => {
it('should trigger the function on button click', () => {
const customMethod = sinon.spy()
const wrapper = shallow(<RemoveFromQueueButton onClick={customMethod} />)
const button = wrapper.dive().find('button')
website/src/components/Main/Episode/AddToQueueButton.test.js on lines 41..49

Similar blocks of code found in 2 locations. Consider refactoring.
Open

const ConnectedApp = connect(state => ({
searchTerm: state.search.searchTerm,
currentSearch: state.search.currentSearch,
loading: state.search.loading,
nowPlaying: state.player.nowPlaying,
Severity: Major
Found in website/src/App.js and 1 other location - About 3 hrs to fix
website/src/components/Main/SearchResults.js on lines 102..110

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export const ConnectedSearchResults = connect(state => ({
nowPlaying: state.player.nowPlaying,
results: state.search.results,
resultCount: state.search.resultCount,
queue: state.player.queue,
Severity: Major
Found in website/src/components/Main/SearchResults.js and 1 other location - About 3 hrs to fix
website/src/App.js on lines 84..92

Function render has 90 lines of code (exceeds 25 allowed). Consider refactoring.
Open

render () {
return (
<div ref={this.sliderRef}>
<ScrubberWrapper>
{!this.props.hideLabel ? (
Severity: Major
Found in website/src/components/Player/Slider.js - About 3 hrs to fix

    Function render has 89 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    render () {
    return (
    <AudioControlsContainer>
    <TimeSliderContainer>
    <TimeSlider
    Severity: Major
    Found in website/src/components/Player/AudioPlayer.js - About 3 hrs to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      beforeEach(function () {
      cy.server()
       
      cy.route({
      method: 'GET',
      Severity: Major
      Found in website/cypress/integration/queue.spec.js and 1 other location - About 3 hrs to fix
      website/cypress/integration/main.spec.js on lines 3..16

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

      beforeEach(function () {
      cy.server()
       
      cy.route({
      method: 'GET',
      Severity: Major
      Found in website/cypress/integration/main.spec.js and 1 other location - About 3 hrs to fix
      website/cypress/integration/queue.spec.js on lines 2..15

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      layout: {
      width: 'auto',
      display: 'block', // Fix IE11 issue.
      marginLeft: theme.spacing.unit * 3,
      marginRight: theme.spacing.unit * 3,
      Severity: Major
      Found in website/src/components/Main/SignUpForm.js and 1 other location - About 3 hrs to fix
      website/src/components/Main/SignInForm.js on lines 19..29

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      layout: {
      width: 'auto',
      display: 'block', // Fix IE11 issue.
      marginLeft: theme.spacing.unit * 3,
      marginRight: theme.spacing.unit * 3,
      Severity: Major
      Found in website/src/components/Main/SignInForm.js and 1 other location - About 3 hrs to fix
      website/src/components/Main/SignUpForm.js on lines 19..29

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      paper: {
      marginTop: theme.spacing.unit * 8,
      display: 'flex',
      flexDirection: 'column',
      alignItems: 'center',
      Severity: Major
      Found in website/src/components/Main/SignInForm.js and 1 other location - About 3 hrs to fix
      website/src/components/Main/SignUpForm.js on lines 30..37

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      paper: {
      marginTop: theme.spacing.unit * 8,
      display: 'flex',
      flexDirection: 'column',
      alignItems: 'center',
      Severity: Major
      Found in website/src/components/Main/SignUpForm.js and 1 other location - About 3 hrs to fix
      website/src/components/Main/SignInForm.js on lines 30..37

      Function render has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      render () {
      const { classes, showSignin } = this.props
      const { handleSubmit, handleChange } = this
      return (
      <div>
      Severity: Major
      Found in website/src/components/Main/SignUpForm.js - About 2 hrs to fix

        Function render has 62 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        render () {
        const {
        className,
        results,
        resultCount,
        Severity: Major
        Found in website/src/components/Main/SearchResults.js - About 2 hrs to fix

          File AudioPlayer.js has 268 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import styled from 'styled-components'
          import React from 'react'
          import { actions } from 'mirrorx'
          import Mousetrap from 'mousetrap'
           
           
          Severity: Minor
          Found in website/src/components/Player/AudioPlayer.js - About 2 hrs to fix

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            describe('<RemoveFromQueueButton />', () => {
            it('should render without any props', () => {
            const wrapper = shallow(<RemoveFromQueueButton />)
            const button = wrapper.dive().find('button')
            expect(button).not.toBeNull()
            website/src/components/Main/Episode/AddToQueueButton.test.js on lines 10..16

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            describe('<AddToQueueButton />', () => {
            it('should render without any props', () => {
            const wrapper = shallow(<AddToQueueButton />)
            const button = wrapper.dive().find('button')
            expect(button).not.toBeNull()
            Severity: Major
            Found in website/src/components/Main/Episode/AddToQueueButton.test.js and 1 other location - About 2 hrs to fix
            website/src/components/Main/Episode/RemoveFromQueueButton.test.js on lines 8..14

            Function render has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            render () {
            const { classes, showSignup } = this.props
            const { handleSubmit, handleChange } = this
            return (
            <div>
            Severity: Major
            Found in website/src/components/Main/SignInForm.js - About 2 hrs to fix
              Severity
              Category
              Status
              Source
              Language