Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into toastr-fromscratch
Browse files Browse the repository at this point in the history
  • Loading branch information
blackbaud-conorwright committed Apr 10, 2018
2 parents c8994ae + d210c2b commit 11ab289
Show file tree
Hide file tree
Showing 89 changed files with 1,025 additions and 1,034 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"@angular/platform-browser": "4.3.6",
"@angular/platform-browser-dynamic": "4.3.6",
"@angular/router": "4.3.6",
"@blackbaud/skyux": "2.9.0",
"@blackbaud/skyux-builder": "1.10.1",
"@blackbaud/skyux": "latest",
"@blackbaud/skyux-builder": "1.12.0",
"@blackbaud/skyux-design-tokens": "0.0.8",
"@types/core-js": "0.9.41",
"@types/jasmine": "2.5.47",
Expand Down
4 changes: 2 additions & 2 deletions skyux-spa-visual-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"author": "Blackbaud",
"license": "ISC",
"devDependencies": {
"@blackbaud/skyux": "2.9.0",
"@blackbaud/skyux-builder": "1.10.1",
"@blackbaud/skyux": "latest",
"@blackbaud/skyux-builder": "1.12.0",
"pix-diff": "2.0.0",
"browserstack-local": "1.3.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/modules/action-button/action-button.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div
class="sky-action-button sky-btn-default"
class="sky-action-button sky-btn-default sky-rounded-corners"
role="button"
(click)="buttonClicked()"
(keydown.enter)="enterPress()"
Expand Down
1 change: 0 additions & 1 deletion src/modules/action-button/action-button.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.sky-action-button {
@include sky-border(dark, top, bottom, left, right);
max-width: 236px;
border-radius: $sky-border-radius;
cursor: pointer;
display: inline-block;
padding-top: $sky-padding-double;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/alert/alert.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div
class="sky-alert"
class="sky-alert sky-rounded-corners"
[ngClass]="{
'sky-alert-info': alertType === 'info',
'sky-alert-success': alertType === 'success',
Expand Down
1 change: 0 additions & 1 deletion src/modules/alert/alert.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
padding: 0 $sky-padding;
margin-bottom: $sky-margin-double;
border-left: solid 30px;
border-radius: $sky-border-radius;
color: $sky-text-color-default;
display: flex;
flex-direction: row;
Expand Down
84 changes: 44 additions & 40 deletions src/modules/autocomplete/autocomplete.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {

import {
expect,
TestUtility
} from '../testing';
SkyAppTestUtility
} from '@blackbaud/skyux-builder/runtime/testing/browser';

import {
SkyDropdownMessageType
Expand Down Expand Up @@ -87,7 +87,7 @@ describe('Autocomplete component', () => {
const spy = spyOn(autocomplete, 'search').and.callThrough();

inputElement.value = 'r';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();

expect(spy.calls.argsFor(0)[0]).toEqual('r');
Expand All @@ -101,7 +101,7 @@ describe('Autocomplete component', () => {

inputElement.value = 'y';

TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();
fixture.detectChanges();
tick();
Expand All @@ -118,7 +118,7 @@ describe('Autocomplete component', () => {
let inputElement = getInputElement();
inputElement.value = 'r';

TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();
fixture.detectChanges();

Expand Down Expand Up @@ -150,7 +150,7 @@ describe('Autocomplete component', () => {

inputElement.value = 'r';

TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();
fixture.detectChanges();
tick();
Expand All @@ -170,7 +170,7 @@ describe('Autocomplete component', () => {
const inputElement = getInputElement();
inputElement.value = 'r';

TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();
fixture.detectChanges();
tick();
Expand All @@ -190,7 +190,7 @@ describe('Autocomplete component', () => {
.and.callThrough();

inputElement.value = 'r';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();
fixture.detectChanges();
tick();
Expand All @@ -211,11 +211,11 @@ describe('Autocomplete component', () => {
.and.callThrough();

inputElement.value = 'r';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();

inputElement.value = 're';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();

expect(messageSpy)
Expand All @@ -233,7 +233,7 @@ describe('Autocomplete component', () => {
// The letter 'r' should return multiple results:
inputElement.value = 'r';

TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();
fixture.detectChanges();
tick();
Expand All @@ -248,7 +248,7 @@ describe('Autocomplete component', () => {
const spy = spyOn(autocomplete, 'search').and.callThrough();

inputElement.value = '';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();

expect(spy).not.toHaveBeenCalled();
Expand All @@ -263,15 +263,15 @@ describe('Autocomplete component', () => {

// First, verify that the search will run with 3 characters.
inputElement.value = '123';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();

expect(spy).toHaveBeenCalled();
spy.calls.reset();

// Finally, verify that it will not search with fewer characters.
inputElement.value = '1';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();

expect(spy).not.toHaveBeenCalled();
Expand All @@ -297,7 +297,7 @@ describe('Autocomplete component', () => {
const spy = spyOn(autocomplete, 'search').and.callThrough();

inputElement.value = 'r';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();

expect(spy.calls.argsFor(0)[0]).toEqual('r');
Expand All @@ -317,7 +317,7 @@ describe('Autocomplete component', () => {

inputElement.value = 'r';

TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();
fixture.detectChanges();
tick();
Expand All @@ -338,7 +338,7 @@ describe('Autocomplete component', () => {

const spy = spyOn(autocomplete, 'search').and.callThrough();

TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();

expect(spy).not.toHaveBeenCalled();
Expand All @@ -365,7 +365,7 @@ describe('Autocomplete component', () => {
const inputElement = getInputElement();

inputElement.value = 'r';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();

const event = document.createEvent('CustomEvent');
Expand All @@ -390,7 +390,9 @@ describe('Autocomplete component', () => {
const inputElement = getInputElement();

inputElement.value = 'r';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup', {
keyboardEventInit: { key: 'R' }
});
tick();

const messageSpy = spyOn(autocomplete as any, 'sendDropdownMessage')
Expand All @@ -399,8 +401,8 @@ describe('Autocomplete component', () => {
.and.callThrough();
const autocompleteElement = getAutocompleteElement();

TestUtility.fireKeyboardEvent(autocompleteElement, 'keydown', {
key: 'Enter'
SkyAppTestUtility.fireDomEvent(autocompleteElement, 'keydown', {
keyboardEventInit: { key: 'Enter' }
});
tick();

Expand All @@ -417,7 +419,7 @@ describe('Autocomplete component', () => {
const inputElement = getInputElement();

inputElement.value = 'r';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();

const messageSpy = spyOn(autocomplete as any, 'sendDropdownMessage')
Expand All @@ -426,8 +428,8 @@ describe('Autocomplete component', () => {
.and.callThrough();
const autocompleteElement = getAutocompleteElement();

TestUtility.fireKeyboardEvent(autocompleteElement, 'keydown', {
key: 'Tab'
SkyAppTestUtility.fireDomEvent(autocompleteElement, 'keydown', {
keyboardEventInit: { key: 'Tab' }
});
tick();

Expand All @@ -452,13 +454,13 @@ describe('Autocomplete component', () => {
const dropdownElement = autocompleteElement
.querySelector('sky-dropdown-menu') as HTMLElement;

TestUtility.fireKeyboardEvent(dropdownElement, 'keydown', {
key: 'arrowdown'
SkyAppTestUtility.fireDomEvent(dropdownElement, 'keydown', {
keyboardEventInit: { key: 'ArrowDown' }
});
tick();

TestUtility.fireKeyboardEvent(dropdownElement, 'keydown', {
key: 'arrowup'
SkyAppTestUtility.fireDomEvent(dropdownElement, 'keydown', {
keyboardEventInit: { key: 'ArrowUp' }
});
tick();

Expand All @@ -476,7 +478,7 @@ describe('Autocomplete component', () => {
const spy = spyOn(autocomplete, 'search').and.callThrough();

inputElement.value = 'r';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();

expect(spy.calls.argsFor(0)[0]).toEqual('r');
Expand All @@ -486,8 +488,8 @@ describe('Autocomplete component', () => {
fixture.detectChanges();

const autocompleteElement = getAutocompleteElement();
TestUtility.fireKeyboardEvent(autocompleteElement, 'keydown', {
key: 'arrowdown'
SkyAppTestUtility.fireDomEvent(autocompleteElement, 'keydown', {
keyboardEventInit: { key: 'ArrowDown' }
});
tick();

Expand All @@ -501,13 +503,15 @@ describe('Autocomplete component', () => {
const inputElement = getInputElement();

inputElement.value = 'r';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();

const spy = spyOn(autocomplete as any, 'sendDropdownMessage').and.callThrough();
const autocompleteElement = getAutocompleteElement();

TestUtility.fireKeyboardEvent(autocompleteElement, 'keydown', { key: 'Escape' });
SkyAppTestUtility.fireDomEvent(autocompleteElement, 'keydown', {
keyboardEventInit: { key: 'Escape' }
});
tick();

expect(spy).toHaveBeenCalledWith(SkyDropdownMessageType.Close);
Expand All @@ -530,7 +534,7 @@ describe('Autocomplete component', () => {

expect(inputElement.value).toEqual('re');

TestUtility.fireKeyboardEvent(inputElement, 'blur');
SkyAppTestUtility.fireDomEvent(inputElement, 'blur');
tick();

expect(component.myForm.value.favoriteColor).toEqual(selectedValue);
Expand All @@ -556,7 +560,7 @@ describe('Autocomplete component', () => {

expect(inputElement.value).toEqual('Red');

TestUtility.fireKeyboardEvent(inputElement, 'blur');
SkyAppTestUtility.fireDomEvent(inputElement, 'blur');
tick();

expect(spy).not.toHaveBeenCalled();
Expand All @@ -578,7 +582,7 @@ describe('Autocomplete component', () => {

expect(inputElement.value).toEqual('');

TestUtility.fireKeyboardEvent(inputElement, 'blur');
SkyAppTestUtility.fireDomEvent(inputElement, 'blur');
tick();

expect(component.myForm.value.favoriteColor).toEqual({ });
Expand All @@ -595,7 +599,7 @@ describe('Autocomplete component', () => {
const inputElement = getInputElement();

inputElement.value = 'r';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();
fixture.detectChanges();

Expand Down Expand Up @@ -623,14 +627,14 @@ describe('Autocomplete component', () => {
const inputElement = getInputElement();

inputElement.value = 'r';
TestUtility.fireKeyboardEvent(inputElement, 'keyup');
SkyAppTestUtility.fireDomEvent(inputElement, 'keyup');
tick();
fixture.detectChanges();
tick();

const spy = spyOn(autocomplete as any, 'sendDropdownMessage').and.callThrough();

TestUtility.fireKeyboardEvent(inputElement, 'mouseenter');
SkyAppTestUtility.fireDomEvent(inputElement, 'mouseenter');
tick();
fixture.detectChanges();
tick();
Expand All @@ -641,7 +645,7 @@ describe('Autocomplete component', () => {
expect(spy).not.toHaveBeenCalled();
spy.calls.reset();

TestUtility.fireKeyboardEvent(inputElement, 'mouseleave');
SkyAppTestUtility.fireDomEvent(inputElement, 'mouseleave');
tick();
fixture.detectChanges();
tick();
Expand Down
4 changes: 3 additions & 1 deletion src/modules/avatar/avatar.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { TestBed } from '@angular/core/testing';

import { expect } from '../testing';
import {
expect
} from '@blackbaud/skyux-builder/runtime/testing/browser';

import { AvatarTestComponent } from './fixtures/avatar.component.fixture';
import { SkyAvatarComponent } from './avatar.component';
Expand Down
2 changes: 1 addition & 1 deletion src/modules/card/card.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<section class="sky-card"
<section class="sky-card sky-shadow"
[ngClass]="
{
'sky-card-small': size === 'small',
Expand Down
1 change: 0 additions & 1 deletion src/modules/card/card.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// will attempt to vertically align the cards based on the baselines of the text in each card.
vertical-align: top;
width: 350px;
@include sky-shadow();
}

.sky-card-small {
Expand Down
Loading

0 comments on commit 11ab289

Please sign in to comment.