Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pool Resize Error Default #2121

Merged
merged 3 commits into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/@batch-flask/ui/banner/banner.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,24 +68,24 @@ describe("BannerComponent", () => {
});

describe("When there is details", () => {
it("should not show details by default(Until you click)", () => {
expect(fixture.componentRef.instance.banner.showDetails).toBe(false);
it("should show details by default (Without clicking)", () => {
expect(fixture.componentRef.instance.banner.showDetails).toBe(true);
});

it("should not show the more fixes button", () => {
expect(de.query(By.css(".other-fixes-btn"))).toBeNull();
});

it("should not have the carret on facing left", () => {
it("should have caret facing down by default", () => {
const carretEl = de.query(By.css(".caret"));
expect(carretEl).not.toBe(null);
expect(carretEl.classes["fa-caret-left"]).toBe(true);
expect(carretEl.classes["fa-caret-down"]).toBe(false);
expect(carretEl.classes["fa-caret-left"]).toBe(false);
expect(carretEl.classes["fa-caret-down"]).toBe(true);
});

it("should show details after you click", () => {
it("should close details after you click", () => {
de.query(By.css(".summary-container")).nativeElement.click();
expect(fixture.componentRef.instance.banner.showDetails).toBe(true);
expect(fixture.componentRef.instance.banner.showDetails).toBe(false);
});

it("carret change when you click", () => {
Expand All @@ -94,8 +94,8 @@ describe("BannerComponent", () => {

const carretEl = de.query(By.css(".caret"));
expect(carretEl).not.toBe(null);
expect(carretEl.classes["fa-caret-left"]).toBe(false);
expect(carretEl.classes["fa-caret-down"]).toBe(true);
expect(carretEl.classes["fa-caret-left"]).toBe(true);
expect(carretEl.classes["fa-caret-down"]).toBe(false);
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/@batch-flask/ui/banner/banner.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class BannerComponent implements OnChanges {
@ContentChildren(BannerOtherFixDirective)
public otherFixes: QueryList<BannerOtherFixDirective>;

public showDetails = false;
public showDetails = true;

public state = ErrorState.Error;

Expand Down
2 changes: 1 addition & 1 deletion src/@batch-flask/ui/banner/banner.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</div>
<i class="caret fa" [class.fa-caret-left]="!showDetails" [class.fa-caret-down]="showDetails" *ngIf="details.children.length !== 0"></i>
</bl-clickable>
<div class="details-container" [hidden]="!showDetails" #details>
<div class="details-container" [hidden]="details.children.length == 0" #details>
<ng-content select="[details]"></ng-content>
</div>
</bl-card>