Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into kbn-74911-remove-…
Browse files Browse the repository at this point in the history
…legacy-mode
  • Loading branch information
pgayvallet committed Sep 1, 2020
2 parents 9fcb097 + ec1c158 commit 82a3a54
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 33 deletions.
28 changes: 28 additions & 0 deletions src/legacy/ui/public/documentation_links/documentation_links.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/*
WARNING: The links in this file are validated during the docs build. This is accomplished with some regex magic that
looks for these particular constants. As a result, we should not add new constants or change the existing ones.
If you absolutely must make a change, talk to Clinton Gormley first so he can update his Perl scripts.
*/
export const DOC_LINK_VERSION = 'stub';
export const ELASTIC_WEBSITE_URL = 'stub';

export const documentationLinks = {};
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,14 @@ Feature: RUM Dashboard
| os |
| location |

Scenario: Page load distribution percentiles
Scenario: Display RUM Data components
When a user browses the APM UI application for RUM Data
Then should display percentile for page load chart

Scenario: Page load distribution chart tooltip
When a user browses the APM UI application for RUM Data
Then should display tooltip on hover

Scenario: Page load distribution chart legends
When a user browses the APM UI application for RUM Data
Then should display chart legend
And should display tooltip on hover
And should display chart legend

Scenario: Breakdown filter
Given a user click page load breakdown filter
Given a user clicks the page load breakdown filter
When the user selected the breakdown
Then breakdown series should appear in chart

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { DEFAULT_TIMEOUT } from './rum_dashboard';

/**
* Verifies the behavior of the client metrics component
* @param metrics array of three elements
* @param checkTitleStatus if it's needed to check title elements
*/
export function verifyClientMetrics(
metrics: string[],
checkTitleStatus: boolean
) {
const clientMetricsSelector = '[data-cy=client-metrics] .euiStat__title';

// wait for all loading to finish
cy.get('kbnLoadingIndicator').should('not.be.visible');

if (checkTitleStatus) {
cy.get('.euiStat__title', { timeout: DEFAULT_TIMEOUT }).should(
'be.visible'
);
cy.get('.euiSelect-isLoading').should('not.be.visible');
}

cy.get('.euiStat__title-isLoading').should('not.be.visible');

cy.get(clientMetricsSelector).eq(0).should('have.text', metrics[0]);

cy.get(clientMetricsSelector).eq(1).should('have.text', metrics[1]);

cy.get(clientMetricsSelector).eq(2).should('have.text', metrics[2]);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Given, When, Then } from 'cypress-cucumber-preprocessor/steps';
/** The default time in ms to wait for a Cypress command to complete */
export const DEFAULT_TIMEOUT = 60 * 1000;

Given(`a user click page load breakdown filter`, () => {
Given(`a user clicks the page load breakdown filter`, () => {
// wait for all loading to finish
cy.get('kbnLoadingIndicator').should('not.be.visible');
cy.get('.euiStat__title-isLoading').should('not.be.visible');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import { Given, Then } from 'cypress-cucumber-preprocessor/steps';
import { loginAndWaitForPage } from '../../../integration/helpers';
import { verifyClientMetrics } from './client_metrics_helper';

/** The default time in ms to wait for a Cypress command to complete */
export const DEFAULT_TIMEOUT = 60 * 1000;
Expand All @@ -21,19 +22,9 @@ Given(`a user browses the APM UI application for RUM Data`, () => {
});

Then(`should have correct client metrics`, () => {
const clientMetrics = '[data-cy=client-metrics] .euiStat__title';
const metrics = ['0.01 sec', '0.08 sec', '55 '];

// wait for all loading to finish
cy.get('kbnLoadingIndicator').should('not.be.visible');
cy.get('.euiStat__title', { timeout: DEFAULT_TIMEOUT }).should('be.visible');
cy.get('.euiSelect-isLoading').should('not.be.visible');
cy.get('.euiStat__title-isLoading').should('not.be.visible');

cy.get(clientMetrics).eq(2).should('have.text', '55 ');

cy.get(clientMetrics).eq(1).should('have.text', '0.08 sec');

cy.get(clientMetrics).eq(0).should('have.text', '0.01 sec');
verifyClientMetrics(metrics, true);
});

Then(`should display percentile for page load chart`, () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import { When, Then } from 'cypress-cucumber-preprocessor/steps';
import { DEFAULT_TIMEOUT } from '../apm';
import { verifyClientMetrics } from './client_metrics_helper';

When('a user changes the selected service name', (filterName) => {
// wait for all loading to finish
Expand All @@ -16,15 +17,7 @@ When('a user changes the selected service name', (filterName) => {
});

Then(`it displays relevant client metrics`, () => {
const clientMetrics = '[data-cy=client-metrics] .euiStat__title';
const metrics = ['0.01 sec', '0.07 sec', '7 '];

// wait for all loading to finish
cy.get('kbnLoadingIndicator').should('not.be.visible');
cy.get('.euiStat__title-isLoading').should('not.be.visible');

cy.get(clientMetrics).eq(2).should('have.text', '7 ');

cy.get(clientMetrics).eq(1).should('have.text', '0.07 sec');

cy.get(clientMetrics).eq(0).should('have.text', '0.01 sec');
verifyClientMetrics(metrics, false);
});

0 comments on commit 82a3a54

Please sign in to comment.