@@ -28,7 +28,10 @@ const TEST_POLICY_ALL_PHASES = {
2828} ;
2929
3030export default function ( { getService, getPageObjects } : FtrProviderContext ) {
31- const { common } = getPageObjects ( [ 'common' ] ) ;
31+ const { common, indexLifecycleManagement } = getPageObjects ( [
32+ 'common' ,
33+ 'indexLifecycleManagement' ,
34+ ] ) ;
3235 const retry = getService ( 'retry' ) ;
3336 const testSubjects = getService ( 'testSubjects' ) ;
3437 const esClient = getService ( 'es' ) ;
@@ -55,6 +58,32 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
5558 await esClient . ilm . deleteLifecycle ( { policy : TEST_POLICY_NAME } ) ;
5659 } ) ;
5760
61+ it ( 'Create Policy Form' , async ( ) => {
62+ await retry . waitFor ( 'Index Lifecycle Policy create/edit view to be present' , async ( ) => {
63+ return testSubjects . isDisplayed ( 'createPolicyButton' ) ;
64+ } ) ;
65+
66+ // Navigate to create policy page and take snapshot
67+ await testSubjects . click ( 'createPolicyButton' ) ;
68+ await retry . waitFor ( 'Index Lifecycle Policy create/edit view to be present' , async ( ) => {
69+ return ( await testSubjects . getVisibleText ( 'policyTitle' ) ) === 'Create policy' ;
70+ } ) ;
71+
72+ // Fill out form after enabling all phases and take snapshot.
73+ await indexLifecycleManagement . fillNewPolicyForm ( 'testPolicy' , true , true , false ) ;
74+ await a11y . testAppSnapshot ( ) ;
75+ } ) ;
76+
77+ it ( 'Send Request Flyout on New Policy Page' , async ( ) => {
78+ // Take snapshot of the show request panel
79+ await testSubjects . click ( 'requestButton' ) ;
80+ await a11y . testAppSnapshot ( ) ;
81+
82+ // Close panel and save policy
83+ await testSubjects . click ( 'euiFlyoutCloseButton' ) ;
84+ await indexLifecycleManagement . saveNewPolicy ( ) ;
85+ } ) ;
86+
5887 it ( 'List policies view' , async ( ) => {
5988 await retry . waitFor ( 'Index Lifecycle Policy create/edit view to be present' , async ( ) => {
6089 await common . navigateToApp ( 'indexLifecycleManagement' ) ;
0 commit comments