Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PURIFY] Removes Newsfeed plugin button and feed (#10) #15

Merged
merged 3 commits into from
Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/plugins/kibana_overview/kibana.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"server": false,
"ui": true,
"requiredPlugins": ["navigation", "data", "home"],
"optionalPlugins": ["newsfeed"],
"requiredBundles": ["kibanaReact", "newsfeed"]
"optionalPlugins": [],
"requiredBundles": ["kibanaReact"]
}
4 changes: 2 additions & 2 deletions src/plugins/newsfeed/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ export const NEWSFEED_FALLBACK_MAIN_INTERVAL = 120000; // 2 minutes
export const NEWSFEED_LAST_FETCH_STORAGE_KEY = 'newsfeed.lastfetchtime';
export const NEWSFEED_HASH_SET_STORAGE_KEY = 'newsfeed.hashes';

export const NEWSFEED_DEFAULT_SERVICE_BASE_URL = 'https://feeds.elastic.co';
export const NEWSFEED_DEV_SERVICE_BASE_URL = 'https://feeds-staging.elastic.co';
export const NEWSFEED_DEFAULT_SERVICE_BASE_URL = '';
export const NEWSFEED_DEV_SERVICE_BASE_URL = '';
export const NEWSFEED_DEFAULT_SERVICE_PATH = '/kibana/v{VERSION}.json';
6 changes: 0 additions & 6 deletions src/plugins/newsfeed/kibana.json

This file was deleted.

4 changes: 2 additions & 2 deletions src/plugins/newsfeed/public/components/empty_news.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import { NewsEmptyPrompt } from './empty_news';

describe('empty_news', () => {
describe('rendering', () => {
describe.skip('empty_news', () => {
describe.skip('rendering', () => {
it('renders the default Empty News', () => {
const wrapper = shallow(<NewsEmptyPrompt />);
expect(toJson(wrapper)).toMatchSnapshot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import { shallow } from 'enzyme';
import toJson from 'enzyme-to-json';
import { NewsLoadingPrompt } from './loading_news';

describe('news_loading', () => {
describe('rendering', () => {
describe.skip('news_loading', () => {
describe.skip('rendering', () => {
it('renders the default News Loading', () => {
const wrapper = shallow(<NewsLoadingPrompt />);
expect(toJson(wrapper)).toMatchSnapshot();
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/newsfeed/public/lib/api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jest.mock('uuid', () => ({
v4: () => 'NEW_UUID',
}));

describe('NewsfeedApiDriver', () => {
describe.skip('NewsfeedApiDriver', () => {
const kibanaVersion = '99.999.9-test_version'; // It'll remove the `-test_version` bit
const userLanguage = 'en';
const fetchInterval = 2000;
Expand All @@ -61,7 +61,7 @@ describe('NewsfeedApiDriver', () => {
sinon.reset();
});

describe('shouldFetch', () => {
describe.skip('shouldFetch', () => {
it('defaults to true', () => {
const driver = getDriver();
expect(driver.shouldFetch()).toBe(true);
Expand All @@ -86,7 +86,7 @@ describe('NewsfeedApiDriver', () => {
});
});

describe('updateHashes', () => {
describe.skip('updateHashes', () => {
it('returns previous and current storage', () => {
const driver = getDriver();
const items: NewsfeedItem[] = [
Expand Down Expand Up @@ -178,7 +178,7 @@ describe('NewsfeedApiDriver', () => {
).toBe(false);
});

describe('modelItems', () => {
describe.skip('modelItems', () => {
it('Models empty set with defaults', () => {
const driver = getDriver();
const apiItems: ApiItem[] = [];
Expand Down Expand Up @@ -451,7 +451,7 @@ describe('NewsfeedApiDriver', () => {
});
});

describe('getApi', () => {
describe.skip('getApi', () => {
const mockHttpGet = jest.fn();
let httpMock = ({
fetch: mockHttpGet,
Expand Down Expand Up @@ -616,7 +616,7 @@ describe('getApi', () => {
});
});

describe('Retry fetching', () => {
describe.skip('Retry fetching', () => {
const successItems: ApiItem[] = [
{
title: { en: 'hasNew test' },
Expand Down
8 changes: 4 additions & 4 deletions test/common/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import path from 'path';
//import path from 'path';
import { format as formatUrl } from 'url';
import { esTestConfig, kbnTestConfig, kibanaServerTestUser } from '@kbn/test';
import { services } from './services';
Expand Down Expand Up @@ -58,9 +58,9 @@ export default function () {
'--telemetry.optInStatusUrl=https://telemetry-staging.elastic.co/opt_in_status/v2/send',
`--server.maxPayloadBytes=1679958`,
// newsfeed mock service
`--plugin-path=${path.join(__dirname, 'fixtures', 'plugins', 'newsfeed')}`,
`--newsfeed.service.urlRoot=${servers.kibana.protocol}://${servers.kibana.hostname}:${servers.kibana.port}`,
`--newsfeed.service.pathTemplate=/api/_newsfeed-FTS-external-service-simulators/kibana/v{VERSION}.json`,
// `--plugin-path=${path.join(__dirname, 'fixtures', 'plugins', 'newsfeed')}`,
// `--newsfeed.service.urlRoot=${servers.kibana.protocol}://${servers.kibana.hostname}:${servers.kibana.port}`,
// `--newsfeed.service.pathTemplate=/api/_newsfeed-FTS-external-service-simulators/kibana/v{VERSION}.json`,
],
},
services,
Expand Down
2 changes: 1 addition & 1 deletion test/functional/apps/home/_newsfeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const deployment = getService('deployment');
const PageObjects = getPageObjects(['newsfeed']);

describe('Newsfeed', () => {
describe.skip('Newsfeed', () => {
before(async () => {
await PageObjects.newsfeed.resetPage();
});
Expand Down