Skip to content

Commit

Permalink
align with feature branch (#11)
Browse files Browse the repository at this point in the history
* synchronize amount inputs, add transfer button (WALL-554) with test link (binary-com#8962)

* feat: ✨ account transfer component (demo)

* fix: transfer hint message

* fix: 🎨 apply comments

* refactor: 🎨 remove reducer, simplify transfer logic, improve readability (binary-com#34)

* fix: update padding of app-icon component (binary-com#33)

* style: improve styles for account list

* style: apply comments

* fix: apply comments, refactor account modal in desktop

* fix: 🎨 apply comments

* feat: ✨ synchronize amount inputs, add transfer button

* perf: refactor code

* refactor: remove listener, add onScroll to mobile_dialog, remove ref from mobile_dialog

* fix: apply comments

* fix: reset amount_to if selected transfer_from is a wallet

* feat: ✨ account transfer component (demo)

* fix: transfer hint message

* fix: 🎨 apply comments

* refactor: 🎨 remove reducer, simplify transfer logic, improve readability (binary-com#34)

* fix: update padding of app-icon component (binary-com#33)

* style: improve styles for account list

* style: apply comments

* fix: apply comments, refactor account modal in desktop

* fix: 🎨 apply comments

* feat: add scrolling behaviour to account list in mobile view

* fix: apply comments, fix test

* refactor: 🔥 remove mobile dialog, refactor scrolling, remove redundant logic

* fix: name visibility after closing the modal

* perf: improve transition behaviour

* test: fix tests

* refactor: 🔥 remove mobile dialog, refactor scrolling, remove redundant logic

* fix: add missing code

* refactor: apply comments

* fix: apply comments, refactor tests

* test: 🚀 add tests for transfer related components

* refactor: roll back Tab component

* style: fix style for merged icon

* fix: mock loginid

* fix: mock account loginid

* fix: typo, demo icon

* fix: typo, demo icon, transition on closing, blinking icons

---------

Co-authored-by: Hamid <hamid@regentmarkets.com>

* chore: disable PT (binary-com#9021)

* Fix: leave confirm tests failed (binary-com#9030)

* fix: leave-confirm tests failed

* refactor: modify usestate spyOn function

* refactor: add more coverage

* Adrienne / Release automation integration (binary-com#8914)

* feat: added release automation workflow

* chore: added config for first merge

* chore: renamed first merge delay config

* feat: added configuration to skip updating base branch

* feat: added option for maximum tasks

* chore: skip slack integration

* chore: enabled github integration

* chore: updated fe-toolbox version

* chore: removed platform input

* chore: updated refetch limit

* chore: added gitguardian to skip checks

* chore: fixed syntax issue

* chore: added new lines at bottom

* fix: fix wrong branch name (binary-com#9037)

* henry/91713/test: Test coverage for POO statuses components (binary-com#8125)

* test: Test coverage for POO statuses components

* fix: Empty-Commit

---------

Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@deriv.com>

* henry/91709/test: add test coverage for poi unsupported  (binary-com#8041)

* test: add test coverage

* test: switch from regex to string

* fix: change test coverage

---------

Co-authored-by: Henry Hein <henryhein@Henry-Heins-MacBook-Pro-T90XTJ00Q4.local>
Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@deriv.com>

* henry/dtra-131/feat: dropdown style and description change for all trade types (binary-com#8727)

* feat: dropdown style and description change for all trade types

* fix: minify svg

* refactor: resolve edge cases

* fix: remove comment

* fix: resolve comments

* fix: add animation, make image scrollable

* refactor: refactor for better maintainability

* fix: circleci issue

* fix: disable animation for now

* fix: indexing to contract type value and change view height for mobile

* fix: remove outerscroll

* fix: trying auto size

* fix: autosizer didnt work

* fix: make words bold

* fix: fix bold

* fix: remove navigation and pagnation

* fix: refactor

* fix: resolve comments

* empty commit

* empty commit

* fix: rearrange glossary based on order

* fix: animation bug

* fix: disable swipe on mobile and animation issue

* fix: remove commented out code

* fix: scroll not working for trade-types

* fix: test

* fix: remove unintended test file

* Kate / DTRA-202 / Apply new style to the trade type menu in mobile (binary-com#8931)

* fix: remove special style from trade type menu in mobile

* chore: change trade type text

* fix: remove Change password text for DMT5 (binary-com#8927)

* fix: remove Change password text for DMT5

* chore: empty commit

---------

Co-authored-by: Sandeep Rajput <90243468+sandeep-deriv@users.noreply.github.com>
Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@deriv.com>

* henry/91133/refactor: Refactored, migrated to TS  and added test cases (binary-com#7998)

* refactor: Refactored, migrated to TS  and added test cases

* fix: circleCI issue

* fix: circle CI issue

* fix: codecov rerun commit

* fix: all test cases covered

* fix: make props reusable

* Merge branch 'master' of github.com:binary-com/deriv-app into henry/91133/Refactor-ServicesErrorModal

---------

Co-authored-by: Henry Hein <henryhein@Henry-Heins-MacBook-Pro-T90XTJ00Q4.local>
Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@deriv.com>

* chore: increase workers for jest (binary-com#8954)

* chore: increase workers for jest

* ci: change codecov command

* ci: update codecov command

* ci: update codecov command

* ci: reduce number of workers for codecov

* ci: change workers to 4 for codecov

* ci: remove duplicate command

* ci: update default value

---------

Co-authored-by: Sandeep Rajput <90243468+sandeep-deriv@users.noreply.github.com>

* farabi/bot-324/remove-security-and-privacy-from-dbot-footer (binary-com#8825)

* fix: removed security and privacy from dbot footer

* fix: removed icons commit

---------

Co-authored-by: Sandeep Rajput <90243468+sandeep-deriv@users.noreply.github.com>

* Jim/FEQ-147/e2e-test-cases-for-traders-hub-dashboard (binary-com#8649)

* feat: initial e2e

* chore: remove package-lock

* chore: restore original code

* chore: use chromium as the only browser for testing

* docs: update  description for the command to show the test report in dev mode

* ci: add command to show the tests report in dev mode

* test: update test case to use count

* refactor: extract text to constant variables and add whitespace

---------

Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@deriv.com>
Co-authored-by: Sandeep Rajput <90243468+sandeep-deriv@users.noreply.github.com>

* refactor 🔧: Aum / WALL-297 / deposit fiat module (binary-com#8938)

* feat: created deposit-fiat-module

* chore: applied changes from comments

* refactor: moved dark-mode logic from deposit-fiat-iframe to useDepositFiatAddress hook

* feat: added test for useDepositFiatAddress hook

* feat: added test cases for light and dark theme for iframe url

* chore: removed unused import for Real.tsx in Deposit.tsx

* chore: removed test case for Real.tsx in deposit.spec.tsx

* chore: minor change

* chore: empty-commit

---------

Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@deriv.com>

* farabi/bot-124/update-stop-loss-and-take-profit-content (binary-com#8953)

* fix: update content of take profit and stop loss

* chore: redeploy

* chore: redeploy

* fix: adjust backward compatibility to support legacy bots (binary-com#8925)

* chore: Rename the Other CFDS on Onboarding and Trader Hubs Homepage (binary-com#8975)

* chore: Rename the Other CFDS on Onboarding and Trader Hubs Homepage

* chore: empty commit

* fix: update eu disclaimer percentage (binary-com#8361)

* Suisin/chore: add thai language into deriv app (binary-com#8766)

* chore: add thai language into deriv app

* chore: added Thai language check for Thai

---------

Co-authored-by: Jim Daniels Wasswa <104334373+jim-deriv@users.noreply.github.com>
Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>

* farabi/bot-315/dbot-to-deriv-bot (binary-com#8955)

* fix: rebrand dbot to deriv bot

* chore: added test case for tour trigger dialog

* feat: added wallets notifications to wallets (binary-com#8837)

* feat: added wallets notifications to wallets

* fix: remove commentted code

* fix: show notifications for platforms only

* fix: change label on CTA

* fix: added hooks package

* fix: update branch

* translations: 📚 sync translations with crowdin (binary-com#9058)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* henry/fix: dtrader translation issue (binary-com#9062)

* fix: dtrader translation issue

* fix: translation issues

* translations: 📚 sync translations with crowdin (binary-com#9063)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* translations: 📚 sync translations with crowdin (binary-com#9065)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* translations: 📚 sync translations with crowdin (binary-com#9066)

Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>

* test: add tests

---------

Co-authored-by: Hamid <hamid@regentmarkets.com>
Co-authored-by: yashim-deriv <yashim@deriv.com>
Co-authored-by: Farhan Ahmad Nurzi <125247833+farhan-nurzi-deriv@users.noreply.github.com>
Co-authored-by: Nijil Nirmal <nijil@deriv.com>
Co-authored-by: adrienne-deriv <103016120+adrienne-deriv@users.noreply.github.com>
Co-authored-by: henry-deriv <118344354+henry-deriv@users.noreply.github.com>
Co-authored-by: Ali(Ako) Hosseini <ali.hosseini@deriv.com>
Co-authored-by: Henry Hein <henryhein@Henry-Heins-MacBook-Pro-T90XTJ00Q4.local>
Co-authored-by: kate-deriv <121025168+kate-deriv@users.noreply.github.com>
Co-authored-by: shontzu <108507236+shontzu-deriv@users.noreply.github.com>
Co-authored-by: Sandeep Rajput <90243468+sandeep-deriv@users.noreply.github.com>
Co-authored-by: Jim Daniels Wasswa <104334373+jim-deriv@users.noreply.github.com>
Co-authored-by: Farabi <102643568+farabi-deriv@users.noreply.github.com>
Co-authored-by: Aum Bhatt <125039206+aum-deriv@users.noreply.github.com>
Co-authored-by: Shafin Al Karim <129021108+shafin-deriv@users.noreply.github.com>
Co-authored-by: Muhammad Hamza <120543468+hamza-deriv@users.noreply.github.com>
Co-authored-by: mahdiyeh-deriv <82078941+mahdiyeh-deriv@users.noreply.github.com>
Co-authored-by: Sui Sin <103026762+suisin-deriv@users.noreply.github.com>
Co-authored-by: vinu-deriv <100689171+vinu-deriv@users.noreply.github.com>
Co-authored-by: Aizad Ridzo <103104395+aizad-deriv@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: DerivFE <80095553+DerivFE@users.noreply.github.com>
  • Loading branch information
1 parent 08b9fec commit 9cc2fb2
Show file tree
Hide file tree
Showing 122 changed files with 5,835 additions and 4,520 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/automationrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"skip_pending_checks": false,
"skip_slack_integration": false,
"skip_updating_branch": true,
"merge_delay": 120000,
"first_merge_delay": 1200000,
"max_task_count": 15,
"pull_request": {
"checks_timeout": 60000,
"refetch_timeout": 10000,
"refetch_limit": 20,
"checks_limit": 40
},
"circleci": {
"project_slug": "gh/binary-com/deriv-app",
"branch": "master",
"workflow_name": "release_staging"
},
"checks_to_skip": ["/gitguardian/i"]
}
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
npm install
npm run bootstrap
npm run build:all
npm run test:jest
npm run test:jest 4
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.1
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/merge_and_release_to_staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Merge and release to staging
permissions:
pull-requests: write
on:
workflow_dispatch:
inputs:
tag:
description: "Tag"
required: true
skip_circleci_checks:
description: "Skip checking CircleCI workflow"
type: boolean
required: false
skip_pending_checks:
description: "Skip waiting for pull request checks"
type: boolean
required: false

concurrency:
group: release_automation_group

jobs:
release_issues:
permissions: write-all
runs-on: ubuntu-latest
timeout-minutes: 600
steps:
- name: Checkout to repo
uses: actions/checkout@v3
with:
ref: master
- name: Setup node
uses: actions/setup-node@v2
- name: Wait for logs to accumulate
run: |
sleep 10
- name: Release issues in Deriv.app
uses: binary-com/fe-toolbox@production_V20230615_0
with:
tag: ${{ inputs.tag }}
platform: 'Deriv.app'
list_id: ${{ secrets.LIST_ID }}
release_tags_list_id: ${{ secrets.RELEASE_TAGS_LIST_ID }}
regression_testing_template_id: ${{ secrets.REGRESSION_TESTING_TEMPLATE_ID }}
config_path: ./.github/workflows/automationrc.json
skip_circleci_checks: ${{ inputs.skip_circleci_checks }}
skip_pending_checks: ${{ inputs.skip_pending_checks }}
CIRCLECI_TOKEN: ${{ secrets.CIRCLECI_TOKEN }}
CLICKUP_API_TOKEN: ${{ secrets.CLICKUP_API_TOKEN }}
SLACK_APP_TOKEN: ${{ secrets.SLACK_APP_TOKEN }}
SLACK_USER_TOKEN: ${{ secrets.SLACK_USER_TOKEN }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
6 changes: 5 additions & 1 deletion end-to-end-test/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ ENDPOINT=<YOUR DESIRED ENDPOINT (QABOX ADDRESS)>
APP_URL=<APP URL(FOR LOCAL MACHINES SHOULD BE `https://localhost.binary.sx`>
QA_EMAIL_INBOX_USER_NAME=<QABOX EVENTS PAGE USERNAME (YOU CAN FIND IN `fe-shared` LASTPASS FOLDER) to sign in on `qaxx.deriv.dev/events`>
QA_EMAIL_INBOX_PASSWORD = <QABOX EVENTS PAGE PASSWORD (YOU CAN FIND IN `fe-shared` LASTPASS FOLDER) to sign in on `qaxx.deriv.dev/events`>
ACCOUNT_RESIDENCE=<COUNTRY NAME TO SET RESIDENCY OF ACCOUNT(SHOULD BE `Capitalize` CASE Like `Germany`)>
ACCOUNT_RESIDENCE_HIGH_RISK=<COUNTRY NAME TO SET RESIDENCY OF ACCOUNT(SHOULD BE `Capitalize` CASE Like `Germany`)>
ACCOUNT_CITIZENSHIP_HIGH_RISK=<COUNTRY NAME TO SET CITIZENSHIP OF ACCOUNT(SHOULD BE `Capitalize` CASE Like `Germany`)>
ACCOUNT_RESIDENCE_LOW_RISK=<COUNTRY NAME TO SET RESIDENCY OF ACCOUNT(SHOULD BE `Capitalize` CASE Like `Ecuador`)>
ACCOUNT_CITIZENSHIP_LOW_RISK=<COUNTRY NAME TO SET CITIZENSHIP OF ACCOUNT(SHOULD BE `Capitalize` CASE Like `Ecuador`)>
RISK_LEVEL=low_risk # This stores the risk level that can be either high_risk or low_risk
14 changes: 11 additions & 3 deletions end-to-end-test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ To run the End to End test you need to first install playwright on your machine

then

`npx plauwright test` to start the tests to run. (You also can pass `--debug` option to this command to it to run them in headless browser and check them visually separated by different browsers eg. Chromium, Firefox or Edge)
`npx playwright test` to start the tests to run. (You also can pass `--debug` option to this command to it to run them in headless browser and check them visually separated by different browsers eg. Chromium, Firefox or Edge)

`npm run test:e2e` to run the tests from within the root `directory`.

`npm run test:e2e-dev` to run the tests from within the root `directory` with trace enabled and show the test report.

## Project structure

Expand All @@ -30,8 +34,12 @@ It's mandatory to create this file to pass the needed environment variables to t
| 5 | `ENDPOINT` | Endpoint of qabox server | String | \* |
| 6 | `APP_URL` | App URL which tests should run on. Local machine URL is `localhost.binary.sx` | String | \* |
| 7 | `QA_EMAIL_INBOX_USER_NAME` | Username of qabox events page to retrive the signup email and enable the created account (You can find it in the LP under shared-fe folder with the `QA emails login creds` entry name) | String | \* |
| 8 | QA_EMAIL_INBOX_PASSWORD | Password of qabox events page to retrive the signup email and enable the created account (You can find it in the LP under shared-fe folder with the `QA emails login creds` entry name) | String | \* |
| 9 | ACCOUNT_RESIDENCE | Account residence to create account using it | String | \* |
| 8 | `QA_EMAIL_INBOX_PASSWORD` | Password of qabox events page to retrive the signup email and enable the created account (You can find it in the LP under shared-fe folder with the `QA emails login creds` entry name) | String | \* |
| 9 | `ACCOUNT_RESIDENCE_HIGH_RISK` | Account residence to use when creating high risk accounts it | String | \* |
| 10 | `ACCOUNT_RESIDENCE_LOW_RISK` | Account residence to use when creating low risk accounts | String | \* |
| 11 | `ACCOUNT_CITIZENSHIP_HIGH_RISK` | Account citizenship to use when creating high risk accounts | String | \* |
| 12 | `ACCOUNT_CITIZENSHIP_LOW_RISK` | Account citizenship to use when creating low risk accounts | String | \* |
| 13 | `RISK_LEVEL` | Risk level for the particular account i.e. high risk or low risk | String | \* |

### `onboarding.ts` file

Expand Down
82 changes: 0 additions & 82 deletions end-to-end-test/package-lock.json

This file was deleted.

10 changes: 8 additions & 2 deletions end-to-end-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@
"keywords": [],
"author": "",
"license": "ISC",
"eslintConfig": {
"rules": {
"testing-library/no-await-sync-query": "off",
"testing-library/prefer-screen-queries": "off"
}
},
"dependencies": {
"@playwright/test": "^1.29.2",
"dotenv": "^16.0.3"
"dotenv": "^16.0.3",
"@playwright/test": "^1.33.0"
}
}
80 changes: 40 additions & 40 deletions end-to-end-test/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,49 +58,49 @@ const config: PlaywrightTestConfig = {
},
},

{
name: 'firefox',
use: {
ignoreHTTPSErrors: true,
...devices['Desktop Firefox'],
},
},
// {
// name: 'firefox',
// use: {
// ignoreHTTPSErrors: true,
// ...devices['Desktop Firefox'],
// },
// },

{
name: 'webkit',
use: {
ignoreHTTPSErrors: true,
...devices['Desktop Safari'],
},
},
// {
// name: 'webkit',
// use: {
// ignoreHTTPSErrors: true,
// ...devices['Desktop Safari'],
// },
// },

/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: {
// ...devices['Pixel 5'],
// },
// },
// {
// name: 'Mobile Safari',
// use: {
// ...devices['iPhone 12'],
// },
// },
// /* Test against mobile viewports. */
// // {
// // name: 'Mobile Chrome',
// // use: {
// // ...devices['Pixel 5'],
// // },
// // },
// // {
// // name: 'Mobile Safari',
// // use: {
// // ...devices['iPhone 12'],
// // },
// // },

/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: {
// channel: 'msedge',
// },
// },
// {
// name: 'Google Chrome',
// use: {
// channel: 'chrome',
// },
// },
// /* Test against branded browsers. */
// // {
// // name: 'Microsoft Edge',
// // use: {
// // channel: 'msedge',
// // },
// // },
// // {
// // name: 'Google Chrome',
// // use: {
// // channel: 'chrome',
// // },
// // },
],

/* Folder for test artifacts such as screenshots, videos, traces, etc. */
Expand Down
15 changes: 7 additions & 8 deletions end-to-end-test/tests/change-endpoint/change-endpoint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,33 @@ export default class ChangeEndpoint {
await expect(this.page).toHaveTitle('Trader | Deriv');
await this.cookieDialogHandler();
await this.page.goto(`${process.env.APP_URL!}/endpoint`);

await this.page.waitForSelector(
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__field'
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__container > .dc-input__field'
);
await this.page.click(
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__field'
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__container > .dc-input__field'
);

await this.page.waitForSelector(
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__field'
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__container > .dc-input__field'
);
await this.page.click(
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__field'
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__container > .dc-input__field'
);

await this.page.waitForSelector(
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__field'
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__container > .dc-input__field'
);
const first_input_selector =
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__field';
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(2) > .dc-input__container > .dc-input__field';
await this.page.click(first_input_selector, { clickCount: 3 });
await this.page.keyboard.press('Backspace');

await this.page.click(first_input_selector);

await this.page.type(first_input_selector, process.env.ENDPOINT!);
const second_input_selector =
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(3) > .dc-input__field';
'#app_contents > .dc-themed-scrollbars > form > .dc-input:nth-child(3) > .dc-input__container > .dc-input__field';
await this.page.click(second_input_selector, { clickCount: 3 });
await this.page.keyboard.press('Backspace');
await this.page.type(second_input_selector, process.env.APPID!);
Expand Down
Loading

0 comments on commit 9cc2fb2

Please sign in to comment.