Skip to content

Commit

Permalink
Nav menu length check (#295) (#295) (#297)
Browse files Browse the repository at this point in the history
(cherry picked from commit 58d52f7)

Signed-off-by: Danila Gulderov <danila@gulderov.me>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 371aef7 commit 73628ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .cypress/integration/04-download.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('Cypress', () => {
// click Reporting in-context menu
cy.get('#downloadReport > span:nth-child(1) > span:nth-child(1)').click({ force: true });

// download PDF
// download PDF
cy.get('#generatePDF > span:nth-child(1) > span:nth-child(2)').click({ force: true });

cy.get('#reportGenerationProgressModal');
Expand All @@ -59,7 +59,7 @@ describe('Cypress', () => {
cy.wait(5000);

// open saved search list
cy.get('button.euiButtonEmpty:nth-child(3) > span:nth-child(1) > span:nth-child(1)').click({ force: true });
cy.get('[data-test-subj="discoverOpenButton"]').click({ force: true });
cy.wait(5000);

// click first entry
Expand All @@ -72,7 +72,7 @@ describe('Cypress', () => {
});

it('Download from Report definition details page', () => {
// create an on-demand report definition
// create an on-demand report definition

cy.visit(`${Cypress.env('opensearchDashboards')}/app/reports-dashboards#/`);
cy.location('pathname', { timeout: 60000 }).should(
Expand All @@ -81,7 +81,7 @@ describe('Cypress', () => {
);
cy.wait(10000);

cy.get('tr.euiTableRow-isSelectable:nth-child(1) > td:nth-child(1) > div:nth-child(2) > button:nth-child(1)').first().click();
cy.get('tr.euiTableRow-isSelectable:nth-child(1) > td:nth-child(1) > div:nth-child(2) > button:nth-child(1)').first().click();

cy.url().should('include', 'report_definition_details');

Expand Down
2 changes: 1 addition & 1 deletion public/components/context_menu/context_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ const checkURLParams = async () => {

const isDiscoverNavMenu = (navMenu) => {
return (
navMenu[0].children.length === 5 &&
(navMenu[0].children.length === 5 || navMenu[0].children.length === 6) &&
($('[data-test-subj="breadcrumb first"]').prop('title') === 'Discover' ||
$('[data-test-subj="breadcrumb first last"]').prop('title') ===
'Discover')
Expand Down

0 comments on commit 73628ad

Please sign in to comment.