forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kibana home page tests (elastic#15098) (elastic#15964)
Couple of tests to make sure Kibana home page isn't breaking.
- Loading branch information
Showing
7 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import expect from 'expect.js'; | ||
|
||
|
||
export default function ({ getService, getPageObjects }) { | ||
const remote = getService('remote'); | ||
const PageObjects = getPageObjects(['common', 'home']); | ||
|
||
describe('Kibana takes you home', function describeIndexTests() { | ||
|
||
it('clicking on kibana logo should take you to home page', async ()=> { | ||
await PageObjects.common.navigateToApp('settings'); | ||
await PageObjects.home.clickKibanaIcon(); | ||
const url = await remote.getCurrentUrl(); | ||
expect(url.includes('/app/kibana#/home')).to.be(true); | ||
}); | ||
|
||
it('clicking on console on homepage should take you to console app', async ()=> { | ||
await PageObjects.home.clickSynopsis('console'); | ||
const url = await remote.getCurrentUrl(); | ||
expect(url.includes('/app/kibana#/dev_tools/console?_g=()')).to.be(true); | ||
}); | ||
|
||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export default function ({ getService, loadTestFile }) { | ||
const remote = getService('remote'); | ||
|
||
describe('homepage app', function () { | ||
before(function () { | ||
return remote.setWindowSize(1200, 800); | ||
}); | ||
|
||
loadTestFile(require.resolve('./_home')); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
export function HomePageProvider({ getService }) { | ||
const testSubjects = getService('testSubjects'); | ||
//const PageObjects = getPageObjects(['common', 'header']); | ||
class HomePage { | ||
|
||
async clickKibanaIcon() { | ||
await testSubjects.click('kibanaLogo'); | ||
} | ||
|
||
async clickSynopsis(title) { | ||
await testSubjects.click(`homeSynopsisLink${title}`); | ||
} | ||
|
||
|
||
} | ||
|
||
return new HomePage(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters