Skip to content

Commit

Permalink
State: Fix some more failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed May 2, 2017
1 parent 9a42be0 commit 7c99cf2
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 12 deletions.
5 changes: 4 additions & 1 deletion client/state/posts/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,10 @@ describe( 'selectors', () => {
}
}
}
}
},
siteSettings: {
items: {},
},
}, 2916284, 841 );

expect( previewUrl ).to.equal( 'https://example.wordpress.com/post-url' );
Expand Down
10 changes: 8 additions & 2 deletions client/state/selectors/test/are-all-sites-single-user.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ describe( 'areAllSitesSingleUser()', () => {
single_user_site: false
}
}
}
},
siteSettings: {
items: {},
},
};

const allAreSingleUser = areAllSitesSingleUser( state );
Expand All @@ -53,7 +56,10 @@ describe( 'areAllSitesSingleUser()', () => {
single_user_site: true
}
}
}
},
siteSettings: {
items: {},
},
};

const allAreSingleUser = areAllSitesSingleUser( state );
Expand Down
5 changes: 4 additions & 1 deletion client/state/selectors/test/get-sites.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ describe( 'getSites()', () => {
}
}
}
}
},
siteSettings: {
items: {},
},
};
const sites = getSites( state );
expect( sites ).to.have.length( 2 );
Expand Down
5 changes: 4 additions & 1 deletion client/state/selectors/test/get-visible-sites.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ describe( 'getVisibleSites()', () => {
}
}
}
}
},
siteSettings: {
items: {},
},
};
const sites = getVisibleSites( state );
expect( sites ).to.eql( [
Expand Down
5 changes: 4 additions & 1 deletion client/state/sites/plans/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ describe( 'selectors', () => {
URL: 'https://example.wordpress.com'
}
}
}
},
siteSettings: {
items: {},
},
} );

it( 'returns a new sitePlanObject', () => {
Expand Down
5 changes: 4 additions & 1 deletion client/state/sites/test/enhancer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ const EXAMPLE_SITE = {

describe( 'sitesSync()', () => {
let sitesListFactory, Site, store, sitesList;
const state = { sites: { items: {} } };
const state = {
sites: { items: {} },
siteSettings: { items: {} },
};

useFakeDom();

Expand Down
25 changes: 20 additions & 5 deletions client/state/sites/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ describe( 'selectors', () => {
}
}
}
}
},
siteSettings: {
items: {},
},
}, 2916284 );

expect( site ).to.eql( {
Expand Down Expand Up @@ -138,7 +141,10 @@ describe( 'selectors', () => {
}
}
}
}
},
siteSettings: {
items: {},
},
}, 2916284 );

expect( siteOptions ).to.eql( {
Expand All @@ -162,7 +168,10 @@ describe( 'selectors', () => {
}
}
}
}
},
siteSettings: {
items: {},
},
}, 2916284 );

expect( siteOptions ).to.eql( {
Expand Down Expand Up @@ -258,7 +267,10 @@ describe( 'selectors', () => {
items: {
77203074: { ID: 77203074, URL: 'https://example.wordpress.com', single_user_site: true }
}
}
},
siteSettings: {
items: {},
},
}, 77203074 );

expect( singleUserSite ).to.be.true;
Expand All @@ -270,7 +282,10 @@ describe( 'selectors', () => {
items: {
77203074: { ID: 77203074, URL: 'https://example.wordpress.com', single_user_site: false }
}
}
},
siteSettings: {
items: {},
},
}, 77203074 );

expect( singleUserSite ).to.be.false;
Expand Down
3 changes: 3 additions & 0 deletions client/state/ui/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ describe( 'selectors', () => {
2916284: { ID: 2916284, name: 'WordPress.com Example Blog', URL: 'https://example.com' }
}
},
siteSettings: {
items: {},
},
ui: {
selectedSiteId: 2916284
}
Expand Down

0 comments on commit 7c99cf2

Please sign in to comment.