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

Commit

Permalink
Updated error component visual test to show all images (#1241)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackbaud-SteveBrush authored Oct 30, 2017
1 parent 55ade43 commit d43e2e4
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 68 deletions.
Binary file not shown.
38 changes: 20 additions & 18 deletions skyux-spa-visual-tests/src/app/error/error-visual.component.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.error-screenshot {
display: inline-block;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {

@Component({
selector: 'error-visual',
templateUrl: './error-visual.component.html'
templateUrl: './error-visual.component.html',
styleUrls: ['./error-visual.component.scss']
})
export class ErrorVisualComponent {
constructor(private modal: SkyErrorModalService) { }
Expand Down
68 changes: 60 additions & 8 deletions skyux-spa-visual-tests/src/app/error/error.visual-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,69 @@ import { SkyVisualTest } from '../../../config/utils/visual-test-commands';
import { element, by } from 'protractor';

describe('Error', () => {

it('should match previous screenshot for broken type', () => {
return SkyVisualTest.setupTest('error')
.then(() => {
return SkyVisualTest.compareScreenshot({
screenshotName: 'error-images',
selector: '#screenshot-error-img',
checkAccessibility: true
return SkyVisualTest
.setupTest('error')
.then(() => {
SkyVisualTest.scrollElementIntoView('#screenshot-error-broken');
return SkyVisualTest.compareScreenshot({
screenshotName: 'error-type-broken',
selector: '#screenshot-error-broken',
checkAccessibility: true
});
});
});
});

it('should match previous screenshot for notfound type', () => {
return SkyVisualTest
.setupTest('error')
.then(() => {
SkyVisualTest.scrollElementIntoView('#screenshot-error-notfound');
return SkyVisualTest.compareScreenshot({
screenshotName: 'error-type-notfound',
selector: '#screenshot-error-notfound',
checkAccessibility: true
});
});
});

it('should match previous screenshot for construction type', () => {
return SkyVisualTest
.setupTest('error')
.then(() => {
SkyVisualTest.scrollElementIntoView('#screenshot-error-construction');
return SkyVisualTest.compareScreenshot({
screenshotName: 'error-type-construction',
selector: '#screenshot-error-construction',
checkAccessibility: true
});
});
});

it('should match previous screenshot for security type', () => {
return SkyVisualTest
.setupTest('error')
.then(() => {
SkyVisualTest.scrollElementIntoView('#screenshot-error-security');
return SkyVisualTest.compareScreenshot({
screenshotName: 'error-type-security',
selector: '#screenshot-error-security',
checkAccessibility: true
});
});
});

it('should match previous screenshot for custom type', () => {
return SkyVisualTest
.setupTest('error')
.then(() => {
SkyVisualTest.scrollElementIntoView('#screenshot-error-custom');
return SkyVisualTest.compareScreenshot({
screenshotName: 'error-type-custom',
selector: '#screenshot-error-custom',
checkAccessibility: true
});
});
});

it('should match previous error modal form screenshot', () => {
Expand Down
96 changes: 55 additions & 41 deletions src/app/components/error/error-demo.component.html

Large diffs are not rendered by default.

0 comments on commit d43e2e4

Please sign in to comment.