Skip to content

Commit

Permalink
Fixing Newsfeed Cloud test bug (#58566)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michail Yasonik authored Feb 26, 2020
1 parent 55fb05c commit 8511fe3
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions test/functional/apps/home/_newsfeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,17 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {

it('shows all news from newsfeed', async () => {
const objects = await PageObjects.newsfeed.getNewsfeedList();
expect(objects).to.eql([
'21 June 2019\nYou are functionally testing the newsfeed widget with fixtures!\nSee test/common/fixtures/plugins/newsfeed/newsfeed_simulation\nGeneric feed-viewer could go here',
'21 June 2019\nStaging too!\nHello world\nGeneric feed-viewer could go here',
]);

if (await PageObjects.common.isOss()) {
expect(objects).to.eql([
'21 June 2019\nYou are functionally testing the newsfeed widget with fixtures!\nSee test/common/fixtures/plugins/newsfeed/newsfeed_simulation\nGeneric feed-viewer could go here',
'21 June 2019\nStaging too!\nHello world\nGeneric feed-viewer could go here',
]);
} else {
// can't shim the API in cloud so going to check that at least something is rendered
// to test that the API was called and returned something that could be rendered
expect(objects.length).to.be.above(0);
}
});

it('clicking on newsfeed icon should close opened newsfeed', async () => {
Expand Down

0 comments on commit 8511fe3

Please sign in to comment.