Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
aziolek committed Nov 14, 2023
2 parents af91d90 + b387a14 commit afb26e5
Show file tree
Hide file tree
Showing 60 changed files with 1,378 additions and 584 deletions.
236 changes: 123 additions & 113 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Documentation:
parallel:
matrix:
- SERVICE:
- contracts-v1
- contracts-v1
rules:
- !reference [.rules, on_mr ]
- !reference [.rules, on_push_to_default_branch ]
Expand Down Expand Up @@ -354,21 +354,21 @@ Build images:
- export LOCAL_RPC_URL=https://$(bash $CI_PROJECT_DIR/ci/argocd/get_rpc_url.sh)
- /app/entrypoint.sh $NETWORK $CI_PROJECT_DIR/build.env

#Run E2E App:
# extends:
# - .deploy_anvil
# rules:
# - !reference [.rules, on_mr ]
# - !reference [.rules, on_push_to_default_branch ]
# - !reference [.rules, on_push_to_master_branch ]
# variables:
# ENV_TYPE: "e2e"
# environment:
# name: e2e/$CI_PIPELINE_IID
# url: https://mr-$CI_MERGE_REQUEST_IID-e2e-$CI_PIPELINE_ID-client.octant.wildland.dev
# deployment_tier: development
# on_stop: Destroy E2E App
# auto_stop_in: 6 hours
Run E2E App:
extends:
- .deploy_anvil
rules:
- !reference [.rules, on_mr ]
- !reference [.rules, on_push_to_default_branch ]
- !reference [.rules, on_push_to_master_branch ]
variables:
ENV_TYPE: "e2e"
environment:
name: e2e/$CI_PIPELINE_IID
url: https://mr-$CI_MERGE_REQUEST_IID-e2e-$CI_PIPELINE_ID-client.octant.wildland.dev
deployment_tier: development
on_stop: Destroy E2E App
auto_stop_in: 6 hours

Run MR App:
extends:
Expand All @@ -383,16 +383,16 @@ Run MR App:
deployment_tier: development
on_stop: Destroy MR App

#E2E contracts:
# extends:
# - .deploy_anvil_contracts
# needs: ["Run E2E App"]
# rules:
# - !reference [.rules, on_mr ]
# - !reference [.rules, on_push_to_default_branch ]
# - !reference [.rules, on_push_to_master_branch ]
# variables:
# ENV_TYPE: "e2e"
E2E contracts:
extends:
- .deploy_anvil_contracts
needs: ["Run E2E App"]
rules:
- !reference [.rules, on_mr ]
- !reference [.rules, on_push_to_default_branch ]
- !reference [.rules, on_push_to_master_branch ]
variables:
ENV_TYPE: "e2e"

MR contracts:
extends:
Expand All @@ -403,23 +403,23 @@ MR contracts:
variables:
ENV_TYPE: "mr"

#E2E app deploy:
# extends:
# - .deploy_app
# needs: ["E2E contracts"]
# dependencies: ["E2E contracts"]
# rules:
# - !reference [.rules, on_mr ]
# - !reference [.rules, on_push_to_default_branch ]
# - !reference [.rules, on_push_to_master_branch ]
# variables:
# ENV_TYPE: "e2e"
# NETWORK_NAME: "local"
# NETWORK_ID: "1337"
# SNAPSHOTTER_ENABLED: "true"
# SCHEDULER_ENABLED: "true"
# GLM_CLAIM_ENABLED: "true"
# VAULT_CONFIRM_WITHDRAWALS_ENABLED: "true"
E2E app deploy:
extends:
- .deploy_app
needs: ["E2E contracts"]
dependencies: ["E2E contracts"]
rules:
- !reference [.rules, on_mr ]
- !reference [.rules, on_push_to_default_branch ]
- !reference [.rules, on_push_to_master_branch ]
variables:
ENV_TYPE: "e2e"
NETWORK_NAME: "local"
NETWORK_ID: "1337"
SNAPSHOTTER_ENABLED: "true"
SCHEDULER_ENABLED: "true"
GLM_CLAIM_ENABLED: "true"
VAULT_CONFIRM_WITHDRAWALS_ENABLED: "true"

MR app deploy:
extends:
Expand Down Expand Up @@ -525,19 +525,19 @@ Wait for Master:
environment:
action: stop

#Destroy E2E App:
# extends:
# - .destroy_app
# needs: ["Run E2E App"]
# variables:
# ENV_TYPE: "e2e"
# rules:
# - !reference [.rules, on_mr_manual ]
# - !reference [.rules, on_push_to_default_branch_manual ]
# - !reference [.rules, on_push_to_master_branch_manual ]
# environment:
# name: e2e/$CI_PIPELINE_IID
# deployment_tier: development
Destroy E2E App:
extends:
- .destroy_app
needs: ["Run E2E App"]
variables:
ENV_TYPE: "e2e"
rules:
- !reference [.rules, on_mr_manual ]
- !reference [.rules, on_push_to_default_branch_manual ]
- !reference [.rules, on_push_to_master_branch_manual ]
environment:
name: e2e/$CI_PIPELINE_IID
deployment_tier: development

Destroy MR App:
extends:
Expand Down Expand Up @@ -579,61 +579,61 @@ Destroy Master App:
name: persistent/master
deployment_tier: testing

#E2E Epoch 1:
# stage: application
# needs: ["E2E app deploy"]
# image: !reference [.images, synpress ]
# <<: *env_resolve_init
# rules:
# - !reference [.rules, on_mr]
# - !reference [.rules, on_push_to_default_branch ]
# - !reference [.rules, on_push_to_master_branch ]
# artifacts:
# when: on_failure
# name: cypress
# paths:
# - client/cypress/videos
# - client/cypress/screenshots
# expire_in: 3 days
# cache:
# - key: $CI_COMMIT_REF_SLUG-yarn-client
# policy: pull
# paths:
# - client/.yarn
# - client/node-modules
# - key: $CI_COMMIT_REF_SLUG-yarn-root
# policy: pull
# paths:
# - node_modules
# - .yarn
# script:
# - set -e
# # Setup NVM to use Node version 16
# - source /usr/share/nvm/init-nvm.sh
# - nvm use 16
# - npm i -g yarn
# - cd client
# - yarn install --cache-folder .yarn --frozen-lockfile --prefer-offline --no-audit
# # Wait for the E2E app to become ready
# - bash $CI_PROJECT_DIR/ci/argocd/wait_for_app.sh
# - export OCTANT_BASE_URL=https://$(bash $CI_PROJECT_DIR/ci/argocd/get_web_client_url.sh)
# - set +e
# - yarn synpress:run || CY_EXIT_CODE=$?
# - if [[ "$CY_EXIT_CODE" == "0" ]]; then rm -r $CI_PROJECT_DIR/client/cypress/videos $CI_PROJECT_DIR/client/cypress/screenshots; fi
# - set -e
# # Trigger the stop job
# - |
# JOB_ID=$(curl --fail -s -XGET --header "PRIVATE-TOKEN: $CI_JOB_CONTROLLER" https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/pipelines/$CI_PIPELINE_ID/jobs | jq '.[] | select(.name == "Destroy E2E App") | .id')
#
# curl -s --fail -X POST \
# -H "PRIVATE-TOKEN: $CI_JOB_CONTROLLER" \
# "$CI_API_V4_URL/projects/$CI_PROJECT_ID/jobs/$JOB_ID/play"
# - exit $CY_EXIT_CODE
# variables:
# ENV_TYPE: "e2e"
# CYPRESS_DOCKER_RUN: "true"
# CI: "true"
# METAMASK_VERSION: "10.25.0"
E2E Epoch 1:
stage: application
needs: ["E2E app deploy"]
image: !reference [.images, synpress ]
<<: *env_resolve_init
rules:
- !reference [.rules, on_mr]
- !reference [.rules, on_push_to_default_branch ]
- !reference [.rules, on_push_to_master_branch ]
artifacts:
when: on_failure
name: cypress
paths:
- client/cypress/videos
- client/cypress/screenshots
expire_in: 3 days
cache:
- key: $CI_COMMIT_REF_SLUG-yarn-client
policy: pull
paths:
- client/.yarn
- client/node-modules
- key: $CI_COMMIT_REF_SLUG-yarn-root
policy: pull
paths:
- node_modules
- .yarn
script:
- set -e
# Setup NVM to use Node version 16
- source /usr/share/nvm/init-nvm.sh
- nvm use 16
- npm i -g yarn
- cd client
- yarn install --cache-folder .yarn --frozen-lockfile --prefer-offline --no-audit
# Wait for the E2E app to become ready
- bash $CI_PROJECT_DIR/ci/argocd/wait_for_app.sh
- export OCTANT_BASE_URL=https://$(bash $CI_PROJECT_DIR/ci/argocd/get_web_client_url.sh)
- set +e
- yarn synpress:run || CY_EXIT_CODE=$?
- if [[ "$CY_EXIT_CODE" == "0" ]]; then rm -r $CI_PROJECT_DIR/client/cypress/videos $CI_PROJECT_DIR/client/cypress/screenshots; fi
- set -e
# Trigger the stop job
- |
JOB_ID=$(curl --fail -s -XGET --header "PRIVATE-TOKEN: $CI_JOB_CONTROLLER" https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/pipelines/$CI_PIPELINE_ID/jobs | jq '.[] | select(.name == "Destroy E2E App") | .id')
curl -s --fail -X POST \
-H "PRIVATE-TOKEN: $CI_JOB_CONTROLLER" \
"$CI_API_V4_URL/projects/$CI_PROJECT_ID/jobs/$JOB_ID/play"
- exit $CY_EXIT_CODE
variables:
ENV_TYPE: "e2e"
CYPRESS_DOCKER_RUN: "true"
CI: "true"
METAMASK_VERSION: "10.25.0"

Deploy Release Candidate app:
stage: deploy
Expand All @@ -657,8 +657,18 @@ Deploy Release Candidate app:
cd $GIT_DIR
cat mainnet/octant-image.values.yaml | yq -r ".[0].value.value = \"$IMAGE_TAG\"" | tee mainnet/octant-image.values.yaml
cat testnet/octant-image.values.yaml | yq -r ".[0].value.value = \"$IMAGE_TAG\"" | tee testnet/octant-image.values.yaml
echo '(debug) before update ==='
cat mainnet/octant-image.values.yaml
cat testnet/octant-image.values.yaml
echo '(end debug) ==='
yq -i -e ".[].value.value = \"$IMAGE_TAG\"" mainnet/octant-image.values.yaml
yq -i -e ".[].value.value = \"$IMAGE_TAG\"" testnet/octant-image.values.yaml
echo '(debug) after update ==='
cat mainnet/octant-image.values.yaml
cat testnet/octant-image.values.yaml
echo '(end debug) ==='
git add mainnet/octant-image.values.yaml
git add testnet/octant-image.values.yaml
Expand Down
34 changes: 17 additions & 17 deletions client/cypress/e2e/onboarding.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { visitWithLoader, navigateWithCheck } from 'cypress/utils/e2e';
import viewports from 'cypress/utils/viewports';
import steps from 'src/hooks/helpers/useOnboardingSteps/steps';
import { stepsDecisionWindowClosed } from 'src/hooks/helpers/useOnboardingSteps/steps';
import { ROOT, ROOT_ROUTES } from 'src/routes/RootRoutes/routes';

import Chainable = Cypress.Chainable;
Expand Down Expand Up @@ -55,9 +55,9 @@ const checkChangeStepsWithArrowKeys = (isTOSAccepted: boolean) => {
[
{ el: 1, key: 'ArrowRight' },
{ el: 2, key: 'ArrowRight' },
{ el: 3, key: 'ArrowRight' },
{ el: 3, key: 'ArrowRight' },
{ el: 2, key: 'ArrowLeft' },
{ el: 2, key: 'ArrowRight' },
// { el: 3, key: 'ArrowRight' },
// { el: 2, key: 'ArrowLeft' },
{ el: 1, key: 'ArrowLeft' },
{ el: 0, key: 'ArrowLeft' },
{ el: 0, key: 'ArrowLeft' },
Expand All @@ -81,10 +81,10 @@ const checkChangeStepsByClickingEdgeOfTheScreenUpTo25px = (isTOSAccepted: boolea
[
{ clientX: rightEdgeX - 25, el: 1 },
{ clientX: rightEdgeX - 10, el: 2 },
{ clientX: rightEdgeX - 5, el: 3 },
// { clientX: rightEdgeX - 5, el: 3 },
// rightEdgeX === browser right frame
{ clientX: rightEdgeX - 1, el: 3 },
{ clientX: leftEdgeX + 25, el: 2 },
// { clientX: rightEdgeX - 1, el: 3 },
// { clientX: leftEdgeX + 25, el: 2 },
{ clientX: leftEdgeX + 10, el: 1 },
{ clientX: leftEdgeX + 5, el: 0 },
{ clientX: leftEdgeX, el: 0 },
Expand Down Expand Up @@ -137,15 +137,15 @@ const checkChangeStepsBySwipingOnScreenDifferenceMoreThanOrEqual5px = (isTOSAcce
touchStartClientX: window.innerWidth / 2,
},
{
el: 3,
touchMoveClientX: window.innerWidth / 2 - 5,
touchStartClientX: window.innerWidth / 2,
},
{
el: 3,
el: 2,
touchMoveClientX: window.innerWidth / 2 - 5,
touchStartClientX: window.innerWidth / 2,
},
// {
// el: 3,
// touchMoveClientX: window.innerWidth / 2 - 5,
// touchStartClientX: window.innerWidth / 2,
// },
{
el: 2,
touchMoveClientX: window.innerWidth / 2 + 5,
Expand Down Expand Up @@ -231,12 +231,12 @@ Object.values(viewports).forEach(({ device, viewportWidth, viewportHeight }) =>
});

it('user is able to click through entire onboarding flow', () => {
for (let i = 1; i < steps.length - 1; i++) {
for (let i = 1; i < stepsDecisionWindowClosed.length - 1; i++) {
checkProgressStepperSlimIsCurrentAndClickNext(i);
}

cy.get('[data-test=ModalOnboarding__ProgressStepperSlim__element]')
.eq(steps.length - 1)
.eq(stepsDecisionWindowClosed.length - 1)
.click();
cy.get('[data-test=ProposalsView__ProposalsList]').should('be.visible');
});
Expand Down Expand Up @@ -318,12 +318,12 @@ Object.values(viewports).forEach(({ device, viewportWidth, viewportHeight }) =>
it('onboarding should have one more step (TOS)', () => {
cy.get('[data-test=ModalOnboarding__ProgressStepperSlim__element]').should(
'have.length',
steps.length + 1,
stepsDecisionWindowClosed.length + 1,
);
});

it('user is not able to click through entire onboarding flow', () => {
for (let i = 1; i < steps.length; i++) {
for (let i = 1; i < stepsDecisionWindowClosed.length; i++) {
checkProgressStepperSlimIsCurrentAndClickNext(i, i === 1);
}
});
Expand Down
Loading

0 comments on commit afb26e5

Please sign in to comment.