Skip to content

Commit

Permalink
fix functional 3 and 4
Browse files Browse the repository at this point in the history
Signed-off-by: abbyhu2000 <[email protected]>
  • Loading branch information
abbyhu2000 committed Feb 6, 2024
1 parent ac2f7dd commit e8f6843
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 3 additions & 1 deletion test/functional/apps/dashboard/dashboard_filter_bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,15 @@ export default function ({ getService, getPageObjects }) {
describe('saved search filtering', function () {
before(async () => {
await filterBar.ensureFieldEditorModalIsClosed();
await PageObjects.common.navigateToApp('discover');
await PageObjects.discover.switchDiscoverTable('new');
await PageObjects.common.navigateToApp('dashboard');
await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.timePicker.setDefaultDataRange();
});

it('are added when a cell magnifying glass is clicked', async function () {
await PageObjects.discover.switchDiscoverTable('new');
await dashboardAddPanel.addSavedSearch('Rendering-Test:-saved-search');
await PageObjects.dashboard.waitForRenderComplete();

Expand Down
7 changes: 5 additions & 2 deletions test/functional/apps/dashboard/dashboard_filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ export default function ({ getService, getPageObjects }) {

describe('adding a filter that excludes all data', () => {
before(async () => {
await PageObjects.common.navigateToApp('discover');
await PageObjects.discover.switchDiscoverTable('new');
await PageObjects.common.navigateToApp('dashboard');
await PageObjects.dashboard.gotoDashboardLandingPage();
await PageObjects.dashboard.clickNewDashboard();
await PageObjects.timePicker.setDefaultDataRange();
await dashboardAddPanel.addEveryVisualization('"Filter Bytes Test"');
Expand Down Expand Up @@ -189,7 +193,6 @@ export default function ({ getService, getPageObjects }) {
describe('disabling a filter unfilters the data on', function () {
before(async () => {
await filterBar.toggleFilterEnabled('bytes');
await PageObjects.discover.switchDiscoverTable('new');
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.dashboard.waitForRenderComplete();
});
Expand Down Expand Up @@ -227,7 +230,7 @@ export default function ({ getService, getPageObjects }) {
});

it('saved searches', async () => {
await dashboardExpect.savedSearchRowCount(1);
await dashboardExpect.savedSearchRowCountFromLegacyTable(1);
});

it('vega', async () => {
Expand Down
3 changes: 3 additions & 0 deletions test/functional/apps/dashboard/dashboard_state.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ export default function ({ getService, getPageObjects }) {

describe('dashboard state', function describeIndexTests() {
before(async function () {
await PageObjects.common.navigateToApp('discover');
await PageObjects.discover.switchDiscoverTable('new');
await PageObjects.common.navigateToApp('dashboard');
await PageObjects.dashboard.initTests();
await PageObjects.dashboard.preserveCrossAppState();
await browser.refresh();
Expand Down
4 changes: 2 additions & 2 deletions test/functional/apps/dashboard/dashboard_time_picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ export default function ({ getService, getPageObjects }) {
fields: ['bytes', 'agent'],
});
// Current data grid loads 100 rows per page by default with inspect button and time range
await dashboardExpect.dataGridTableCellCount(400);
await dashboardExpect.savedSearchRowCountFromLegacyTable(100);

// Set to time range with no data
await PageObjects.timePicker.setAbsoluteRange(
'Jan 1, 2000 @ 00:00:00.000',
'Jan 1, 2000 @ 01:00:00.000'
);
await dashboardExpect.dataGridTableCellCount(0);
await dashboardExpect.savedSearchRowCountFromLegacyTable(0);
});

it('Timepicker start, end, interval values are set by url', async () => {
Expand Down

0 comments on commit e8f6843

Please sign in to comment.