Browse Source

fix for cypress script

philippe 6 years ago
parent
commit
76cbf9031d
23 changed files with 20 additions and 19 deletions
  1. 0 0
      functionnal_tests/cypress_test/account/account_main_page.js
  2. 0 0
      functionnal_tests/cypress_test/account/content_account.js
  3. 0 0
      functionnal_tests/cypress_test/admin/content_admin_user.js
  4. 0 0
      functionnal_tests/cypress_test/admin/content_admin_workspace.js
  5. 0 0
      functionnal_tests/cypress_test/admin/navigation_admin_user.js
  6. 0 0
      functionnal_tests/cypress_test/admin/navigation_admin_workspace.js
  7. 0 0
      functionnal_tests/cypress_test/app_file/navigation_create_file.js
  8. 0 0
      functionnal_tests/cypress_test/app_folder/navigation_create_folder.js
  9. 0 0
      functionnal_tests/cypress_test/app_html-document/navigation_create_html-document.js
  10. 0 0
      functionnal_tests/cypress_test/app_html-document/operation_create_html-document.js
  11. 0 0
      functionnal_tests/cypress_test/app_thread/navigation_create_thread.js
  12. 0 0
      functionnal_tests/cypress_test/app_thread/operation_create_thread.js
  13. 0 0
      functionnal_tests/cypress_test/home_page/content_home_page.js
  14. 0 0
      functionnal_tests/cypress_test/interface/function_change_color.js
  15. 0 0
      functionnal_tests/cypress_test/login/content_login_page.js
  16. 0 0
      functionnal_tests/cypress_test/login/navigation_from_home_page_to_login_page.js
  17. 0 0
      functionnal_tests/cypress_test/login/navigation_from_login_page_to_home_page.js
  18. 0 0
      functionnal_tests/cypress_test/login/navigation_redirect_login_page.js
  19. 0 0
      functionnal_tests/cypress_test/workspace/content_workspace_dashboard.js
  20. 0 0
      functionnal_tests/cypress_test/workspace/navigation_create_workspace.js
  21. 0 0
      functionnal_tests/cypress_test/workspace/navigation_dashbord_link-for-calendar.js
  22. 0 0
      functionnal_tests/cypress_test/workspace/navigation_dashbord_link-for-webdav.js
  23. 20 19
      install_cypress.sh

functionnal_tests/account/account_main_page.js → functionnal_tests/cypress_test/account/account_main_page.js View File


functionnal_tests/account/content_account.js → functionnal_tests/cypress_test/account/content_account.js View File


functionnal_tests/admin/content_admin_user.js → functionnal_tests/cypress_test/admin/content_admin_user.js View File


functionnal_tests/admin/content_admin_workspace.js → functionnal_tests/cypress_test/admin/content_admin_workspace.js View File


functionnal_tests/admin/navigation_admin_user.js → functionnal_tests/cypress_test/admin/navigation_admin_user.js View File


functionnal_tests/admin/navigation_admin_workspace.js → functionnal_tests/cypress_test/admin/navigation_admin_workspace.js View File


functionnal_tests/app_file/navigation_create_file.js → functionnal_tests/cypress_test/app_file/navigation_create_file.js View File


functionnal_tests/app_folder/navigation_create_folder.js → functionnal_tests/cypress_test/app_folder/navigation_create_folder.js View File


functionnal_tests/app_html-document/navigation_create_html-document.js → functionnal_tests/cypress_test/app_html-document/navigation_create_html-document.js View File


functionnal_tests/app_html-document/operation_create_html-document.js → functionnal_tests/cypress_test/app_html-document/operation_create_html-document.js View File


functionnal_tests/app_thread/navigation_create_thread.js → functionnal_tests/cypress_test/app_thread/navigation_create_thread.js View File


functionnal_tests/app_thread/operation_create_thread.js → functionnal_tests/cypress_test/app_thread/operation_create_thread.js View File


functionnal_tests/home_page/content_home_page.js → functionnal_tests/cypress_test/home_page/content_home_page.js View File


functionnal_tests/interface/function_change_color.js → functionnal_tests/cypress_test/interface/function_change_color.js View File


functionnal_tests/login/content_login_page.js → functionnal_tests/cypress_test/login/content_login_page.js View File


functionnal_tests/login/navigation_from_home_page_to_login_page.js → functionnal_tests/cypress_test/login/navigation_from_home_page_to_login_page.js View File


functionnal_tests/login/navigation_from_login_page_to_home_page.js → functionnal_tests/cypress_test/login/navigation_from_login_page_to_home_page.js View File


functionnal_tests/login/navigation_redirect_login_page.js → functionnal_tests/cypress_test/login/navigation_redirect_login_page.js View File


functionnal_tests/workspace/content_workspace_dashboard.js → functionnal_tests/cypress_test/workspace/content_workspace_dashboard.js View File


functionnal_tests/workspace/navigation_create_workspace.js → functionnal_tests/cypress_test/workspace/navigation_create_workspace.js View File


functionnal_tests/workspace/navigation_dashbord_link-for-calendar.js → functionnal_tests/cypress_test/workspace/navigation_dashbord_link-for-calendar.js View File


functionnal_tests/workspace/navigation_dashbord_link-for-webdav.js → functionnal_tests/cypress_test/workspace/navigation_dashbord_link-for-webdav.js View File


+ 20 - 19
install_cypress.sh View File

1
 #!/bin/bash
1
 #!/bin/bash
2
+ash
2
 . bash_library.sh # source bash_library.sh
3
 . bash_library.sh # source bash_library.sh
3
 
4
 
4
 # install nodjs if not installed
5
 # install nodjs if not installed
5
 
6
 
6
 (
7
 (
7
-  log "verify if nodjs is installed"
8
+  log "Verify if nodjs is installed."
8
   dpkg -l | grep '^ii' | grep 'nodejs\s'
9
   dpkg -l | grep '^ii' | grep 'nodejs\s'
9
 
10
 
10
   if [ $? -eq 0 ]; then
11
   if [ $? -eq 0 ]; then
11
-    loggood "nodejs is installed"
12
+    loggood "nodejs is installed."
12
   else
13
   else
13
-    log "install nodejs"
14
+    log "Install nodejs"
14
     sudo apt install curl
15
     sudo apt install curl
15
     curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
16
     curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
16
     sudo apt install -y nodejs
17
     sudo apt install -y nodejs
17
-    loggood "nodejs is now installed"
18
+    loggood "nodejs is now installed."
18
   fi
19
   fi
19
 )
20
 )
20
 
21
 
21
 # install Cypress
22
 # install Cypress
22
-log "go to functionnal_tests subdir.."
23
+log "Go to functionnal_tests subdir.."
23
 cd  functionnal_tests || exit 1;
24
 cd  functionnal_tests || exit 1;
24
 (
25
 (
25
   ACTUALDIR=$(pwd)
26
   ACTUALDIR=$(pwd)
26
   loggood "Your are now here: \"$ACTUALDIR\""
27
   loggood "Your are now here: \"$ACTUALDIR\""
27
-  log "check if package.json exist"
28
+  log "Check if package.json exist."
28
   if [ ! -f package.json ]; then
29
   if [ ! -f package.json ]; then
29
     log "package.json not exist => run npm init"
30
     log "package.json not exist => run npm init"
30
     npm init -y
31
     npm init -y
31
-    loggood "npm init finished => package.json is now created"
32
+    loggood "npm init finished => package.json is now created."
32
   else
33
   else
33
-    loggood "package.json exist"
34
+    loggood "package.json exist."
34
   fi
35
   fi
35
-  log "install cypress"
36
+  log "Install cypress."
36
   npm install cypress --save-dev
37
   npm install cypress --save-dev
37
-  loggood "cypress is now installed"
38
+  loggood "Cypress is now installed."
38
 )
39
 )
39
 
40
 
40
 # modify cypress.json
41
 # modify cypress.json
41
 
42
 
42
 (
43
 (
43
-  log "check if cypress.json exist"
44
+  log "Check if cypress.json exist."
44
   if [ ! -f cypress.json ]; then
45
   if [ ! -f cypress.json ]; then
45
     log "cypress.json not exist => copy from cypress.json.sample"
46
     log "cypress.json not exist => copy from cypress.json.sample"
46
     cp cypress.json.sample cypress.json
47
     cp cypress.json.sample cypress.json
47
-    loggood "cypress.json is now available"
48
-    log "write path in cypress.json"
48
+    loggood "cypress.json is now available."
49
+    log "Write path in cypress.json"
49
     SUBDIR=$(pwd)
50
     SUBDIR=$(pwd)
50
-    sed -i "s|{path_test_file}|$SUBDIR|g" cypress.json
51
-    loggood "path is now configured"
51
+    sed -i "s|{path_test_file}|$SUBDIR/cypress_test|g" cypress.json
52
+    loggood "Path is now configured."
52
   else
53
   else
53
-  log "cypress.json exist => check if integrationFolder have path"
54
+  log "cypress.json exist => check if integrationFolder have path."
54
     if grep -q "\"integrationFolder\"\:\s\"{path_test_file}\"" cypress.json ; then
55
     if grep -q "\"integrationFolder\"\:\s\"{path_test_file}\"" cypress.json ; then
55
-      log "no path => write path in cypress.json"
56
+      log "No path => write path in cypress.json"
56
       SUBDIR=$(pwd)
57
       SUBDIR=$(pwd)
57
       sed -i "s|{path_test_file}|$SUBDIR|g" cypress.json
58
       sed -i "s|{path_test_file}|$SUBDIR|g" cypress.json
58
-      loggood "path is now configured"
59
+      loggood "Path is now configured."
59
     else
60
     else
60
-      loggood "path exist. Modify manualy if necessary"
61
+      loggood "Path exist. Modify manualy if necessary."
61
     fi
62
     fi
62
   fi
63
   fi
63
 )
64
 )