Skip to content

Commit 6b3f939

Browse files
Merge pull request #29 from akirachix/develop
Develop
2 parents c71e993 + 4da69b2 commit 6b3f939

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

carbontrack/src/app/emissions/page.test.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ jest.mock('next/link', () => ({
5353
)
5454
}));
5555

56-
jest.mock('react-icons/io5', () => ({
57-
IoSettingsOutline: () => <div data-testid="settings-icon">Settings</div>,
58-
IoPersonOutline: () => <div data-testid="person-icon">Person</div>
59-
}));
56+
6057

6158
describe('EmissionsHeatmapPage', () => {
6259
const mockFactoryEmissions = [
@@ -173,13 +170,7 @@ describe('EmissionsHeatmapPage', () => {
173170
expect(mockUseEmissionsData.setSelectedDate).toHaveBeenCalledWith('2023-01-15');
174171
});
175172

176-
test('renders sidebar layout and icons correctly', () => {
177-
render(<EmissionsHeatmapPage />);
178173

179-
expect(screen.getByTestId('sidebar-layout')).toBeInTheDocument();
180-
expect(screen.getByTestId('settings-icon')).toBeInTheDocument();
181-
expect(screen.getByTestId('person-icon')).toBeInTheDocument();
182-
});
183174

184175
test('handles empty emissions data', () => {
185176
(useEmissionsData as jest.Mock).mockReturnValue({

carbontrack/src/app/ktda-dashboard/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export default function DashboardPage() {
149149
</div>
150150
<h1 className="mb-4 font-semibold text-white 2xl:text-[1.5rem] 2xl:mt-5 xl:text-[1.3rem] xl:mt-3">Emission Trend</h1>
151151
<div className="grid grid-cols-3 2xl:gap-6 xl:gap-0">
152-
<div className="col-span-2 bg-gray-800 p-4 rounded-lg 2xl:w-[100%] 2xl:h-[100%] xl:w-[95%] xl:h-[99%]">
152+
<div className="col-span-2 bg-gray-800 p-4 rounded-lg 2xl:w-[100%] 2xl:h-[100%] xl:w-[95%] xl:h-[90%]">
153153
<ResponsiveContainer width="100%" height={460}>
154154
<LineChart data={fullEmissionTrend}>
155155
<XAxis dataKey="month" stroke="#ccc" label={{ value: "Months", position: "insideBottom", offset: -5, fill: "#ccc" }} />
@@ -184,7 +184,7 @@ export default function DashboardPage() {
184184
</div>
185185
</div>
186186
<h3 className="font-semibold text-white text-[20px] xl:mt-4 xl:text-[25px]">Consumed Energy</h3>
187-
<div className="bg-gray-800 p-4 rounded-lg xl:mt-2 xl:h-[72%]">
187+
<div className="bg-gray-800 p-4 rounded-lg xl:mt-2 xl:h-[67%]">
188188
<ResponsiveContainer width="100%" height={250}>
189189
<PieChart>
190190
<Pie data={pieData} dataKey="value" nameKey="name" outerRadius={90} fill="#8884D8" label>

0 commit comments

Comments
 (0)