File tree Expand file tree Collapse file tree 4 files changed +36
-12
lines changed
Expand file tree Collapse file tree 4 files changed +36
-12
lines changed Original file line number Diff line number Diff line change @@ -3,20 +3,22 @@ image: Visual Studio 2015
33environment :
44 BASH : C:/cygwin/bin/bash
55
6- platform :
7- - x86
8- - x64
6+ matrix :
7+ - node_platform : x86
8+ dist_platform : 32
9+ - node_platform : x64
10+ dist_platform : 64
911
1012cache :
1113 - node_modules
1214
1315install :
14- - ps : Install-Product node LTS $env:platform
16+ - ps : Install-Product node LTS $env:node_platform
1517 - npm config set msvs_version 2015
1618 - ' %BASH% -lc "cd $APPVEYOR_BUILD_FOLDER && npm install"'
1719
1820build : off
1921
2022test_script :
21- - ' %BASH% -lc "cd $APPVEYOR_BUILD_FOLDER && npm run dist"'
22- - ' %BASH% -lc "cd $APPVEYOR_BUILD_FOLDER && npm run e2e" '
23+ - ' %BASH% -lc "cd $APPVEYOR_BUILD_FOLDER && npm run dist:windows:$dist_platform "'
24+ - npm run e2e
Original file line number Diff line number Diff line change @@ -16,17 +16,13 @@ const platformToExtension = {
1616
1717export class SpectronUtils {
1818 public static app = new SpectronApplication ( {
19- // Your electron path can be any binary
20- // i.e for OSX an example path could be '/Applications/MyApp.app/Contents/MacOS/MyApp'
21- // But for the sake of the example we fetch it from our node_modules.
2219 path : `build-artifacts/ElectronAngularNativeApp.${ platformToExtension [ process . platform ] } ` ,
23- args : [ path . join ( __dirname , '../..' ) ] ,
2420 } ) ;
2521
2622 static describe ( desc : string , describeFunction : ( app : Application ) => void ) {
2723
2824 describe ( desc , function ( ) {
29- this . timeout ( 20000 ) ;
25+ this . timeout ( 10000 ) ;
3026
3127 before ( ( ) => {
3228 return SpectronUtils . app . start ( ) ;
Original file line number Diff line number Diff line change 1+ import { SpectronUtils } from './common/spectron-utils' ;
2+ import { Application } from 'spectron' ;
3+ import * as path from 'path' ;
4+ import * as fs from 'fs' ;
5+
6+ const chaiAsPromised = require ( 'chai-as-promised' ) ;
7+ const chai = require ( 'chai' ) ;
8+
9+ chai . should ( ) ;
10+ chai . use ( chaiAsPromised ) ;
11+
12+ function containsString ( app : Application , str : string ) {
13+ it ( `Contains ${ str } ` ,
14+ ( ) => {
15+ return app . client . waitForExist ( 'ul li h2' ) . then ( ( ) => app . client . getText ( 'ul li h2' ) . then ( list => {
16+ const index = list . indexOf ( str ) ;
17+ return index > - 1 ? list [ index ] : '' ;
18+ } ) . should . eventually . equal ( str ) ) ;
19+ }
20+ ) ;
21+ }
22+
23+ SpectronUtils . describe ( 'Native strings' , app => {
24+ containsString ( app , 'c++ .node string' ) ;
25+ containsString ( app , 'c++ precompiled library string' ) ;
26+ } ) ;
Original file line number Diff line number Diff line change 66 < base href ="./ ">
77
88 < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
9- < link rel ="icon " type ="image/x-icon " href ="favicon.ico ">
9+ < link rel ="icon " type ="image/x-icon " href ="favicon.png ">
1010</ head >
1111< body >
1212 < app-root > </ app-root >
You can’t perform that action at this time.
0 commit comments