Skip to content

Commit

Permalink
fix: route error
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe committed Sep 6, 2023
1 parent fd67e67 commit f5ac4fc
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 22 deletions.
3 changes: 1 addition & 2 deletions test/functional/apps/dashboard/create_and_add_embeddables.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ export default function ({ getService, getPageObjects }) {
});

after(async () => {
await PageObjects.header.clickStackManagement();
await PageObjects.settings.clickOpenSearchDashboardsSettings();
await PageObjects.settings.navigateTo();
await PageObjects.settings.clearAdvancedSettings(VISUALIZE_ENABLE_LABS_SETTING);
await PageObjects.header.clickDashboard();
});
Expand Down
2 changes: 0 additions & 2 deletions test/functional/apps/management/_handle_alias.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export default function ({ getService, getPageObjects }) {
});

it('should be able to create index pattern without time field', async function () {
await PageObjects.settings.navigateTo();
await PageObjects.settings.createIndexPattern('alias1*', null);
});

Expand All @@ -73,7 +72,6 @@ export default function ({ getService, getPageObjects }) {
});

it('should be able to create index pattern with timefield', async function () {
await PageObjects.settings.navigateTo();
await PageObjects.settings.createIndexPattern('alias2*', 'date');
});

Expand Down
2 changes: 0 additions & 2 deletions test/functional/apps/management/_handle_version_conflict.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export default function ({ getService, getPageObjects }) {
});

it('Should be able to surface version conflict notification while creating scripted field', async function () {
await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
await PageObjects.settings.clickScriptedFieldsTab();
Expand Down Expand Up @@ -84,7 +83,6 @@ export default function ({ getService, getPageObjects }) {

it('Should be able to surface version conflict notification while changing field format', async function () {
const fieldName = 'geo.srcdest';
await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
log.debug('Starting openControlsByName (' + fieldName + ')');
Expand Down
2 changes: 0 additions & 2 deletions test/functional/apps/management/_index_pattern_filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default function ({ getService, getPageObjects }) {
before(async function () {
// delete .kibana index and then wait for OpenSearch Dashboards to re-create it
await opensearchDashboardsServer.uiSettings.replace({});
await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
});

Expand All @@ -52,7 +51,6 @@ export default function ({ getService, getPageObjects }) {
});

it('should filter indexed fields', async function () {
await PageObjects.settings.navigateTo();
await PageObjects.settings.clickOpenSearchDashboardsIndexPatterns();
await PageObjects.settings.clickIndexPatternLogstash();
await PageObjects.settings.getFieldTypes();
Expand Down
8 changes: 4 additions & 4 deletions test/functional/apps/visualize/_custom_branding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

it('with customized logo for opensearch overview header in dark mode', async () => {
await PageObjects.common.navigateToApp('management/opensearch-dashboards/settings');
await PageObjects.settings.navigateTo();
await PageObjects.settings.toggleAdvancedSettingCheckbox('theme:darkMode');
await PageObjects.common.navigateToApp('opensearch_dashboards_overview');
await testSubjects.existOrFail('osdOverviewPageHeaderLogo');
Expand Down Expand Up @@ -100,7 +100,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

it('with customized logo in dark mode', async () => {
await PageObjects.common.navigateToApp('management/opensearch-dashboards/settings');
await PageObjects.settings.navigateTo();
await PageObjects.settings.toggleAdvancedSettingCheckbox('theme:darkMode');
await PageObjects.common.navigateToApp('home');
await testSubjects.existOrFail('welcomeCustomLogo');
Expand Down Expand Up @@ -185,7 +185,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

after(async function () {
await PageObjects.common.navigateToApp('management/opensearch-dashboards/settings');
await PageObjects.settings.navigateTo();
await PageObjects.settings.clearAdvancedSettings('theme:darkMode');
});

Expand All @@ -206,7 +206,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
});

it('with customized mark logo button that navigates to home page', async () => {
await PageObjects.common.navigateToApp('settings');
await PageObjects.settings.navigateTo();
await globalNav.clickHomeButton();
await PageObjects.header.waitUntilLoadingHasFinished();
const url = await browser.getCurrentUrl();
Expand Down
6 changes: 2 additions & 4 deletions test/functional/apps/visualize/_lab_mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ export default function ({ getService, getPageObjects }) {
log.info('found saved search before toggling enableLabs mode');

// Navigate to advanced setting and disable lab mode
await PageObjects.header.clickStackManagement();
await PageObjects.settings.clickOpenSearchDashboardsSettings();
await PageObjects.settings.navigateTo();
await PageObjects.settings.toggleAdvancedSettingCheckbox(VISUALIZE_ENABLE_LABS_SETTING);

// Expect the discover still to list that saved visualization in the open list
Expand All @@ -61,8 +60,7 @@ export default function ({ getService, getPageObjects }) {

after(async () => {
await PageObjects.discover.closeLoadSaveSearchPanel();
await PageObjects.header.clickStackManagement();
await PageObjects.settings.clickOpenSearchDashboardsSettings();
await PageObjects.settings.navigateTo();
await PageObjects.settings.clearAdvancedSettings(VISUALIZE_ENABLE_LABS_SETTING);
});
});
Expand Down
4 changes: 0 additions & 4 deletions test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ export default async function ({ readConfigFile }) {
management: {
pathname: '/app/management',
},
/** @obsolete "management" should be instead of "settings" **/
settings: {
pathname: '/app/management',
},
console: {
pathname: '/app/dev_tools',
hash: '/console',
Expand Down
4 changes: 2 additions & 2 deletions test/functional/page_objects/settings_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function SettingsPageProvider({ getService, getPageObjects }: FtrProvider
await find.clickByDisplayedLinkText(text);
}
async clickOpenSearchDashboardsSettings() {
await testSubjects.click('settings');
await PageObjects.common.navigateToApp('settings');
await PageObjects.header.waitUntilLoadingHasFinished();
await testSubjects.existOrFail('managementSettingsTitle');
}
Expand All @@ -63,7 +63,7 @@ export function SettingsPageProvider({ getService, getPageObjects }: FtrProvider

async clickOpenSearchDashboardsIndexPatterns() {
log.debug('clickOpenSearchDashboardsIndexPatterns link');
await testSubjects.click('indexPatterns');
await PageObjects.common.navigateToApp('indexPatterns');

await PageObjects.header.waitUntilLoadingHasFinished();
}
Expand Down

0 comments on commit f5ac4fc

Please sign in to comment.