-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADFCONNECT-19100_Neo Angular Ramp up and Adjustments: (#11)
* ADFCONNECT-19100_Neo Angular Ramp up and Adjustments: - added neo (css library) dependency - added html files for current example components - applied neo classes to faux button - added stories - added global scss file - rewrote tests with karma jasmine * ADFCONNECT-19100: Neo Angular Ramp up and Adjustments - files updated following format command
- Loading branch information
1 parent
7508032
commit 98aa4d1
Showing
15 changed files
with
148 additions
and
44 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Karma configuration file, see link for more information | ||
// https://karma-runner.github.io/1.0/config/configuration-file.html | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
basePath: '', | ||
frameworks: ['jasmine', '@angular-devkit/build-angular'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-jasmine-html-reporter'), | ||
require('karma-coverage'), | ||
require('@angular-devkit/build-angular/plugins/karma'), | ||
require('karma-chrome-launcher'), | ||
], | ||
client: { | ||
jasmine: { | ||
// you can add configuration options for Jasmine here | ||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html | ||
// for example, you can disable the random execution with `random: false` | ||
// or set a specific seed with `seed: 4321` | ||
}, | ||
clearContext: false // leave Jasmine Spec Runner output visible in browser | ||
}, | ||
jasmineHtmlReporter: { | ||
suppressAll: true // removes the duplicated traces | ||
}, | ||
reporters: ['progress', 'kjhtml'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: false, | ||
browsers: ['ChromeHeadlessNoSandbox'], | ||
customLaunchers: { | ||
ChromeHeadlessNoSandbox: { | ||
base: 'ChromeHeadless', | ||
flags: ['--no-sandbox'], | ||
}, | ||
}, | ||
coverageReporter: { | ||
dir: require('path').join(__dirname, '/coverage/neo-angular'), | ||
subdir: '.', | ||
reporters: [ | ||
{ type: 'html' }, | ||
{ type: 'lcovonly' }, | ||
{ type: 'text-summary' } | ||
] | ||
}, | ||
singleRun: true, | ||
captureTimeout: 210000, | ||
browserDisconnectTimeout: 100000, | ||
browserDisconnectTolerance: 3, | ||
browserNoActivityTimeout: 600000, | ||
restartOnFileChange: true | ||
}); | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
3 changes: 3 additions & 0 deletions
3
projects/examples/src/lib/FauxButton/faux-button.component.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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<button class="neo-btn neo-btn-{{ type }} neo-btn-{{ type }}--warning"> | ||
{{ label }} | ||
</button> |
10 changes: 6 additions & 4 deletions
10
projects/examples/src/lib/FauxButton/faux-button.component.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,16 +1,18 @@ | ||
import { Component, Input } from "@angular/core"; | ||
import { Component, Input, ViewEncapsulation } from "@angular/core"; | ||
|
||
@Component({ | ||
selector: "lib-neo-faux-button", | ||
standalone: true, | ||
template: `<button>{{ label }}</button> `, | ||
templateUrl: "./faux-button.component.html", | ||
styleUrls: ["../../styles.scss"], | ||
encapsulation: ViewEncapsulation.None, | ||
}) | ||
export class FauxButtonComponent { | ||
/** | ||
* Button contents | ||
* | ||
* @required | ||
*/ | ||
@Input() | ||
label = "Button"; | ||
@Input() label = "Button 222"; | ||
@Input() type = "tertiary"; | ||
} |
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,22 +1,15 @@ | ||
import { ComponentFixture, TestBed } from "@angular/core/testing"; | ||
|
||
import { FauxButtonComponent } from "./faux-button.component"; | ||
|
||
describe("FauxButtonComponent", () => { | ||
let component: FauxButtonComponent; | ||
let fixture: ComponentFixture<FauxButtonComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [FauxButtonComponent], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(FauxButtonComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
beforeEach(() => { | ||
component = new FauxButtonComponent(); | ||
}); | ||
|
||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
describe("component", () => { | ||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<p>the static component works!</p> | ||
<lib-neo-faux-button | ||
[label]="'a primary button'" | ||
[type]="'primary'" | ||
></lib-neo-faux-button> | ||
<br /> | ||
<lib-neo-faux-button | ||
[label]="'a secondary button'" | ||
[type]="'secondary'" | ||
></lib-neo-faux-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
import { Component } from "@angular/core"; | ||
import { FauxButtonComponent } from "../FauxButton"; | ||
|
||
@Component({ | ||
selector: "lib-neo-static", | ||
standalone: true, | ||
imports: [], | ||
template: ` <p>the static component works!</p> `, | ||
imports: [FauxButtonComponent], | ||
templateUrl: "./static.component.html", | ||
}) | ||
export class StaticComponent {} |
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,22 +1,15 @@ | ||
import { ComponentFixture, TestBed } from "@angular/core/testing"; | ||
|
||
import { StaticComponent } from "./static.component"; | ||
|
||
describe("StaticComponent", () => { | ||
let component: StaticComponent; | ||
let fixture: ComponentFixture<StaticComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [StaticComponent], | ||
}).compileComponents(); | ||
|
||
fixture = TestBed.createComponent(StaticComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
beforeEach(() => { | ||
component = new StaticComponent(); | ||
}); | ||
|
||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
describe("component", () => { | ||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); | ||
}); |
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @import "~@avaya/neo/neo/dist/css/neo/neo.min.css"; | ||
// @import "../../node_modules/@avaya/neo/neo/dist/css/neo/neo.css" | ||
@import "../../../node_modules/@avaya/neo/neo/dist/css/neo/neo.min.css"; | ||
|
||
button { | ||
margin: 20px; | ||
} |
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