Fixing Newsfeed Cloud test bug (#58566)

This commit is contained in:
Michail Yasonik 2020-02-26 12:17:00 -05:00 committed by GitHub
parent 55fb05c09f
commit 8511fe3780
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,10 +47,17 @@ export default function({ getService, getPageObjects }: FtrProviderContext) {
it('shows all news from newsfeed', async () => {
const objects = await PageObjects.newsfeed.getNewsfeedList();
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 () => {