• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

DaniSomoza / galactic-commander / 12422152220

19 Dec 2024 10:57PM UTC coverage: 52.396% (-13.2%) from 65.587%
12422152220

Pull #11

github

web-flow
Merge e0cd6a508 into 4f9f087f0
Pull Request #11: Build units

204 of 768 branches covered (26.56%)

Branch coverage included in aggregate %.

363 of 886 new or added lines in 84 files covered. (40.97%)

10 existing lines in 7 files now uncovered.

1414 of 2320 relevant lines covered (60.95%)

3.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/packages/frontend/src/components/bonus-cards/BonusCards.tsx
1
import Skeleton from '@mui/material/Skeleton'
2

3
import { IBonus } from 'game-engine/dist/types/IBonus'
4

5
import Bonus from '../bonus/Bonus'
6

7
type BonusCardProps = {
8
  bonus?: IBonus
9
  isFleetEnergyResearch?: boolean
10
  isTroopsPopulationResearch?: boolean
11
  isLoading?: boolean
12
}
13

14
// TODO: rename this to ResearchBonus ????
15
function BonusCards({
16
  bonus,
17
  isFleetEnergyResearch,
18
  isTroopsPopulationResearch,
19
  isLoading
20
}: BonusCardProps) {
UNCOV
21
  if (isLoading) {
×
UNCOV
22
    return <Skeleton variant="rounded" height={'40px'} width={'40px'} />
×
23
  }
24

25
  return (
×
26
    <>
27
      {bonus &&
×
28
        Object.keys(bonus).map((bono) => (
29
          <Bonus
×
30
            key={bono}
31
            size="small"
32
            bono={bono}
33
            bonusValue={bonus[bono as keyof IBonus] as number}
34
          />
35
        ))}
36

37
      {isFleetEnergyResearch && (
×
38
        <Bonus size="small" bono="RESEARCH_ENERGY_BONUS" bonusValue={true} />
39
      )}
40

41
      {isTroopsPopulationResearch && (
×
42
        <Bonus size="small" bono="RESEARCH_POPULATION_BONUS" bonusValue={true} />
43
      )}
44
    </>
45
  )
46
}
47

48
export default BonusCards
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc