This repository was archived by the owner on Sep 21, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -72,12 +72,12 @@ function logPathToHtmlReport() {
7272function prepareImages ( runner ) {
7373 function handleTestResultEvent_ ( testResult ) {
7474 let actions = [
75- copyImage ( testResult . currentPath , lib . currentAbsolutePath ( testResult ) )
75+ copyImage ( testResult . referencePath , lib . referenceAbsolutePath ( testResult ) )
7676 ] ;
7777
7878 if ( ! testResult . equal ) {
7979 actions . push (
80- copyImage ( testResult . referencePath , lib . referenceAbsolutePath ( testResult ) ) ,
80+ copyImage ( testResult . currentPath , lib . currentAbsolutePath ( testResult ) ) ,
8181 saveDiff ( testResult , lib . diffAbsolutePath ( testResult ) )
8282 ) ;
8383 }
Original file line number Diff line number Diff line change @@ -70,19 +70,19 @@ describe('HTML Reporter', () => {
7070 assert . equal ( render ( data ) , '<img data-src="images/fake/long%2Bpath/fakeName/fakeId~current.png">' ) ;
7171 } ) ;
7272
73- it ( 'should save only current when screenshots are equal' , ( ) => {
74- sandbox . stub ( lib , 'currentAbsolutePath ' ) . returns ( 'absolute/current /path' ) ;
73+ it ( 'should save only reference when screenshots are equal' , ( ) => {
74+ sandbox . stub ( lib , 'referenceAbsolutePath ' ) . returns ( 'absolute/reference /path' ) ;
7575
7676 emitter . emit ( Events . TEST_RESULT , mkStubResult_ ( {
77- currentPath : 'current /path' ,
77+ referencePath : 'reference /path' ,
7878 equal : true
7979 } ) ) ;
8080
8181 emitter . emit ( Events . END ) ;
8282
8383 return emitter . emitAndWait ( Events . END_RUNNER ) . then ( ( ) => {
8484 assert . calledOnce ( fs . copyAsync ) ;
85- assert . calledWith ( fs . copyAsync , 'current /path' , 'absolute/current /path' ) ;
85+ assert . calledWith ( fs . copyAsync , 'reference /path' , 'absolute/reference /path' ) ;
8686 } ) ;
8787 } ) ;
8888
You can’t perform that action at this time.
0 commit comments