Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify that we've navigated to Settings by checking the title. #21245

Merged
merged 7 commits into from
Jul 27, 2018
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ exports[`AdvancedSettings should render normally 1`] = `
<EuiText
grow={true}
>
<h1>
<h1
data-test-subj="managementSettingsTitle"
>
Settings
</h1>
</EuiText>
Expand Down Expand Up @@ -253,7 +255,9 @@ exports[`AdvancedSettings should render specific setting if given setting key 1`
<EuiText
grow={true}
>
<h1>
<h1
data-test-subj="managementSettingsTitle"
>
Settings
</h1>
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export class AdvancedSettings extends Component {
<EuiFlexGroup gutterSize="none">
<EuiFlexItem>
<EuiText>
<h1>Settings</h1>
<h1 data-test-subj="managementSettingsTitle">Settings</h1>
</EuiText>
</EuiFlexItem>
<EuiFlexItem>
Expand Down
6 changes: 5 additions & 1 deletion test/functional/page_objects/settings_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/

import expect from 'expect.js';
import { map as mapAsync } from 'bluebird';

export function SettingsPageProvider({ getService, getPageObjects }) {
Expand Down Expand Up @@ -45,7 +46,10 @@ export function SettingsPageProvider({ getService, getPageObjects }) {

async clickKibanaSettings() {
await this.clickLinkText('Advanced Settings');
await PageObjects.header.waitUntilLoadingHasFinished();
const isSettingsLoaded = await testSubjects.exists('managementSettingsTitle');

// Verify navigation is successful, or else fail the test consuming this.
expect(isSettingsLoaded).to.be(true);
}

async clickKibanaSavedObjects() {
Expand Down