@jahia/cypress 3.14.4 → 3.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ci.build.sh +16 -2
- package/dist/support/registerSupport.js +1 -0
- package/env.provision.sh +9 -0
- package/package.json +1 -1
- package/src/support/registerSupport.ts +2 -1
package/ci.build.sh
CHANGED
|
@@ -21,8 +21,22 @@ fi
|
|
|
21
21
|
|
|
22
22
|
if [ -d ./jahia-module ]; then
|
|
23
23
|
cd jahia-module
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
if [ -e "pom.xml" ]; then
|
|
25
|
+
mvn clean install
|
|
26
|
+
cp target/*-SNAPSHOT.jar ../artifacts/
|
|
27
|
+
elif [ -e "package.json" ]; then
|
|
28
|
+
rm ./*-SNAPSHOT.tgz
|
|
29
|
+
yarn install && yarn build && yarn pack
|
|
30
|
+
|
|
31
|
+
packages=$(ls *.tgz)
|
|
32
|
+
for package in $packages
|
|
33
|
+
do
|
|
34
|
+
filename=$(basename "$package" .tgz)
|
|
35
|
+
new_filename="$filename-SNAPSHOT.tgz"
|
|
36
|
+
mv "$package" "$new_filename"
|
|
37
|
+
done
|
|
38
|
+
cp ./*-SNAPSHOT.tgz ../artifacts/
|
|
39
|
+
fi
|
|
26
40
|
cd ..
|
|
27
41
|
fi
|
|
28
42
|
|
|
@@ -14,6 +14,7 @@ var registerSupport = function () {
|
|
|
14
14
|
Cypress.Commands.add('executeGroovy', provisioning_1.executeGroovy);
|
|
15
15
|
Cypress.Commands.add('installBundle', provisioning_1.installBundle);
|
|
16
16
|
Cypress.Commands.add('login', login_1.login);
|
|
17
|
+
Cypress.Commands.add('loginAndStoreSession', login_1.loginAndStoreSession);
|
|
17
18
|
Cypress.Commands.add('logout', logout_1.logout);
|
|
18
19
|
Cypress.Commands.add('repeatUntil', repeatUntil_1.repeatUntil);
|
|
19
20
|
Cypress.Commands.overwrite('fixture', fixture_1.fixture);
|
package/env.provision.sh
CHANGED
|
@@ -77,6 +77,15 @@ if [[ -d artifacts/ ]]; then
|
|
|
77
77
|
echo
|
|
78
78
|
echo "$(date +'%d %B %Y - %k:%M') [MODULE_INSTALL] == Module submitted =="
|
|
79
79
|
done
|
|
80
|
+
|
|
81
|
+
# This is done after classic .jar module to ensure NPM modules are installed after engine module
|
|
82
|
+
for file in $(ls -1 *-SNAPSHOT.tgz | sort -n)
|
|
83
|
+
do
|
|
84
|
+
echo "$(date +'%d %B %Y - %k:%M') [MODULE_INSTALL] == Submitting NPM module from: $file =="
|
|
85
|
+
curl -u root:${SUPER_USER_PASSWORD} -X POST ${JAHIA_URL}/modules/api/provisioning --form script='[{"installAndStartBundle":"'"$file"'", "forceUpdate":true}]' --form file=@$file
|
|
86
|
+
echo
|
|
87
|
+
echo "$(date +'%d %B %Y - %k:%M') [MODULE_INSTALL] == NPM Module submitted =="
|
|
88
|
+
done
|
|
80
89
|
cd ..
|
|
81
90
|
fi
|
|
82
91
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {apollo, apolloClient} from './apollo';
|
|
2
2
|
import {executeGroovy, runProvisioningScript, installBundle} from './provisioning';
|
|
3
|
-
import {login} from './login';
|
|
3
|
+
import {login, loginAndStoreSession} from './login';
|
|
4
4
|
import {logout} from './logout';
|
|
5
5
|
import {fixture} from './fixture';
|
|
6
6
|
import {repeatUntil} from './repeatUntil';
|
|
@@ -14,6 +14,7 @@ export const registerSupport = (): void => {
|
|
|
14
14
|
Cypress.Commands.add('installBundle', installBundle);
|
|
15
15
|
|
|
16
16
|
Cypress.Commands.add('login', login);
|
|
17
|
+
Cypress.Commands.add('loginAndStoreSession', loginAndStoreSession);
|
|
17
18
|
Cypress.Commands.add('logout', logout);
|
|
18
19
|
Cypress.Commands.add('repeatUntil', repeatUntil);
|
|
19
20
|
|