This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into icon-checkbox
- Loading branch information
Showing
10 changed files
with
112 additions
and
79 deletions.
There are no files selected for viewing
Binary file added
BIN
+15.2 KB
...isual-tests/screenshots-baseline/flyout-Open-Dropdown-chrome-1000x800-dpr-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 18 additions & 13 deletions
31
src/modules/help-inline/fixtures/help-inline-fixtures.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { | ||
NgModule | ||
} from '@angular/core'; | ||
|
||
import { SkyHelpInlineModule } from '../'; | ||
import { | ||
CommonModule | ||
} from '@angular/common'; | ||
|
||
import { SkyHelpInlineModule } from '../help-inline.module'; | ||
import { HelpInlineTestComponent } from './help-inline.component.fixture'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
HelpInlineTestComponent | ||
], | ||
imports: [ | ||
CommonModule, | ||
SkyHelpInlineModule | ||
], | ||
exports: [ | ||
HelpInlineTestComponent | ||
] | ||
declarations: [ | ||
HelpInlineTestComponent | ||
], | ||
imports: [ | ||
CommonModule, | ||
SkyHelpInlineModule | ||
], | ||
exports: [ | ||
HelpInlineTestComponent | ||
] | ||
}) | ||
export class SkyInlineHlpeFixturesModule { } |
2 changes: 1 addition & 1 deletion
2
src/modules/help-inline/fixtures/help-inline.component.fixture.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<sky-help-inline | ||
(actionClick)="buttonClicked()"> | ||
(actionClick)="buttonClicked()"> | ||
</sky-help-inline> |
16 changes: 9 additions & 7 deletions
16
src/modules/help-inline/fixtures/help-inline.component.fixture.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import { Component } from '@angular/core'; | ||
import { | ||
Component | ||
} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'sky-test-cmp', | ||
templateUrl: './help-inline.component.fixture.html' | ||
selector: 'sky-test-cmp', | ||
templateUrl: './help-inline.component.fixture.html' | ||
}) | ||
export class HelpInlineTestComponent { | ||
public buttonIsClicked: boolean = false; | ||
public buttonIsClicked = false; | ||
|
||
public buttonClicked() { | ||
this.buttonIsClicked = true; | ||
} | ||
public buttonClicked() { | ||
this.buttonIsClicked = true; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<button | ||
class="sky-help-inline fa fa-info-circle" | ||
(click)="buttonClicked()" | ||
[attr.aria-label]="'show_help_content' | skyResources" | ||
> | ||
</button> | ||
class="sky-help-inline" | ||
type="button" | ||
(click)="onClick()" | ||
[attr.title]="'help_inline_button_title' | skyResources"> | ||
<i class="fa fa-info-circle" aria-hidden="true"></i> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,46 @@ | ||
import { TestBed, ComponentFixture } from '@angular/core/testing'; | ||
import { DebugElement } from '@angular/core'; | ||
import { | ||
DebugElement | ||
} from '@angular/core'; | ||
|
||
import { BrowserModule, By } from '@angular/platform-browser'; | ||
import { | ||
ComponentFixture, | ||
TestBed | ||
} from '@angular/core/testing'; | ||
|
||
import { | ||
BrowserModule, | ||
By | ||
} from '@angular/platform-browser'; | ||
|
||
import { HelpInlineTestComponent } from './fixtures/help-inline.component.fixture'; | ||
import { SkyHelpInlineModule } from '../help-inline/help-inline.module'; | ||
import { HelpInlineTestComponent } from './fixtures/help-inline.component.fixture'; | ||
|
||
describe('Help inline component', () => { | ||
let fixture: ComponentFixture<HelpInlineTestComponent>; | ||
let cmp: HelpInlineTestComponent; | ||
let el: HTMLElement; | ||
let debugElement: DebugElement; | ||
|
||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ | ||
HelpInlineTestComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
SkyHelpInlineModule | ||
] | ||
}); | ||
|
||
fixture = TestBed.createComponent(HelpInlineTestComponent); | ||
cmp = fixture.componentInstance as HelpInlineTestComponent; | ||
el = fixture.nativeElement as HTMLElement; | ||
debugElement = fixture.debugElement; | ||
|
||
fixture.detectChanges(); | ||
}); | ||
let fixture: ComponentFixture<HelpInlineTestComponent>; | ||
let cmp: HelpInlineTestComponent; | ||
let debugElement: DebugElement; | ||
|
||
it('should emit a click event on button click', () => { | ||
debugElement.query(By.css('.sky-help-inline')).triggerEventHandler('click', undefined); | ||
fixture.detectChanges(); | ||
expect(cmp.buttonIsClicked).toBe(true); | ||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ | ||
HelpInlineTestComponent | ||
], | ||
imports: [ | ||
BrowserModule, | ||
SkyHelpInlineModule | ||
] | ||
}); | ||
|
||
fixture = TestBed.createComponent(HelpInlineTestComponent); | ||
cmp = fixture.componentInstance as HelpInlineTestComponent; | ||
debugElement = fixture.debugElement; | ||
|
||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should emit a click event on button click', () => { | ||
debugElement.query(By.css('.sky-help-inline')).triggerEventHandler('click', undefined); | ||
fixture.detectChanges(); | ||
expect(cmp.buttonIsClicked).toBe(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
import { Component, EventEmitter, Output } from '@angular/core'; | ||
import { | ||
Component, | ||
EventEmitter, | ||
Output | ||
} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'sky-help-inline', | ||
styleUrls: ['./help-inline.component.scss'], | ||
templateUrl: './help-inline.component.html' | ||
selector: 'sky-help-inline', | ||
templateUrl: './help-inline.component.html', | ||
styleUrls: ['./help-inline.component.scss'] | ||
}) | ||
export class SkyHelpInlineComponent { | ||
@Output() | ||
public actionClick = new EventEmitter<any>(); | ||
@Output() | ||
public actionClick = new EventEmitter<any>(); | ||
|
||
public buttonClicked() { | ||
this.actionClick.emit(); | ||
} | ||
public onClick() { | ||
this.actionClick.emit(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { | ||
NgModule | ||
} from '@angular/core'; | ||
|
||
import { | ||
CommonModule | ||
} from '@angular/common'; | ||
|
||
import { | ||
SkyResourcesModule | ||
} from '../resources'; | ||
|
||
import { SkyHelpInlineComponent } from './help-inline.component'; | ||
import { SkyResourcesModule } from '../resources'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
SkyHelpInlineComponent | ||
], | ||
imports: [ | ||
CommonModule, | ||
SkyResourcesModule | ||
], | ||
exports: [ | ||
SkyHelpInlineComponent | ||
] | ||
declarations: [ | ||
SkyHelpInlineComponent | ||
], | ||
imports: [ | ||
CommonModule, | ||
SkyResourcesModule | ||
], | ||
exports: [ | ||
SkyHelpInlineComponent | ||
] | ||
}) | ||
export class SkyHelpInlineModule { } |