Skip to content

Commit 483f434

Browse files
authored
refactor: adding borders to timeline card (#338)
* refactor: adding borders to timeline card * refactor: fixing test * refactor: fixing test
1 parent f90e63b commit 483f434

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

projects/observability/src/shared/components/timeline-card-list/timeline-card-list.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,22 @@
4747
width: 100%;
4848
box-sizing: border-box;
4949
border-radius: 6px;
50+
border: 1px solid $gray-2;
5051

5152
&.selected-card {
5253
background: $blue-1;
54+
border: 1px solid $blue-2;
5355

5456
&:hover {
5557
background: $blue-2;
58+
border: 1px solid $blue-5;
5659
cursor: pointer;
5760
}
5861
}
5962

6063
&:hover {
6164
background: $gray-1;
65+
border: 1px solid $gray-2;
6266
cursor: pointer;
6367
}
6468
}

projects/observability/src/shared/components/timeline-card-list/timeline-card-list.component.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,13 @@ describe('Timeline Card List component', () => {
160160
// Only one card element should be visible. Other two should be gropued and hidden
161161
expect(spectator.queryAll('.card').length).toEqual(1);
162162
expect(spectator.query('.time')).toExist();
163-
expect(spectator.query('.button')).toBe(spectator.query('.with-margin'));
163+
expect(spectator.query('.button')).toHaveClass('button with-margin');
164164

165165
spectator.setHostInput({
166166
showTime: false
167167
});
168168

169169
expect(spectator.query('.time')).not.toExist();
170-
expect(spectator.query('.button')).not.toBe(spectator.query('.with-margin'));
170+
expect(spectator.query('.button')).toHaveClass('button with-margin');
171171
});
172172
});

projects/observability/src/shared/components/timeline-card-list/timeline-card-list.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ import { TimelineCardContainerComponent } from './container/timeline-card-contai
1818
role="${ButtonRole.Primary}"
1919
display="${ButtonStyle.Outlined}"
2020
(click)="item.showAll = true"
21-
class="button"
22-
[ngClass]="{ 'with-margin': this.showTime }"
21+
class="button with-margin"
2322
></ht-button>
2423
2524
<ng-template #showSimilarCards>

0 commit comments

Comments
 (0)