Skip to content

Commit

Permalink
Merge branch 'kertal-pr-2020-12-10-discover-default-sort' of github.c…
Browse files Browse the repository at this point in the history
…om:kertal/kibana into kertal-pr-2020-12-10-discover-default-sort
  • Loading branch information
kertal committed Dec 14, 2020
2 parents 815c133 + b2a53f8 commit 93e3d2c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ const VisGroup = ({ visType, onVisTypeSelected }: VisCardProps) => {
target="_blank"
color="text"
className="visNewVisDialog__groupsCardLink"
external={false}
>
<EuiBetaBadge
data-test-subj="visTypeBadge"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const generalSettings: RawSettingDefinition[] = [
{ text: 'critical', value: 'critical' },
{ text: 'off', value: 'off' },
],
includeAgents: ['dotnet', 'ruby', 'java', 'python', 'nodejs'],
includeAgents: ['dotnet', 'ruby', 'java', 'python', 'nodejs', 'go'],
},

// Recording
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ describe('filterByAgent', () => {
expect(getSettingKeysForAgent('go')).toEqual([
'capture_body',
'capture_headers',
'log_level',
'recording',
'sanitize_field_names',
'span_frames_min_duration',
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/security_solution/cypress/screens/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@

export const NOTIFICATION_TOASTS = '[data-test-subj="globalToastList"]';

export const TOAST_ERROR_CLASS = 'euiToast--danger';
export const TOAST_ERROR = '.euiToast--danger';
15 changes: 12 additions & 3 deletions x-pack/plugins/security_solution/cypress/tasks/create_new_rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ import {
MITRE_ATTACK_ADD_SUBTECHNIQUE_BUTTON,
MITRE_ATTACK_ADD_TECHNIQUE_BUTTON,
} from '../screens/create_new_rule';
import { NOTIFICATION_TOASTS, TOAST_ERROR_CLASS } from '../screens/shared';
import { TOAST_ERROR } from '../screens/shared';
import { SERVER_SIDE_EVENT_COUNT } from '../screens/timeline';
import { TIMELINE } from '../screens/timelines';
import { refreshPage } from './security_header';
Expand Down Expand Up @@ -262,11 +262,20 @@ export const fillDefineThresholdRuleAndContinue = (rule: ThresholdRule) => {
};

export const fillDefineEqlRuleAndContinue = (rule: CustomRule) => {
cy.get(EQL_QUERY_INPUT).should('exist');
cy.get(EQL_QUERY_INPUT).should('be.visible');
cy.get(EQL_QUERY_INPUT).type(rule.customQuery!);
cy.get(EQL_QUERY_VALIDATION_SPINNER).should('not.exist');
cy.get(QUERY_PREVIEW_BUTTON).should('not.be.disabled').click({ force: true });
cy.get(EQL_QUERY_PREVIEW_HISTOGRAM).should('contain.text', 'Hits');
cy.get(NOTIFICATION_TOASTS).children().should('not.have.class', TOAST_ERROR_CLASS); // asserts no error toast on page
cy.get(EQL_QUERY_PREVIEW_HISTOGRAM)
.invoke('text')
.then((text) => {
if (text !== 'Hits') {
cy.get(QUERY_PREVIEW_BUTTON).click({ force: true });
cy.get(EQL_QUERY_PREVIEW_HISTOGRAM).should('contain.text', 'Hits');
}
});
cy.get(TOAST_ERROR).should('not.exist');

cy.get(DEFINE_CONTINUE_BUTTON).should('exist').click({ force: true });
cy.get(EQL_QUERY_INPUT).should('not.exist');
Expand Down

0 comments on commit 93e3d2c

Please sign in to comment.