forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Upgrade Assistant] Add integration tests for Overview page (elastic#…
…111370) * Add a11y tests for when overview page has toggle enabled * Add functional and accessibility tests for overview page * Load test files * Fix linter error * Navigate before asserting * Steps have now completion state * Remove duped word * Run setup only once, not per test * Address CR changes * No need to renavigate to the page Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information
1 parent
a9b5204
commit 123cf5f
Showing
6 changed files
with
103 additions
and
12 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
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
68 changes: 68 additions & 0 deletions
68
x-pack/test/functional/apps/upgrade_assistant/overview_page.ts
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,68 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { FtrProviderContext } from '../../ftr_provider_context'; | ||
|
||
export default function upgradeAssistantOverviewPageFunctionalTests({ | ||
getService, | ||
getPageObjects, | ||
}: FtrProviderContext) { | ||
const PageObjects = getPageObjects(['upgradeAssistant', 'common']); | ||
const retry = getService('retry'); | ||
const security = getService('security'); | ||
const testSubjects = getService('testSubjects'); | ||
const es = getService('es'); | ||
|
||
describe('Overview Page', function () { | ||
this.tags('skipFirefox'); | ||
|
||
before(async () => { | ||
await security.testUser.setRoles(['superuser']); | ||
}); | ||
|
||
after(async () => { | ||
await security.testUser.restoreDefaults(); | ||
}); | ||
|
||
beforeEach(async () => { | ||
await PageObjects.upgradeAssistant.navigateToPage(); | ||
|
||
await retry.waitFor('Upgrade Assistant overview page to be visible', async () => { | ||
return testSubjects.exists('overview'); | ||
}); | ||
}); | ||
|
||
it('Should render all steps', async () => { | ||
testSubjects.exists('backupStep-incomplete'); | ||
testSubjects.exists('fixIssuesStep-incomplete'); | ||
testSubjects.exists('fixLogsStep-incomplete'); | ||
testSubjects.exists('upgradeStep'); | ||
}); | ||
|
||
describe('fixLogsStep', () => { | ||
before(async () => { | ||
// Access to system indices will be deprecated and should generate a deprecation log | ||
await es.indices.get({ index: '.kibana' }); | ||
|
||
await PageObjects.upgradeAssistant.clickDeprecationLoggingToggle(); | ||
|
||
await retry.waitFor('UA external links title to be present', async () => { | ||
return testSubjects.isDisplayed('externalLinksTitle'); | ||
}); | ||
}); | ||
|
||
it('Shows warnings callout if there are deprecations', async () => { | ||
testSubjects.exists('hasWarningsCallout'); | ||
}); | ||
|
||
it('Shows no warnings callout if there are no deprecations', async () => { | ||
await PageObjects.upgradeAssistant.clickResetLastCheckpointButton(); | ||
testSubjects.exists('noWarningsCallout'); | ||
}); | ||
}); | ||
}); | ||
} |
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