Skip to content

Commit

Permalink
Better match figma design
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-selo committed Jul 5, 2023
1 parent 1f62e6e commit 72bcbbe
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
10 changes: 5 additions & 5 deletions frontend/lib/models/test_execution.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ class TestExecution with _$TestExecution {
}

enum TestExecutionStatus {
@JsonValue('FAILED')
failed,
@JsonValue('NOT_STARTED')
notStarted,
@JsonValue('NOT_TESTED')
notTested,
@JsonValue('IN_PROGRESS')
inProgress,
@JsonValue('PASSED')
passed,
@JsonValue('FAILED')
failed,
@JsonValue('NOT_TESTED')
notTested;
passed;

String get name {
switch (this) {
Expand Down
30 changes: 19 additions & 11 deletions frontend/lib/ui/dashboard/dashboard_header.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:intersperse/intersperse.dart';
import 'package:yaru/yaru.dart';
import 'package:yaru_icons/yaru_icons.dart';

import '../../models/test_execution.dart';
import '../spacing.dart';

class DashboardHeader extends StatelessWidget {
Expand Down Expand Up @@ -29,15 +29,23 @@ class DashboardHeader extends StatelessWidget {
style: Theme.of(context).textTheme.headlineLarge,
),
const SizedBox(height: Spacing.level4),
Row(
children: TestExecutionStatus.values
.map<Widget>(
(status) =>
_LegendEntry(icon: status.icon, text: status.name),
)
.toList()
.intersperse(const SizedBox(width: Spacing.level4))
.toList(),
const Row(
children: [
_LegendEntry(
icon: Icon(YaruIcons.error, color: YaruColors.red),
text: 'Failed',
),
SizedBox(width: Spacing.level4),
_LegendEntry(
icon: Icon(YaruIcons.information),
text: 'No result',
),
SizedBox(width: Spacing.level4),
_LegendEntry(
icon: Icon(YaruIcons.ok, color: YaruColors.success),
text: 'Passed',
),
],
),
],
),
Expand Down

0 comments on commit 72bcbbe

Please sign in to comment.