codingblocks/qit.cloud

View on GitHub

Showing 50 of 50 total issues

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

it('can load the main page via back button', function () {
cy.get('#root').click({ force: true })
cy.title().should('eq', 'qit: Tech podcasts by topic')
cy.get('input').should(
'have.attr',
Severity: Major
Found in website/cypress/integration/search.spec.js and 1 other location - About 2 hrs to fix
website/cypress/integration/search.spec.js on lines 117..125

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

it('can load the main page via back button', function () {
cy.get('#root').click({ force: true })
cy.title().should('eq', 'qit: Tech podcasts by topic')
cy.get('input').should(
'have.attr',
Severity: Major
Found in website/cypress/integration/search.spec.js and 1 other location - About 2 hrs to fix
website/cypress/integration/search.spec.js on lines 58..66

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

<FormControl margin='normal' required fullWidth>
<InputLabel htmlFor='password'>Password</InputLabel>
<Input
name='password'
type='password'
Severity: Major
Found in website/src/components/Main/SignUpForm.js and 1 other location - About 2 hrs to fix
website/src/components/Main/SignInForm.js on lines 102..111

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

<FormControl margin='normal' required fullWidth>
<InputLabel htmlFor='password'>Password</InputLabel>
<Input
name='password'
type='password'
Severity: Major
Found in website/src/components/Main/SignInForm.js and 1 other location - About 2 hrs to fix
website/src/components/Main/SignUpForm.js on lines 105..114

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

<FormControl margin='normal' required fullWidth>
<InputLabel htmlFor='email'>Username</InputLabel>
<Input
id='username'
name='username'
Severity: Major
Found in website/src/components/Main/SignUpForm.js and 1 other location - About 1 hr to fix
website/src/components/Main/SignInForm.js on lines 92..101

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

<FormControl margin='normal' required fullWidth>
<InputLabel htmlFor='email'>Username</InputLabel>
<Input
id='username'
name='username'
Severity: Major
Found in website/src/components/Main/SignInForm.js and 1 other location - About 1 hr to fix
website/src/components/Main/SignUpForm.js on lines 95..104

Function eventTracking has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const eventTracking = mirror.hook((action, getState) => {
switch (action.type) {
case 'player/addToQueue':
const toAddAudioUrl = action.data.audioUrl
gtag('event', 'add_to_queue', {
Severity: Minor
Found in website/src/hooks/eventTrackingHook.js - About 1 hr to fix

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

    render () {
    const { className, history } = this.props
    return (
    <div className={className}>
    <div className='innerContent'>
    Severity: Minor
    Found in website/src/components/About.js - About 1 hr to fix

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

      <div
      onClick={event => {
      event.preventDefault()
      this.jumpBackward()
      }}
      Severity: Major
      Found in website/src/components/Player/AudioPlayer.js and 1 other location - About 1 hr to fix
      website/src/components/Player/AudioPlayer.js on lines 254..265

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

      <div
      onClick={event => {
      event.preventDefault()
      this.jumpForward()
      }}
      Severity: Major
      Found in website/src/components/Player/AudioPlayer.js and 1 other location - About 1 hr to fix
      website/src/components/Player/AudioPlayer.js on lines 230..241

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

      it('can load main page directly', function () {
      cy.visit('/')
      cy.title().should('eq', 'qit: Tech podcasts by topic')
      cy.get('input').should(
      'have.attr',
      Severity: Major
      Found in website/cypress/integration/search.spec.js and 1 other location - About 1 hr to fix
      website/cypress/integration/search.spec.js on lines 68..76

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

      it('can load main page directly', function () {
      cy.visit('/')
      cy.title().should('eq', 'qit: Tech podcasts by topic')
      cy.get('input').should(
      'have.attr',
      Severity: Major
      Found in website/cypress/integration/search.spec.js and 1 other location - About 1 hr to fix
      website/cypress/integration/search.spec.js on lines 127..135

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

      <StyledEpisode
      onClick={() => actions.player.play(episode)}
      key={episode.id}
      playing={episode.audioUrl === nowPlaying.audioUrl}
      data-item-type='search'
      Severity: Major
      Found in website/src/components/Main/SearchResults.js and 1 other location - About 1 hr to fix
      website/src/components/Main/Queue.js on lines 34..60

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

      <StyledEpisode
      onClick={() => actions.player.play(episode)}
      key={episode.id}
      playing={episode.audioUrl === nowPlaying.audioUrl}
      data-item-type='queue'
      Severity: Major
      Found in website/src/components/Main/Queue.js and 1 other location - About 1 hr to fix
      website/src/components/Main/SearchResults.js on lines 61..84

      Function search has 32 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      async search (searchTerm) {
      actions.search.startLoading()
      const url =
      config.corsProxy +
      config.searchSettings.baseUrl
      Severity: Minor
      Found in website/src/models/SearchModel.js - About 1 hr to fix

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

        render () {
        const {
        currentSearch,
        nowPlaying,
        queue,
        Severity: Minor
        Found in website/src/App.js - About 1 hr to fix

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

          return fetch(url, options)
          .then(resp => resp.json())
          .catch(event => {
          console.log(`API error: ${event}`)
          window.errorReporting.notify({
          Severity: Major
          Found in website/src/adapters/API.js and 1 other location - About 1 hr to fix
          website/src/models/SearchModel.js on lines 71..79

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

          const response = await window
          .fetch(url, options)
          .then(data => data.json())
          .catch(err => {
          console.log(`An error has occurred: ${err}`)
          Severity: Major
          Found in website/src/models/SearchModel.js and 1 other location - About 1 hr to fix
          website/src/adapters/API.js on lines 58..65

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

          cy.route({
          method: 'GET',
          url: Cypress.env('baseSearchUrl').replace(
          '{searchTerm}',
          `${testSearchTerm}`
          Severity: Minor
          Found in website/cypress/integration/search.spec.js and 1 other location - About 55 mins to fix
          website/cypress/integration/search.spec.js on lines 34..41

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

          cy.route({
          method: 'GET',
          url: Cypress.env('baseSearchUrl').replace(
          '{searchTerm}',
          `${testSearchTerm}`
          Severity: Minor
          Found in website/cypress/integration/search.spec.js and 1 other location - About 55 mins to fix
          website/cypress/integration/search.spec.js on lines 102..109
          Severity
          Category
          Status
          Source
          Language