[7.x] Fixing Newsfeed Cloud test bug (#58566) (#58622)

This commit is contained in:
Michail Yasonik 2020-02-26 18:39:08 -05:00 committed by GitHub
parent b59bd97794
commit 37c81357b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,10 +48,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 () => {