Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' into markodonnell-add-smoketest-yml
Browse files Browse the repository at this point in the history
  • Loading branch information
markodonnell-deriv authored Oct 16, 2023
2 parents 0d1997a + 6927931 commit 7165845
Show file tree
Hide file tree
Showing 57 changed files with 1,657 additions and 1,690 deletions.
47 changes: 23 additions & 24 deletions .github/workflows/generate-preview-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,12 @@ jobs:
directory='public'
projectName='deriv-com-preview-links'
head_branch=${{github.event.workflow_run.head_branch}}
branch=$(echo $head_branch | head -c 20)
branch=$(echo $head_branch | head -c 20 | sed 's/[\/_\.]/-/g; s/[^a-zA-Z0-9]$/1/')
preview_url=$(wrangler pages deploy $directory --project-name=$projectName --branch=$branch > log.txt 2>&1; echo $?)
echo "------"
cat log.txt
branchName=$(echo $branch | sed 's/[\/_\.]/-/g; s/[^a-zA-Z]$//')
if grep -q "Deployment complete" log.txt; then
echo "preview_url=https://$branchName.deriv-com-preview-links.pages.dev" > "$GITHUB_OUTPUT"
echo "preview_url=https://$branch.deriv-com-preview-links.pages.dev" > "$GITHUB_OUTPUT"
else
echo "Deployment to Cloudflare Pages failed."
exit 1
Expand Down Expand Up @@ -185,30 +184,30 @@ jobs:
- name: e2e Smoke Tests
uses: actions/checkout@v4
with:
repository: deriv-com/e2e-deriv-com # Replace with your repository name
repository: deriv-com/e2e-deriv-com # Replace with your repository name

- name: Cypress run
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action
uses: cypress-io/github-action@v6
with:
# Starts web server for E2E tests - replace with your own server invocation
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server
# start: npm start
# wait-on: 'http://localhost:3000' # Waits for above
# Records to Cypress Cloud
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
record: true
parallel: true # Runs test in parallel using settings above
spec: cypress/e2e/smoke/*.js
group: 'Smoke Tests'
# Starts web server for E2E tests - replace with your own server invocation
# https://docs.cypress.io/guides/continuous-integration/introduction#Boot-your-server
# start: npm start
# wait-on: 'http://localhost:3000' # Waits for above
# Records to Cypress Cloud
# https://docs.cypress.io/guides/cloud/projects#Set-up-a-project-to-record
record: true
parallel: true # Runs test in parallel using settings above
spec: cypress/e2e/smoke/*.js
group: 'Smoke Tests'

env:
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
# in GitHub repo → Settings → Secrets → Actions
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
# Set Base Url from client_payload.
CYPRESS_BASE_URL: ${{steps.publish-to-pages.outputs.preview_url}}
# Send PR and Repo details to Cypress Cloud test run
COMMIT_INFO_MESSAGE: PR "${{steps.pr_information.outputs.issue_number}}" in Repo "${{ github.repository }}"
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
# in GitHub repo → Settings → Secrets → Actions
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
# Set Base Url from client_payload.
CYPRESS_BASE_URL: ${{steps.publish-to-pages.outputs.preview_url}}
# Send PR and Repo details to Cypress Cloud test run
COMMIT_INFO_MESSAGE: PR "${{steps.pr_information.outputs.issue_number}}" in Repo "${{ github.repository }}"
7 changes: 3 additions & 4 deletions crowdin/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,7 @@
"1246145751": "Help centre | Frequently asked questions | Security | Deriv",
"1248844726": "Deriv MT5 (DMT5)",
"1249011149": "Expert support",
"1250814650": "We offer the widest selection of derivatives to trade, with sharp prices and tight spreads that attract over 2.5 million online traders worldwide. Our technology provides an intuitive and powerful trading experience, enabling our clients to understand risk more effectively to make informed trading decisions.",
"1250818586": "Which Deriv trading platforms can I use to trade Reset Call/Reset Put contracts?",
"1250845738": "$ 7.00",
"1254667788": "Dbot trading platform at Deriv",
Expand Down Expand Up @@ -2054,6 +2055,7 @@
"1924997360": "[ { 10",
"1925717346": "The point value is derivied from the current digits of the asset. In this example, the digit is 5, so the point value is 0.00001.",
"1926519171": "Limit the amount of money you may trade within a specified period.",
"1928776934": "Active traders",
"1928930389": "GBP/NOK",
"1929213891": "Our charting site: tradingview.deriv.com",
"1930677092": "Fill up the form and hit <0>Post ad</0>.",
Expand Down Expand Up @@ -3978,10 +3980,7 @@
"-586716383": "Our principles | Deriv",
"-141169956": "Deriv P2P – peer-to-peer deposit and withdrawal service",
"-1451760391": "With Deriv P2P your deposits and withdrawals are easy, fast, and efficient. Access now via the desktop or mobile app.",
"-68718669": "Deriv is the next step in the evolution of Binary.com, the company with a proven record of delivering market-leading products that are trusted around the world.",
"-919442675": "We offer the widest selection of derivatives to trade, with sharp prices and tight spreads that attract over 2.5 million online traders worldwide. Our technology provides an intuitive and powerful trading experience, enabling our clients to understand risk more effectively to make better trading decisions.",
"-550677199": "Trading accounts opened",
"-183146919": "Trades last month",
"-998399066": "Deriv has a proven record of delivering market-leading products that are trusted around the world.",
"-1525567224": "Specialised institutional and prime brokerage solution for the world's most popular financial assets, has zero set-up costs, and is easy to integrate.",
"-1943991243": "Partnership with a trusted pioneer",
"-1781913728": "Benefit from our extensive experience of more than 20 years and our internationally acclaimed reputation.",
Expand Down
20 changes: 0 additions & 20 deletions src/components/elements/symbols-shortcode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ import DECONG from 'images/svg/symbols/markets-stocks-and-indices/american-stock
import DEDBK from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-deutsche-bank-ag.svg'
import DELHAG from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-deutsche-lufthansa-ag.svg'
import DEPSHG from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-porsche.svg'
import DEPUMG from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-puma.svg'
import USAAL from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-american-airlines-group-inc.svg'
import USAAPL from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-apple.svg'
import USABNB from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-airbnb.svg'
Expand All @@ -67,7 +66,6 @@ import USCRM from 'images/svg/symbols/markets-stocks-and-indices/american-stocks
import USCSCO from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-cisco-systems.svg'
import DIS from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-walt-disney-company.svg'
import USDAL from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-delta-air-lines.svg'
import USDIS from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-walt-disney-company.svg'
import USEBAY from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-e-bay-inc.svg'
import USFB from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-facebook-inc.svg'
import USFDX from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-fedex.svg'
Expand All @@ -88,14 +86,7 @@ import USNKE from 'images/svg/symbols/markets-stocks-and-indices/american-stocks
import USNVDA from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-nvidia-corp.svg'
import USPEP from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-pepsico.svg'
import USPFE from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-pfizer.svg'
import USPG from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-procter-gamble.svg'
import USPYPL from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-paypal.svg'
import USSONY from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-sony.svg'
import USTEVA from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-teva-pharmaceutical-inds.svg'
import USTSLMTR from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-tesla-inc.svg'
import USUBER from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-uber-technologies-inc.svg'
import USVISA from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-visa.svg'
import USWMT from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-wal-mart-stores-inc.svg'
import USZM from 'images/svg/symbols/markets-stocks-and-indices/american-stocks/stocks-zoom-video-communications-inc.svg'
import OTC_GDAXI from 'images/svg/symbols/markets-stocks-and-indices/european-indices/germany-40.svg'
import OTC_IBEX35 from 'images/svg/symbols/markets-stocks-and-indices/european-indices/spain-35.svg'
Expand All @@ -105,7 +96,6 @@ import OTC_N225 from 'images/svg/symbols/markets-stocks-and-indices/asian-indice
import OTC_NDX from 'images/svg/symbols/markets-stocks-and-indices/american-indices/us-tech-100.svg'
import OTC_DJI from 'images/svg/symbols/markets-stocks-and-indices/american-indices/wall-street-30.svg'
import OTC_SPC from 'images/svg/symbols/markets-stocks-and-indices/american-indices/us-500.svg'
import OTC_AS51 from 'images/svg/symbols/markets-stocks-and-indices/asian-indices/aus-200.svg'
//derived
import R_10 from 'images/svg/symbols/index10-new.svg'
import R_25 from 'images/svg/symbols/index25-new.svg'
Expand Down Expand Up @@ -237,7 +227,6 @@ export {
DEDBK,
DELHAG,
DEPSHG,
DEPUMG,
USAAL,
USAAPL,
USABNB,
Expand All @@ -248,7 +237,6 @@ export {
USCSCO,
DIS,
USDAL,
USDIS,
USEBAY,
USFB,
USFDX,
Expand All @@ -269,14 +257,7 @@ export {
USNVDA,
USPEP,
USPFE,
USPG,
USPYPL,
USSONY,
USTEVA,
USTSLMTR,
USUBER,
USVISA,
USWMT,
USZM,
OTC_GDAXI,
OTC_IBEX35,
Expand All @@ -286,7 +267,6 @@ export {
OTC_NDX,
OTC_DJI,
OTC_SPC,
OTC_AS51,
R_10,
R_25,
R_50,
Expand Down
2 changes: 0 additions & 2 deletions src/components/elements/symbols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ import SOLANA from 'images/svg/symbols/solana.svg'
import STOCKSUS500 from 'images/svg/symbols/markets-stocks-and-indices/american-indices/us-500.svg'
import STOCKSUSTECH100 from 'images/svg/symbols/markets-stocks-and-indices/american-indices/us-tech-100.svg'
import STOCKSWALLSTREET30 from 'images/svg/symbols/markets-stocks-and-indices/american-indices/wall-street-30.svg'
import STOCKSAUS200 from 'images/svg/symbols/markets-stocks-and-indices/asian-indices/aus-200.svg'
import STOCKSHONGKONG50 from 'images/svg/symbols/markets-stocks-and-indices/asian-indices/hongkong-50.svg'
import STOCKSJAPAN225 from 'images/svg/symbols/markets-stocks-and-indices/asian-indices/japan-225.svg'
import STOCKSEUROPE50 from 'images/svg/symbols/markets-stocks-and-indices/european-indices/europe-50.svg'
Expand Down Expand Up @@ -619,7 +618,6 @@ export {
STOCKSUS500,
STOCKSUSTECH100,
STOCKSWALLSTREET30,
STOCKSAUS200,
STOCKSADVANCEDMICRODEVICES,
STOCKSJAPAN225,
STOCKSEUROPE50,
Expand Down
8 changes: 5 additions & 3 deletions src/features/components/molecules/layout-overlay/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { Suspense, lazy } from 'react'
import pMinDelay from 'p-min-delay'
import loadable from '@loadable/component'
import { overlay_container } from './layout-overlay.module.scss'
Expand All @@ -9,7 +9,7 @@ import { getLocationPathname, getLanguage } from 'common/utility'

const LiveChatButton = loadable(() => pMinDelay(import('./live-chat-button'), 5000))
const WhatsappButton = loadable(() => pMinDelay(import('./whats-app-button'), 5000))
const CookieBanner = loadable(() => pMinDelay(import('./cookie-banner'), 5000))
const CookieBanner = lazy(() => pMinDelay(import('./cookie-banner'), 5000))

const LayoutOverlay = () => {
const is_rtl = useIsRtl()
Expand Down Expand Up @@ -37,7 +37,9 @@ const LayoutOverlay = () => {
align="end"
>
<Flex.Box justify={is_rtl ? 'end' : 'start'} basis="6-12" grow={'1'}>
<CookieBanner />
<Suspense fallback={<></>}>
<CookieBanner />
</Suspense>
</Flex.Box>
<Flex.Box direction="col">
<LiveChatButton />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'
import useAuthCheck from 'components/hooks/use-auth-check'
import useRegion from 'components/hooks/use-region'
import { Localize } from 'components/localization'
import Button from 'features/components/atoms/button'
import useHandleLogin from 'components/hooks/use-handle-login'
Expand All @@ -12,7 +11,6 @@ import { handleGetTrading } from 'components/custom/utils'

const MainNavButtons = () => {
const [is_logged_in] = useAuthCheck()
const { is_region_loading } = useRegion()
const { is_ppc_redirect } = usePpc()

const handleLogin = useHandleLogin()
Expand All @@ -27,22 +25,16 @@ const MainNavButtons = () => {
gap="8x"
>
{is_logged_in ? (
<Button.Primary disabled={is_region_loading} onClick={handleGetTrading} outlined>
<Button.Primary onClick={handleGetTrading} outlined>
<Localize translate_text="_t_Get trading_t_" />
</Button.Primary>
) : (
<>
<Button.Primary
disabled={is_region_loading}
id="dm-nav-login-button"
onClick={handleLogin}
outlined
>
<Button.Primary id="dm-nav-login-button" onClick={handleLogin} outlined>
<Localize translate_text="_t_Log in_t_" />
</Button.Primary>
<Button.Primary
visible="larger-than-tablet"
disabled={is_region_loading}
id="dm-nav-signup"
onClick={handleSignup}
>
Expand Down
Binary file added src/images/common/partner-deriv-platform-eu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/common/partner-deriv-platform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Loading

0 comments on commit 7165845

Please sign in to comment.