File tree Expand file tree Collapse file tree 5 files changed +22
-20
lines changed Expand file tree Collapse file tree 5 files changed +22
-20
lines changed Original file line number Diff line number Diff line change 11import enterCredentialsCognitoS3 from "../utils/credentials-test/enter-credentials-cognito-s3"
22import enterCredentialsUser from "../utils/credentials-test/enter-credentials-user"
3- import setLanguage from "../utils/set-language"
3+ import commandSetLanguage from "../utils/cypress-command /set-language"
44import goToImportPage from "../utils/go-to-import-page"
55import removeAWSFile from "../utils/remove-cypress-file-in-aws"
66
7+ commandSetLanguage ( )
8+
79if ( Cypress . env ( ) . AWS_IDENTITY_POOL_ID )
810 describe ( "aws test" , ( ) => {
911 before ( "Prepare tests" , ( ) => {
1012 cy . log ( "should be able to join the web site" )
1113 cy . visit ( `http://localhost:6001` )
1214 cy . wait ( 400 )
13- setLanguage ( )
15+ cy . setLanguage ( )
1416 enterCredentialsCognitoS3 ( )
1517 enterCredentialsUser ( )
1618 goToImportPage ( )
Original file line number Diff line number Diff line change 11import clickOn100SamplesInACollaborativeSession from "./utils/interface-test/click-on-100-samples-in-a-collaborative-session"
22import createAndVisitCollaborativeSession from "./utils/interface-test/create-and-visit-collaborative-session"
3+ import commandSetLanguage from "./utils/cypress-command/set-language"
4+
5+ commandSetLanguage ( )
6+
37Cypress . config ( "defaultCommandTimeout" , 3000 )
48describe ( "Create and Visit Collaborative Session" , ( ) => {
59 beforeEach ( "Prepare test" , ( ) => {
610 cy . visit ( `http://localhost:6001` )
7- cy . get ( 'input[id="react-select-2-input"]' )
8- . focus ( )
9- . type ( "English" )
10- . type ( "{enter}" )
11- cy . contains ( "New File" , { timeout : 50000 } ) . click ( )
11+ cy . setLanguage ( "en" )
12+ cy . contains ( "New File" ) . click ( )
1213 } )
1314 createAndVisitCollaborativeSession ( )
1415 clickOn100SamplesInACollaborativeSession ( )
Original file line number Diff line number Diff line change @@ -6,15 +6,15 @@ import namedEntityRecognition from "./utils/interface-test/named-entity-recognit
66import pasteImageUrlsWithCSV from "./utils/interface-test/paste-image-urls-with-csv"
77import pasteImageUrls from "./utils/interface-test/paste-image-urls"
88import textEntityClassification from "./utils/interface-test/text-entity-classification"
9+ import commandSetLanguage from "./utils/cypress-command/set-language"
10+
11+ commandSetLanguage ( )
912
1013Cypress . config ( "defaultCommandTimeout" , 3000 )
1114describe ( "Udt test" , ( ) => {
1215 beforeEach ( "Prepare test" , ( ) => {
1316 cy . visit ( `http://localhost:6001` )
14- cy . get ( 'input[id="react-select-2-input"]' )
15- . focus ( )
16- . type ( "English" )
17- . type ( "{enter}" )
17+ cy . setLanguage ( "en" )
1818 } )
1919 createNewFile ( )
2020 imageClassification ( )
Original file line number Diff line number Diff line change 1+ const command = ( langChar ) => {
2+ //Possible input en,fr,cn.dl and pt
3+ Cypress . Commands . add ( "setLanguage" , ( ) => {
4+ localStorage . setItem ( "i18nextLng" , langChar )
5+ cy . reload ( )
6+ } )
7+ }
8+ export default command
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments