Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
fix(SyCheckmark): change highlight class name with it tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MitanOmar committed May 22, 2023
1 parent b1310e9 commit 0ae53b2
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
8 changes: 4 additions & 4 deletions app/analysis/index/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,10 @@
report.verifiedBy
report.verifiedBy.username
}}</td>
<td><SyCheckmark @checked={{report.rejected}} /></td>
<td><SyCheckmark @checked={{report.review}} /></td>
<td><SyCheckmark @checked={{report.notBillable}} /></td>
<td><SyCheckmark @checked={{report.billed}} /></td>
<td><SyCheckmark @checked={{report.rejected}} @highlight={{true}} /></td>
<td><SyCheckmark @checked={{report.review}} @highlight={{true}} /></td>
<td><SyCheckmark @checked={{report.notBillable}} @highlight={{true}} /></td>
<td><SyCheckmark @checked={{report.billed}} @highlight={{true}} /></td>
</tr>
{{/each}}
{{#if this._canLoadMore}}
Expand Down
2 changes: 1 addition & 1 deletion app/components/sy-checkmark/template.hbs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<FaIcon class="{{if @checked "blue-checked"}}" ...attributes @icon={{this.icon}} />
<FaIcon class="{{if (and @highlight @checked) "highlight"}}" ...attributes @icon={{this.icon}} />
4 changes: 2 additions & 2 deletions app/index/activities/template.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
{{/if}}
</td>
<td>
<div><SyCheckmark @checked={{activity.review}} />
<div><SyCheckmark @checked={{activity.review}} @highlight={{true}} />
Needs review</div>
<div><SyCheckmark @checked={{activity.notBillable}} />
<div><SyCheckmark @checked={{activity.notBillable}} @highlight={{true}} />
Not billable</div>
</td>
<td>
Expand Down
6 changes: 4 additions & 2 deletions app/styles/analysis.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "sass:color";

.table--analysis {
margin-bottom: 0;
table-layout: fixed;
Expand Down Expand Up @@ -77,6 +79,6 @@
.table--analysis tr.selected td {
border-color: lighten($color-primary, 20%) !important;
}
.blue-checked {
color: darken($color-primary, 10);
.highlight {
color: color.adjust($color-primary, $lightness: -10%);
}
4 changes: 3 additions & 1 deletion app/styles/components/sy-toggle.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
@use "sass:color";

.sy-toggle {
display: flex;
align-items: center;
cursor: pointer;
margin: auto;

&.active {
color: darken($color-primary, 10);
color: color.adjust($color-primary, $lightness: -10%);
}

&.inactive {
Expand Down
6 changes: 6 additions & 0 deletions tests/integration/components/sy-checkmark/component-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ module("Integration | Component | sy checkmark", function (hooks) {
await render(hbs`<SyCheckmark @checked={{true}} />`);
assert.dom(".fa-square-check").exists({ count: 1 });
});

test("works highlight", async function (assert) {
await render(hbs`<SyCheckmark @checked={{true}} @highlight={{true}} />`);
assert.dom(".fa-square-check").exists({ count: 1 });
assert.dom(".highlight").exists({ count: 1 });
});
});

0 comments on commit 0ae53b2

Please sign in to comment.