@@ -133,17 +133,6 @@ describe('Playwright', function () {
133133 } )
134134 } )
135135
136- describe ( '#seeCssPropertiesOnElements' , ( ) => {
137- it ( 'should check background-color css property for given element' , async ( ) => {
138- try {
139- await I . amOnPage ( 'https://codecept.io/helpers/Playwright/' )
140- await I . seeCssPropertiesOnElements ( '.navbar' , { 'background-color' : 'rgb(128, 90, 213)' } )
141- } catch ( e ) {
142- e . message . should . include ( "expected element (.navbar) to have CSS property { 'background-color': 'rgb(128, 90, 213)' }" )
143- }
144- } )
145- } )
146-
147136 webApiTests . tests ( )
148137
149138 describe ( '#click' , ( ) => {
@@ -1001,9 +990,10 @@ describe('Playwright', function () {
1001990
1002991 describe ( '#makeApiRequest' , ( ) => {
1003992 it ( 'should make 3rd party API request' , async ( ) => {
1004- const response = await I . makeApiRequest ( 'get' , 'https://reqres.in/api/users?page=2' )
993+ // Using local json-server for reliable testing
994+ const response = await I . makeApiRequest ( 'get' , 'http://127.0.0.1:8010/posts/1' )
1005995 expect ( response . status ( ) ) . to . equal ( 200 )
1006- expect ( await response . json ( ) ) . to . include . keys ( [ 'page ' ] )
996+ expect ( await response . json ( ) ) . to . include . keys ( [ 'id' , 'title' , 'author '] )
1007997 } )
1008998
1009999 it ( 'should make local API request' , async ( ) => {
@@ -1014,10 +1004,10 @@ describe('Playwright', function () {
10141004 it ( 'should convert to axios response with onResponse hook' , async ( ) => {
10151005 let response
10161006 I . config . onResponse = resp => ( response = resp )
1017- await I . makeApiRequest ( 'get' , 'https ://reqres.in/api/users?page=2 ' )
1007+ await I . makeApiRequest ( 'get' , 'http ://127.0.0.1:8010/posts/1 ' )
10181008 expect ( response ) . to . be . ok
10191009 expect ( response . status ) . to . equal ( 200 )
1020- expect ( response . data ) . to . include . keys ( [ 'page ' , 'total ' ] )
1010+ expect ( response . data ) . to . include . keys ( [ 'id ' , 'title' , 'author '] )
10211011 } )
10221012 } )
10231013
0 commit comments