1- import enterCredentialsCognitoS3 from "./utils/credentials-test/enter-credentials-cognito-s3"
2- import enterCredentialsUser from "./utils/credentials-test/enter-credentials-user"
3- import setLanguage from "./utils/set-language"
4- import goToImportPage from "./utils/go-to-import-page"
5- import removeAWSFile from "./utils/remove-cypress-file-in-aws"
6- import "regenerator-runtime/runtime"
1+ import enterCredentialsCognitoS3 from ".. /utils/credentials-test/enter-credentials-cognito-s3"
2+ import enterCredentialsUser from ".. /utils/credentials-test/enter-credentials-user"
3+ import setLanguage from ".. /utils/set-language"
4+ import goToImportPage from ".. /utils/go-to-import-page"
5+ import removeAWSFile from ".. /utils/remove-cypress-file-in-aws"
6+
77if ( Cypress . env ( ) . AWS_IDENTITY_POOL_ID )
88 describe ( "aws test" , ( ) => {
9- it ( "Try to export a natif project to aws ", ( ) => {
9+ before ( "Prepare tests ", ( ) => {
1010 cy . log ( "should be able to join the web site" )
1111 cy . visit ( `http://localhost:6001` )
12-
1312 cy . wait ( 400 )
1413 setLanguage ( )
1514 enterCredentialsCognitoS3 ( )
1615 enterCredentialsUser ( )
1716 goToImportPage ( )
17+ } )
1818
19+ it ( "Try to export a natif project to aws" , ( ) => {
1920 cy . log ( "should be able to use export project" )
2021 cy . wait ( 200 )
2122 cy . contains ( "Export to S3 (Cognito)" ) . click ( )
@@ -31,13 +32,16 @@ if (Cypress.env().AWS_IDENTITY_POOL_ID)
3132 cy . wait ( 200 )
3233 cy . contains ( "CypressTest1" )
3334 cy . contains ( "Close" ) . click ( )
35+ } )
3436
37+ afterEach ( "Clean AWS" , ( ) => {
3538 removeAWSFile ( "CypressTest1" )
3639
3740 cy . log ( "should not be able to see the new project" )
38- cy . wait ( 2000 )
41+ cy . wait ( 200 )
3942 cy . contains ( "Export to S3 (Cognito)" ) . click ( )
4043 cy . wait ( 200 )
4144 cy . contains ( "CypressTest1" ) . should ( "not.exist" )
45+ cy . contains ( "Close" ) . click ( )
4246 } )
4347 } )
0 commit comments