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

Commit

Permalink
Merge branch 'master' into freeman-closed-complete
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackbaud-SteveBrush authored Dec 11, 2017
2 parents e64a35b + 9ca3d15 commit 3beb4ef
Show file tree
Hide file tree
Showing 54 changed files with 598 additions and 259 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@blackbaud/skyux": "2.3.2",
"@blackbaud/skyux-builder": "1.7.1",
"@blackbaud/skyux-design-tokens": "0.0.8",
"@blackbaud/stache": "2.1.0",
"@blackbaud/stache": "2.2.0",
"@types/core-js": "0.9.41",
"@types/jasmine": "2.5.47",
"@types/node": "7.0.18",
Expand Down
5 changes: 5 additions & 0 deletions skyux-spa-visual-tests/config/utils/visual-test-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export class SkyVisualTest {

public static compareScreenshot(options: SkyCompareScreenshotConfig): Promise<any> {
const subject = element(by.css(options.selector));

const checkRegionConfig = {
thresholdType: pixDiff.THRESHOLD_PERCENT,
threshold: SkyVisualTest.THRESHOLD_PERCENT
Expand Down Expand Up @@ -67,6 +68,10 @@ export class SkyVisualTest {
}

private static checkAccessibility(options: any): Promise<any> {
if (options.checkAccessibility === undefined) {
options.checkAccessibility = true;
}

if (!options.checkAccessibility) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ describe('Action button', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'action-button',
selector: '#screenshot-action-button',
checkAccessibility: true
selector: '#screenshot-action-button'
});
});

Expand All @@ -22,8 +21,7 @@ describe('Action button', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'action-button-small',
selector: '#screenshot-action-button',
checkAccessibility: true
selector: '#screenshot-action-button'
});
});

Expand All @@ -36,8 +34,7 @@ describe('Action button', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'action-button-container',
selector: '#screenshot-action-button-container',
checkAccessibility: true
selector: '#screenshot-action-button-container'
});
});

Expand All @@ -50,8 +47,7 @@ describe('Action button', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'action-button-container-small',
selector: '#screenshot-action-button-container',
checkAccessibility: true
selector: '#screenshot-action-button-container'
});
});

Expand Down
3 changes: 1 addition & 2 deletions skyux-spa-visual-tests/src/app/alert/alert.visual-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ describe('Alert', () => {
.then(() => {
return SkyVisualTest.compareScreenshot({
screenshotName: 'alert',
selector: '#screenshot-alert',
checkAccessibility: true
selector: '#screenshot-alert'
});
});

Expand Down
6 changes: 2 additions & 4 deletions skyux-spa-visual-tests/src/app/avatar/avatar.visual-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ describe('Avatar', () => {
.then(() => {
return SkyVisualTest.compareScreenshot({
screenshotName: 'avatar-image',
selector: '#screenshot-avatar-img',
checkAccessibility: true
selector: '#screenshot-avatar-img'
});
});

Expand All @@ -21,8 +20,7 @@ describe('Avatar', () => {
.then(() => {
return SkyVisualTest.compareScreenshot({
screenshotName: 'avatar-initials',
selector: '#screenshot-avatar-initials',
checkAccessibility: true
selector: '#screenshot-avatar-initials'
});
});

Expand Down
6 changes: 2 additions & 4 deletions skyux-spa-visual-tests/src/app/button/button.visual-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ describe('Button', () => {
return SkyVisualTest
.compareScreenshot({
screenshotName: 'button-link-hover',
selector: '#screenshot-button-link',
checkAccessibility: true
selector: '#screenshot-button-link'
});
});

Expand All @@ -33,8 +32,7 @@ describe('Button', () => {
return SkyVisualTest
.compareScreenshot({
screenshotName: 'button-link-inline-hover',
selector: '#screenshot-button-link-inline',
checkAccessibility: true
selector: '#screenshot-button-link-inline'
});

});
Expand Down
18 changes: 6 additions & 12 deletions skyux-spa-visual-tests/src/app/card/card.visual-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ describe('Card', () => {
return SkyVisualTest
.compareScreenshot({
screenshotName: 'card-all',
selector: '#screenshot-card-all',
checkAccessibility: true
selector: '#screenshot-card-all'
});
});
});
Expand All @@ -23,8 +22,7 @@ describe('Card', () => {
.then(() => {
return SkyVisualTest.compareScreenshot({
screenshotName: 'card-noheader',
selector: '#screenshot-card-noheader',
checkAccessibility: true
selector: '#screenshot-card-noheader'
});
});
});
Expand All @@ -35,8 +33,7 @@ describe('Card', () => {
SkyVisualTest.scrollElementIntoView('#screenshot-card-noactions');
return SkyVisualTest.compareScreenshot({
screenshotName: 'card-noactions',
selector: '#screenshot-card-noactions',
checkAccessibility: true
selector: '#screenshot-card-noactions'
});
});
});
Expand All @@ -47,8 +44,7 @@ describe('Card', () => {
SkyVisualTest.scrollElementIntoView('#screenshot-card-selectable');
return SkyVisualTest.compareScreenshot({
screenshotName: 'card-selectable',
selector: '#screenshot-card-selectable',
checkAccessibility: true
selector: '#screenshot-card-selectable'
});
});
});
Expand All @@ -60,8 +56,7 @@ describe('Card', () => {
element(by.css('#screenshot-card-selectable .sky-card-title')).click();
return SkyVisualTest.compareScreenshot({
screenshotName: 'card-selected',
selector: '#screenshot-card-selectable',
checkAccessibility: true
selector: '#screenshot-card-selectable'
});
});
});
Expand All @@ -72,8 +67,7 @@ describe('Card', () => {
SkyVisualTest.scrollElementIntoView('#screenshot-card-overflow');
SkyVisualTest.compareScreenshot({
screenshotName: 'card-title-overflow',
selector: '#screenshot-card-overflow',
checkAccessibility: true
selector: '#screenshot-card-overflow'
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ describe('Checkbox', () => {
.then(() => {
return SkyVisualTest.compareScreenshot({
screenshotName: 'checkbox',
selector: '#screenshot-checkbox',
checkAccessibility: true
selector: '#screenshot-checkbox'
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ describe('Chevron', () => {
.then(() => {
return SkyVisualTest.compareScreenshot({
screenshotName: 'chevron',
selector: '#screenshot-chevron',
checkAccessibility: true
selector: '#screenshot-chevron'
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ describe('Colorpicker', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'colorpicker-closed',
selector: '#screenshot-colorpicker'
selector: '#screenshot-colorpicker',
checkAccessibility: false
});
});
});
Expand All @@ -23,7 +24,8 @@ describe('Colorpicker', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'colorpicker-opened',
selector: '.sky-colorpicker-container'
selector: '.sky-colorpicker-container',
checkAccessibility: false
});
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ describe('Confirmation dialog', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'confirmation-dialog-one-button',
selector: '.sky-modal',
checkAccessibility: true
selector: '.sky-modal'
}).then(() => {
element(by.css('.sky-confirmation-dialog-buttons .sky-btn-primary')).click();
});
Expand All @@ -26,8 +25,7 @@ describe('Confirmation dialog', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'confirmation-dialog-two-button',
selector: '.sky-modal',
checkAccessibility: true
selector: '.sky-modal'
}).then(() => {
element(by.css('.sky-confirmation-dialog-buttons .sky-btn-primary')).click();
});
Expand All @@ -41,8 +39,7 @@ describe('Confirmation dialog', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'confirmation-dialog-three-button',
selector: '.sky-modal',
checkAccessibility: true
selector: '.sky-modal'
}).then(() => {
element(by.css('.sky-confirmation-dialog-buttons .sky-btn-primary')).click();
});
Expand All @@ -56,8 +53,7 @@ describe('Confirmation dialog', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'confirmation-dialog-long-description',
selector: '.sky-modal',
checkAccessibility: true
selector: '.sky-modal'
}).then(() => {
element(by.css('.sky-confirmation-dialog-buttons .sky-btn-primary')).click();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ describe('Datepicker', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'datepicker-daypicker',
selector: '#screenshot-datepicker-calendar'
selector: '#screenshot-datepicker-calendar',
checkAccessibility: false
});
});

Expand All @@ -23,7 +24,8 @@ describe('Datepicker', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'datepicker-monthpicker',
selector: '#screenshot-datepicker-calendar'
selector: '#screenshot-datepicker-calendar',
checkAccessibility: false
});
});

Expand All @@ -37,7 +39,8 @@ describe('Datepicker', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'datepicker-yearpicker',
selector: '#screenshot-datepicker-calendar'
selector: '#screenshot-datepicker-calendar',
checkAccessibility: false
});
});

Expand All @@ -49,7 +52,8 @@ describe('Datepicker', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'datepicker-input',
selector: '#screenshot-datepicker'
selector: '#screenshot-datepicker',
checkAccessibility: false
});
});

Expand All @@ -62,7 +66,8 @@ describe('Datepicker', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'datepicker-input-open',
selector: '#screenshot-datepicker'
selector: '#screenshot-datepicker',
checkAccessibility: false
});
});

Expand Down
21 changes: 7 additions & 14 deletions skyux-spa-visual-tests/src/app/error/error.visual-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ describe('Error', () => {
SkyVisualTest.scrollElementIntoView('#screenshot-error-broken');
return SkyVisualTest.compareScreenshot({
screenshotName: 'error-type-broken',
selector: '#screenshot-error-broken',
checkAccessibility: true
selector: '#screenshot-error-broken'
});
});
});
Expand All @@ -23,8 +22,7 @@ describe('Error', () => {
SkyVisualTest.scrollElementIntoView('#screenshot-error-notfound');
return SkyVisualTest.compareScreenshot({
screenshotName: 'error-type-notfound',
selector: '#screenshot-error-notfound',
checkAccessibility: true
selector: '#screenshot-error-notfound'
});
});
});
Expand All @@ -36,8 +34,7 @@ describe('Error', () => {
SkyVisualTest.scrollElementIntoView('#screenshot-error-construction');
return SkyVisualTest.compareScreenshot({
screenshotName: 'error-type-construction',
selector: '#screenshot-error-construction',
checkAccessibility: true
selector: '#screenshot-error-construction'
});
});
});
Expand All @@ -49,8 +46,7 @@ describe('Error', () => {
SkyVisualTest.scrollElementIntoView('#screenshot-error-security');
return SkyVisualTest.compareScreenshot({
screenshotName: 'error-type-security',
selector: '#screenshot-error-security',
checkAccessibility: true
selector: '#screenshot-error-security'
});
});
});
Expand All @@ -62,8 +58,7 @@ describe('Error', () => {
SkyVisualTest.scrollElementIntoView('#screenshot-error-custom');
return SkyVisualTest.compareScreenshot({
screenshotName: 'error-type-custom',
selector: '#screenshot-error-custom',
checkAccessibility: true
selector: '#screenshot-error-custom'
});
});
});
Expand All @@ -75,8 +70,7 @@ describe('Error', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'error-modal-form',
selector: '.sky-modal',
checkAccessibility: true
selector: '.sky-modal'
});
})
.then(() => element(by.css('.sky-error-modal-close .sky-btn-primary')).click() as any);
Expand All @@ -89,8 +83,7 @@ describe('Error', () => {
SkyVisualTest.moveCursorOffScreen();
return SkyVisualTest.compareScreenshot({
screenshotName: 'error-modal-form-long-description',
selector: '.sky-modal',
checkAccessibility: true
selector: '.sky-modal'
});
})
.then(() => element(by.css('.sky-error-modal-close .sky-btn-primary')).click() as any);
Expand Down
Loading

0 comments on commit 3beb4ef

Please sign in to comment.