Skip to content

Commit 4049200

Browse files
committed
Merge branch 'master' into feature/oct-1345-disabled-add-to-allocate-patron-mode
2 parents 0355ade + 4ac8da4 commit 4049200

File tree

133 files changed

+1085
-1261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+1085
-1261
lines changed

.github/workflows/ci-run.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
secrets: inherit
2525
with:
2626
env-type: e2e
27-
delete-env: true
2827
pull-request-id: ${{ github.event.pull_request.number }}
2928
workflow-id: ${{ github.run_id }}
3029

@@ -38,7 +37,6 @@ jobs:
3837
secrets: inherit
3938
with:
4039
env-type: apitest
41-
delete-env: true
4240
pull-request-id: ${{ github.event.pull_request.number }}
4341
workflow-id: ${{ github.run_id }}
4442

@@ -96,6 +94,7 @@ jobs:
9694
# Setup NVM to use Node version 16
9795
set +x
9896
source /usr/share/nvm/init-nvm.sh
97+
nvm install 16
9998
nvm use 16
10099
set -x
101100
npm i -g yarn

.github/workflows/destroy-master.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ jobs:
1010
secrets: inherit
1111
with:
1212
env-type: master
13+
delete-env: false

.github/workflows/destroy-uat.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ jobs:
1010
secrets: inherit
1111
with:
1212
env-type: uat
13+
delete-env: false

.github/workflows/tpl-destroy-env.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
type: string
1515
delete-env:
1616
required: false
17+
default: true
1718
type: boolean
1819
pull_request:
1920
types: [ closed ]
@@ -68,17 +69,34 @@ jobs:
6869
echo "DEPLOYMENT_ID=$DEPLOYMENT_ID" >> $GITHUB_OUTPUT
6970
shell: bash
7071

72+
- uses: actions/github-script@v7
73+
id: does-env-exist
74+
if: always()
75+
with:
76+
result-encoding: string
77+
script: |
78+
try {
79+
await github.rest.repos.getEnvironment({
80+
owner: context.repo.owner,
81+
repo: context.repo.repo,
82+
environment_name: '${{ steps.destroy-env.outputs.DEPLOYMENT_ID }}',
83+
});
84+
return 'true';
85+
} catch {
86+
return 'false';
87+
}
88+
7189
- name: Delete Environment
7290
uses: bobheadxi/deployments@v1
73-
if: always() && ${{ inputs.delete-env }}
91+
if: ${{ (steps.does-env-exist.outputs.result == 'true') && (inputs.delete-env || github.event_name == 'pull_request') }}
7492
with:
7593
step: delete-env
7694
token: ${{ secrets.GH_BOT_TOKEN }}
7795
env: ${{ steps.destroy-env.outputs.DEPLOYMENT_ID }}
7896

7997
- name: Deactivate Environment
8098
uses: bobheadxi/deployments@v1
81-
if: always() && ${{ !inputs.delete-env }}
99+
if: ${{ (steps.does-env-exist.outputs.result == 'true') && !inputs.delete-env }}
82100
with:
83101
step: deactivate-env
84102
token: ${{ secrets.GH_BOT_TOKEN }}

backend/app/infrastructure/routes/rewards.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ def get(self, user_address, epoch):
203203
"epoch": "Epoch number",
204204
},
205205
)
206+
@ns.response(404, "User userAddress does not have a budget for epoch epochNumber")
206207
class EpochBudgets(OctantResource):
207208
@ns.marshal_with(epoch_budget_model)
208209
@ns.response(200, "Epoch individual budgets successfully retrieved")

ci/argocd/application.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ elif [[ "$ACTION" == "update" ]]; then
124124
-H "Authorization: Bearer ${ARGOCD_ACCESS_TOKEN}" \
125125
-H "Content-type: application/json" \
126126
"${ARGOCD_URL}/api/v1/applications/${DEPLOYMENT_ID}/sync"
127-
sleep 30
128127

129128
# I'm leaving the previous hack for the time being in case it has to be used again
130129
#

client/cypress/e2e/layout.cy.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,34 @@ Object.values(viewports).forEach(({ device, viewportWidth, viewportHeight }) =>
2323
cy.get('[data-test=MainLayout__Header]').should('be.visible');
2424
});
2525

26-
it('Octant logo redirects to projects view', () => {
26+
it('Clicking on Octant logo scrolls view to the top on logo click (projects view)', () => {
27+
cy.scrollTo(0, 500);
28+
cy.get('[data-test=MainLayout__Logo]').click();
29+
// waiting for scrolling to finish
30+
cy.wait(2000);
31+
cy.window().then(cyWindow => {
32+
expect(cyWindow.scrollY).to.be.eq(0);
33+
});
34+
});
35+
36+
it('Clicking on Octant logo redirects to projects view (outside projects view)', () => {
37+
cy.get('[data-test=Navbar__Button--Settings]').click();
38+
cy.get('[data-test=SettingsView]').should('be.visible');
2739
cy.get('[data-test=MainLayout__Logo]').click();
2840
cy.get('[data-test=ProposalsView]').should('be.visible');
2941
});
3042

43+
it('Clicking on Octant logo redirects to projects view (outside projects view) with memorized scrollY', () => {
44+
cy.scrollTo(0, 500);
45+
cy.get('[data-test=Navbar__Button--Settings]').click();
46+
cy.get('[data-test=SettingsView]').should('be.visible');
47+
cy.get('[data-test=MainLayout__Logo]').click();
48+
cy.get('[data-test=ProposalsView]').should('be.visible');
49+
cy.window().then(cyWindow => {
50+
expect(cyWindow.scrollY).to.be.eq(500);
51+
});
52+
});
53+
3154
it('renders bottom navbar', () => {
3255
cy.get('[data-test=Navbar]').should('be.visible');
3356
});

client/cypress/e2e/settings.cy.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { BigNumber } from 'ethers';
2-
31
import { visitWithLoader, navigateWithCheck, mockCoinPricesServer } from 'cypress/utils/e2e';
42
import viewports from 'cypress/utils/viewports';
53
import { FIAT_CURRENCIES_SYMBOLS, DISPLAY_CURRENCIES } from 'src/constants/currencies';
@@ -74,7 +72,7 @@ Object.values(viewports).forEach(({ device, viewportWidth, viewportHeight }) =>
7472

7573
const cryptoValue = getValueCryptoToDisplay({
7674
cryptoCurrency: 'golem',
77-
valueCrypto: BigNumber.from(0),
75+
valueCrypto: BigInt(0),
7876
});
7977

8078
cy.get('[data-test=BoxGlmLock__Section--effective__DoubleValue__primary]')
@@ -91,7 +89,7 @@ Object.values(viewports).forEach(({ device, viewportWidth, viewportHeight }) =>
9189

9290
const cryptoValue = getValueCryptoToDisplay({
9391
cryptoCurrency: 'golem',
94-
valueCrypto: BigNumber.from(0),
92+
valueCrypto: BigInt(0),
9593
});
9694

9795
cy.get('[data-test=BoxGlmLock__Section--effective__DoubleValue__primary]')

client/global.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
import { QueryClient } from '@tanstack/react-query';
22

3+
import {
4+
WINDOW_PROPOSALS_LOADED_ARCHIVED_EPOCHS_NUMBER,
5+
WINDOW_PROPOSALS_SCROLL_Y,
6+
} from 'constants/window';
7+
38
export declare global {
49
interface Window {
510
Cypress?: Cypress.Cypress;
11+
[WINDOW_PROPOSALS_LOADED_ARCHIVED_EPOCHS_NUMBER]?: number;
12+
[WINDOW_PROPOSALS_SCROLL_Y]?: number;
613
clientReactQuery?: QueryClient;
714
}
815
}

client/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
"synpress:run": "synpress run --configFile synpress.config.ts"
3232
},
3333
"dependencies": {
34-
"@ethersproject/constants": "^5.7.0",
35-
"@ethersproject/providers": "^5.7.2",
3634
"@tanstack/react-query": "^5.18.0",
3735
"@wagmi/connectors": "^3.1.5",
3836
"@web3modal/ethereum": "2.7.1",
@@ -41,7 +39,6 @@
4139
"classnames": "^2.5.1",
4240
"date-fns": "^3.3.1",
4341
"dotenv": "^16.4.1",
44-
"ethers": "^5.7.2",
4542
"formik": "^2.4.5",
4643
"framer-motion": "^11.0.3",
4744
"graphql": "^16.8.1",

0 commit comments

Comments
 (0)