@@ -60,15 +60,17 @@ export default function (providerContext: FtrProviderContext) {
6060 await cisIntegration . clickOptionButton ( CIS_AWS_OPTION_TEST_ID ) ;
6161 await cisIntegration . inputUniqueIntegrationName ( ) ;
6262 await cisIntegration . clickSaveButton ( ) ;
63- await pageObjects . header . waitUntilLoadingHasFinished ( ) ;
64- expect ( ( await cisIntegrationAws . getPostInstallCloudFormationModal ( ) ) !== undefined ) . to . be (
65- true
66- ) ;
67- await pageObjects . header . waitUntilLoadingHasFinished ( ) ;
68- expect (
69- ( await cisIntegration . getUrlOnPostInstallModal ( ) ) ===
70- 'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-whatis-howdoesitwork.html'
71- ) ;
63+ await retry . tryForTime ( saveIntegrationPolicyTimeout , async ( ) => {
64+ await cisIntegration . waitUntilLaunchCloudFormationButtonAppears ( ) ;
65+ expect ( ( await cisIntegrationAws . getPostInstallCloudFormationModal ( ) ) !== undefined ) . to . be (
66+ true
67+ ) ;
68+ await pageObjects . header . waitUntilLoadingHasFinished ( ) ;
69+ expect (
70+ ( await cisIntegration . getUrlOnPostInstallModal ( ) ) ===
71+ 'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-whatis-howdoesitwork.html'
72+ ) ;
73+ } ) ;
7274 } ) ;
7375 it ( 'On Add Agent modal there should be modal that has Cloud Formation details as well as button that redirects user to Cloud formation page on AWS upon clicking them ' , async ( ) => {
7476 await cisIntegration . navigateToIntegrationCspList ( ) ;
@@ -92,12 +94,12 @@ export default function (providerContext: FtrProviderContext) {
9294 await cisIntegration . fillInTextField ( ROLE_ARN_TEST_ID , roleArn ) ;
9395 await cisIntegration . inputUniqueIntegrationName ( ) ;
9496 await cisIntegration . clickSaveButton ( ) ;
95- await pageObjects . header . waitUntilLoadingHasFinished ( ) ;
9697
9798 /*
9899 * sometimes it takes a while to save the integration so added timeout to wait for post install modal
99100 */
100- await retry . try ( async ( ) => {
101+ await retry . tryForTime ( saveIntegrationPolicyTimeout , async ( ) => {
102+ await cisIntegration . waitUntilLaunchCloudFormationButtonAppears ( ) ;
101103 const modal = await cisIntegration . getPostInstallModal ( ) ;
102104 if ( ! modal ) {
103105 logger . debug ( 'Post install modal not found' ) ;
@@ -130,7 +132,7 @@ export default function (providerContext: FtrProviderContext) {
130132 await cisIntegration . inputUniqueIntegrationName ( ) ;
131133 await cisIntegration . clickSaveButton ( ) ;
132134 await retry . tryForTime ( saveIntegrationPolicyTimeout , async ( ) => {
133- await pageObjects . header . waitUntilLoadingHasFinished ( ) ;
135+ await cisIntegration . waitUntilLaunchCloudFormationButtonAppears ( ) ;
134136 expect ( ( await cisIntegration . getPostInstallModal ( ) ) !== undefined ) . to . be ( true ) ;
135137 await cisIntegration . navigateToIntegrationCspList ( ) ;
136138 expect (
@@ -165,7 +167,7 @@ export default function (providerContext: FtrProviderContext) {
165167 await cisIntegration . inputUniqueIntegrationName ( ) ;
166168 await cisIntegration . clickSaveButton ( ) ;
167169 await retry . tryForTime ( saveIntegrationPolicyTimeout , async ( ) => {
168- await pageObjects . header . waitUntilLoadingHasFinished ( ) ;
170+ await cisIntegration . waitUntilLaunchCloudFormationButtonAppears ( ) ;
169171 expect ( ( await cisIntegration . getPostInstallModal ( ) ) !== undefined ) . to . be ( true ) ;
170172 await cisIntegration . navigateToIntegrationCspList ( ) ;
171173 await cisIntegration . clickFirstElementOnIntegrationTable ( ) ;
@@ -199,7 +201,7 @@ export default function (providerContext: FtrProviderContext) {
199201 await cisIntegration . inputUniqueIntegrationName ( ) ;
200202 await cisIntegration . clickSaveButton ( ) ;
201203 await retry . tryForTime ( saveIntegrationPolicyTimeout , async ( ) => {
202- await pageObjects . header . waitUntilLoadingHasFinished ( ) ;
204+ await cisIntegration . waitUntilLaunchCloudFormationButtonAppears ( ) ;
203205 expect ( ( await cisIntegration . getPostInstallModal ( ) ) !== undefined ) . to . be ( true ) ;
204206 await cisIntegration . navigateToIntegrationCspList ( ) ;
205207 await cisIntegration . clickFirstElementOnIntegrationTable ( ) ;
@@ -222,7 +224,7 @@ export default function (providerContext: FtrProviderContext) {
222224 await cisIntegration . inputUniqueIntegrationName ( ) ;
223225 await cisIntegration . clickSaveButton ( ) ;
224226 await retry . tryForTime ( saveIntegrationPolicyTimeout , async ( ) => {
225- await pageObjects . header . waitUntilLoadingHasFinished ( ) ;
227+ await cisIntegration . waitUntilLaunchCloudFormationButtonAppears ( ) ;
226228 expect (
227229 ( await cisIntegration . getUrlOnPostInstallModal ( ) ) ===
228230 'https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-whatis-howdoesitwork.html'
@@ -241,7 +243,7 @@ export default function (providerContext: FtrProviderContext) {
241243 await cisIntegration . inputUniqueIntegrationName ( ) ;
242244 await cisIntegration . clickSaveButton ( ) ;
243245 await retry . tryForTime ( saveIntegrationPolicyTimeout , async ( ) => {
244- await pageObjects . header . waitUntilLoadingHasFinished ( ) ;
246+ await cisIntegration . waitUntilLaunchCloudFormationButtonAppears ( ) ;
245247 expect ( ( await cisIntegration . getPostInstallModal ( ) ) !== undefined ) . to . be ( true ) ;
246248 await cisIntegration . navigateToIntegrationCspList ( ) ;
247249 expect (
@@ -270,7 +272,7 @@ export default function (providerContext: FtrProviderContext) {
270272 await cisIntegration . inputUniqueIntegrationName ( ) ;
271273 await cisIntegration . clickSaveButton ( ) ;
272274 await retry . tryForTime ( saveIntegrationPolicyTimeout , async ( ) => {
273- await pageObjects . header . waitUntilLoadingHasFinished ( ) ;
275+ await cisIntegration . waitUntilLaunchCloudFormationButtonAppears ( ) ;
274276 expect ( ( await cisIntegration . getPostInstallModal ( ) ) !== undefined ) . to . be ( true ) ;
275277 await cisIntegration . navigateToIntegrationCspList ( ) ;
276278 expect (
@@ -306,7 +308,7 @@ export default function (providerContext: FtrProviderContext) {
306308 await cisIntegration . inputUniqueIntegrationName ( ) ;
307309 await cisIntegration . clickSaveButton ( ) ;
308310 await retry . tryForTime ( saveIntegrationPolicyTimeout , async ( ) => {
309- await pageObjects . header . waitUntilLoadingHasFinished ( ) ;
311+ await cisIntegration . waitUntilLaunchCloudFormationButtonAppears ( ) ;
310312 expect ( ( await cisIntegration . getPostInstallModal ( ) ) !== undefined ) . to . be ( true ) ;
311313 await cisIntegration . navigateToIntegrationCspList ( ) ;
312314 await cisIntegration . clickFirstElementOnIntegrationTable ( ) ;
@@ -341,7 +343,7 @@ export default function (providerContext: FtrProviderContext) {
341343 await cisIntegration . inputUniqueIntegrationName ( ) ;
342344 await cisIntegration . clickSaveButton ( ) ;
343345 await retry . tryForTime ( saveIntegrationPolicyTimeout , async ( ) => {
344- await pageObjects . header . waitUntilLoadingHasFinished ( ) ;
346+ await cisIntegration . waitUntilLaunchCloudFormationButtonAppears ( ) ;
345347 expect ( ( await cisIntegration . getPostInstallModal ( ) ) !== undefined ) . to . be ( true ) ;
346348 await cisIntegration . navigateToIntegrationCspList ( ) ;
347349 await cisIntegration . clickFirstElementOnIntegrationTable ( ) ;
0 commit comments