@@ -26,7 +26,7 @@ QUnit.module( 'resetDisplay' );
2626QUnit . test ( 'reset elements' , function ( assert ) {
2727 var fixture = $ ( '#qunit-fixture' ) ;
2828
29- fixture . append ( '<div id="standardMode">Hello this is text.</div>' ) ;
29+ fixture . append ( '<div id="wpe-pcc- standardMode">Hello this is text.</div>' ) ;
3030 fixture . append ( '<textarea id="testResults">This is some more text!</textarea>' ) ;
3131 fixture . append ( '<div id="wpe-progress-count"></div>' ) ;
3232 fixture . append ( '<div id="progressbar"></div>' ) ;
@@ -37,7 +37,7 @@ QUnit.test( 'reset elements', function( assert ) {
3737 resetDisplay ( ) ;
3838
3939 assert . ok ( '' === $ ( '#testResults' ) . text ( ) , 'testResults is empty' ) ;
40- assert . ok ( '' === $ ( '#standardMode' ) . html ( ) , 'standardMode is empty' ) ;
40+ assert . ok ( '' === $ ( '#wpe-pcc- standardMode' ) . html ( ) , 'wpe-pcc- standardMode is empty' ) ;
4141 assert . ok ( '' === $ ( '#wpe-progress-count' ) . text ( ) , 'wpe-progress-count is empty' ) ;
4242 assert . ok ( 0 === $ ( '#progressbar' ) . progressbar ( 'value' ) , 'progressbar is set to 0' ) ;
4343} ) ;
@@ -56,11 +56,11 @@ QUnit.test( 'Render test pass', function( assert ) {
5656 var displayedResults = $ ( '#testResults' ) . text ( ) ;
5757
5858 assert . ok ( helpers . passResults === displayedResults , 'Text results are correct' ) ;
59- assert . ok ( $ ( '#footer' ) . is ( ':visible' ) , 'Footer is visible' ) ;
60- assert . ok ( $ ( '.wpe-results-card ' ) . length == 2 , 'There are 2 results.' ) ;
61- assert . ok ( $ ( '#standardMode' ) . text ( ) . indexOf ( 'Your WordPress install is PHP 5.5 compatible.' ) !== - 1 , 'Test did pass.' ) ;
62- assert . ok ( '#038103' === helpers . rgb2hex ( $ ( ".wpe-results-card " ) . eq ( 0 ) . css ( 'border-left-color' ) ) , 'First plugin marked as passed.' ) ;
63- assert . ok ( $ ( '#standardMode' ) . text ( ) . indexOf ( '0 out of 2' ) === - 1 , 'No scan stats are shown.' ) ;
59+ // assert.ok( $('#footer').is(':visible'), 'Footer is visible' );
60+ assert . ok ( $ ( '.wpe-pcc-alert ' ) . length == 2 , 'There are 2 results.' ) ;
61+ assert . ok ( $ ( '#wpe-pcc- standardMode' ) . text ( ) . indexOf ( 'Your WordPress install is PHP 5.5 compatible.' ) !== - 1 , 'Test did pass.' ) ;
62+ assert . ok ( '#038103' === helpers . rgb2hex ( $ ( ".wpe-pcc-alert " ) . eq ( 0 ) . css ( 'border-left-color' ) ) , 'First plugin marked as passed.' ) ;
63+ assert . ok ( $ ( '#wpe-pcc- standardMode' ) . text ( ) . indexOf ( '0 out of 2' ) === - 1 , 'No scan stats are shown.' ) ;
6464} ) ;
6565
6666QUnit . test ( 'Render test fail' , function ( assert ) {
@@ -75,10 +75,10 @@ QUnit.test( 'Render test fail', function( assert ) {
7575 var displayedResults = $ ( '#testResults' ) . text ( ) ;
7676
7777 assert . ok ( helpers . failResults === displayedResults , 'Text results are correct' ) ;
78- assert . ok ( $ ( '#footer' ) . is ( ':visible' ) , 'Footer is visible' ) ;
79- assert . ok ( $ ( '.wpe-results-card ' ) . length == 7 , 'There are 7 results.' ) ;
80- assert . ok ( $ ( '#standardMode' ) . text ( ) . indexOf ( 'Your WordPress install is not PHP 5.5 compatible.' ) !== - 1 , 'Test did not pass.' ) ;
81- assert . ok ( $ ( '#standardMode' ) . text ( ) . indexOf ( '1 out of 7' ) !== - 1 , 'Scan stats are correct' ) ;
78+ // assert.ok( $('#footer').is(':visible'), 'Footer is visible' );
79+ assert . ok ( $ ( '.wpe-pcc-alert ' ) . length == 7 , 'There are 7 results.' ) ;
80+ assert . ok ( $ ( '#wpe-pcc- standardMode' ) . text ( ) . indexOf ( 'Your WordPress install is not PHP 5.5 compatible.' ) !== - 1 , 'Test did not pass.' ) ;
81+ assert . ok ( $ ( '#wpe-pcc- standardMode' ) . text ( ) . indexOf ( '1 out of 7' ) !== - 1 , 'Scan stats are correct' ) ;
8282} ) ;
8383
8484QUnit . test ( 'Render test skip' , function ( assert ) {
@@ -92,8 +92,8 @@ QUnit.test( 'Render test skip', function( assert ) {
9292
9393 var displayedResults = $ ( '#testResults' ) . text ( ) ;
9494
95- assert . ok ( '#038103' === helpers . rgb2hex ( $ ( ".wpe-results-card " ) . eq ( 0 ) . css ( 'border-left-color' ) ) , 'First plugin marked as passed.' ) ;
96- assert . ok ( '#999999' === helpers . rgb2hex ( $ ( ".wpe-results-card " ) . eq ( 1 ) . css ( 'border-left-color' ) ) , 'Second plugin marked as skipped.' ) ;
95+ assert . ok ( '#038103' === helpers . rgb2hex ( $ ( ".wpe-pcc-alert " ) . eq ( 0 ) . css ( 'border-left-color' ) ) , 'First plugin marked as passed.' ) ;
96+ assert . ok ( '#999999' === helpers . rgb2hex ( $ ( ".wpe-pcc-alert " ) . eq ( 1 ) . css ( 'border-left-color' ) ) , 'Second plugin marked as skipped.' ) ;
9797} ) ;
9898
9999QUnit . module ( 'checkStatus' ) ;
0 commit comments