Skip to content

Commit

Permalink
Merge pull request #1755 from hollaex/beta
Browse files Browse the repository at this point in the history
Beta
  • Loading branch information
abeikverdi authored Oct 31, 2022
2 parents 9d73881 + 469f846 commit 96fc9f3
Show file tree
Hide file tree
Showing 52 changed files with 447 additions and 161 deletions.
2 changes: 1 addition & 1 deletion server/api/swagger/swagger.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
swagger: "2.0"
info:
version: "2.4.4"
version: "2.4.5"
title: HollaEx Kit
host: api.hollaex.com
basePath: /v2
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.4.4",
"version": "2.4.5",
"private": false,
"description": "HollaEx Kit",
"keywords": [
Expand Down
47 changes: 47 additions & 0 deletions test/Cypress/cucumber-html-report.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
//*** Let name it cucumber-html-report.js **
//the newst version
var os = require('os');
const { detect } = require('detect-browser');
const browser = detect();
const report = require("multiple-cucumber-html-reporter");
const cypress = require('cypress');

report.generate(
{jsonDir: "cypress/cucumber-json", // ** Path of .json file **//
reportPath: "./reports/cucumber-htmlreport.html",
pageTitle: "Hollaex Kit Tests Report",
reportName : "Test result",
pageFooter : "Hollaex QA team",
displayDuration: true,
displayReportTime : true,
metadata: {

browser: {

scenarioTimestamp : true,
name: "chrome",
version: browser.name+browser.version+browser.os
},
device: "Local test machine",
platform: {name: os.platform()+os.version,

version: "11",env:'HollaexKit'}
,},
customData: {
title: 'Run info',
data: [
{label: 'Project', value: 'Hollaex Kit'},
{label: 'Release', value: '2.4'},
{label: 'Cycle', value: '1'},
{label: 'Execution Time', value: Date()},

]
}


,}


);


32 changes: 22 additions & 10 deletions test/Cypress/cypress/integration/Gherkin/login/login.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { commandTimings } from 'cypress-timings'
commandTimings()
import {Given, When, Then} from "cypress-cucumber-preprocessor/steps"

Given ('I am in the Hollaex login page',()=>{
Expand All @@ -6,16 +8,23 @@ Given ('I am in the Hollaex login page',()=>{
})

When ('I enter credentials Username,Password',()=>{

const t0 = performance.now();

cy.get('.holla-button').should('be.visible').should('be.disabled')
cy.get('[name="email"]').clear().type(Cypress.env("USER0"))
cy.get('[name="password"]').clear().type(Cypress.env('PASSWORD'))
const t1 = performance.now();
cy.log('time')
cy.log(t1-t0)
})

Then ('I should be able to login successfully',()=>{

const t0 = performance.now();
cy.get('.holla-button').should('be.visible').should('be.enabled').click()
cy.get('.warning_text').should('not.exist')
const t1 = performance.now();
cy.log('time')
cy.log(t1-t0)
})

When ('I enter credentials Wrong Username,Password',()=>{
Expand Down Expand Up @@ -76,14 +85,17 @@ And ('I enter Expired,long,short and then true 2FA code',()=>{
cy.wrap(token).as('token')
cy.log(token);
cy.log('second', text)
cy.get('.otp_form-wrapper > form.w-100 > .w-100 > :nth-child(1) > .field-wrapper > :nth-child(1) > :nth-child(1) > .field-content > .field-children > div > .input_field-input')
.clear().type('543065')
cy.get('.otp_form-wrapper > form.w-100 > .holla-button').should('not.be.disabled').click()
// cy.get('.otp_form-wrapper > form.w-100 > .w-100 > :nth-child(1) > .field-wrapper > :nth-child(1) > :nth-child(1) > .field-content > .field-children > div > .input_field-input')
cy.get('.masterInput')
.clear().type('108249')
// cy.get('.otp_form-wrapper > form.w-100 > .holla-button').should('not.be.disabled').click()
cy.get('.warning_text').should('contain','Invalid OTP Code')
cy.get('.otp_form-wrapper > form.w-100 > .w-100 > :nth-child(1) > .field-wrapper > :nth-child(1) > :nth-child(1) > .field-content > .field-children > div > .input_field-input')
.clear().type('5430656')
cy.get('.otp_form-wrapper > form.w-100 > .holla-button').should('be.disabled')
cy.get('.otp_form-wrapper > form.w-100 > .w-100 > :nth-child(1) > .field-wrapper > :nth-child(1) > :nth-child(1) > .field-content > .field-children > div > .input_field-input')
//cy.get('.otp_form-wrapper > form.w-100 > .w-100 > :nth-child(1) > .field-wrapper > :nth-child(1) > :nth-child(1) > .field-content > .field-children > div > .input_field-input')
cy.get('.masterInput')
.clear().type('108294')
// cy.get('.otp_form-wrapper > form.w-100 > .holla-button').should('not.be.disabled')
//cy.get('.otp_form-wrapper > form.w-100 > .w-100 > :nth-child(1) > .field-wrapper > :nth-child(1) > :nth-child(1) > .field-content > .field-children > div > .input_field-input')
//the new changes
.clear().type(token)
cy.get('.otp_form-wrapper > form.w-100 > .holla-button').click()
// cy.get('.otp_form-wrapper > form.w-100 > .holla-button').click()
})
24 changes: 19 additions & 5 deletions test/Cypress/package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
{
"devDependencies": {
"@4tw/cypress-drag-drop": "^2.1.0",
"@cucumber/cucumber": "^8.5.3",
"@cucumber/pretty-formatter": "^1.0.0",
"@cypress-audit/lighthouse": "^1.3.1",
"cypress": "^9.2.0",
"cypress-audit": "^1.1.0",
"cypress-iframe": "^1.0.1",
"cypress-timings": "^1.0.0",
"cypress-xpath": "^1.6.2",
"eslint": "^8.11.0",
"multiple-cucumber-html-reporter": "^2.0.0",
"prettier": "2.6.0"
},
"dependencies": {
"@badeball/cypress-cucumber-preprocessor": "^13.0.0",
"cucumber-perf": "^2.0.1",
"cypress-cucumber-preprocessor": "^4.3.1",
"cypress-tags": "^1.0.0",
"cypress-lighthouse": "^0.1.0",
"detect-browser": "^5.3.0",
"save-dev": "^0.0.1-security",
"totp-generator": "^0.0.13"
},
"cypress-cucumber-preprocessor": {
"cucumberJson": {
"generate": true,
"outputFolder": "cypress/cucumber-json",
"filePrefix": "",
"fileSuffix": ".cucumber"
},
"nonGlobalStepDefinitions": true
},
"scripts": {
"debug.javascript.codelens.npmScripts": "never",
"test-ci": "npx cypress-tags run --browser chrome --record -e",
"test": "npx cypress-tags run --browser chrome -e",
"pre-ci": "npm run test-ci TAGS=@pre",
"test": "npx cypress-tags run -e",
"pre": "npm test TAGS=@pre"
}
}
}
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.4
2.4.5
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hollaex-kit",
"version": "2.4.4",
"version": "2.4.5",
"private": true,
"dependencies": {
"@ant-design/compatible": "1.0.5",
Expand Down
Binary file added web/public/assets/flags/mn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 4 additions & 23 deletions web/public/assets/images/check-sending-bitcoin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions web/public/assets/images/maxIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion web/src/components/CurrencyBall/withPrice.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const CurrencyBallWithPrice = ({
isExistBroker = false,
}) => {
const { display_name, ...rest } = coins[symbol] || DEFAULT_COIN_DATA;
const minValue = min ? min : rest.min;
const minValue = rest.min ? rest.min : min;

return (
<div className="with_price-block_amount d-flex direction_ltr">
Expand Down
53 changes: 30 additions & 23 deletions web/src/components/Form/FormFields/PinInput.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useEffect, useRef, useState } from 'react';
import classnames from 'classnames';
import { LoadingOutlined } from '@ant-design/icons';

const PinInput = ({
input: { value = '', onChange },
Expand Down Expand Up @@ -58,29 +59,35 @@ const PinInput = ({
return (
<React.Fragment>
<div className={classnames('mainContainer')}>
<input
autoFocus
inputMode={'numeric'}
ref={masterRef}
className={classnames('masterInput')}
disabled={isSubmitting}
type="text"
value={value}
onClick={handleOnMasterFocus}
onChange={handleMasterValueChange}
onBlur={handleOnMasterBlur}
/>
<div className="group">
<input value={value[0] || ''} className={getClassname(0)} />
<input value={value[1] || ''} className={getClassname(1)} />
<input value={value[2] || ''} className={getClassname(2)} />
</div>
<div className="seperator"></div>
<div className="group">
<input value={value[3] || ''} className={getClassname(3)} />
<input value={value[4] || ''} className={getClassname(4)} />
<input value={value[5] || ''} className={getClassname(5)} />
</div>
{!isSubmitting ? (
<React.Fragment>
<input
autoFocus
inputMode={'numeric'}
ref={masterRef}
className={classnames('masterInput')}
disabled={isSubmitting}
type="text"
value={value}
onClick={handleOnMasterFocus}
onChange={handleMasterValueChange}
onBlur={handleOnMasterBlur}
/>
<div className="group">
<input value={value[0] || ''} className={getClassname(0)} />
<input value={value[1] || ''} className={getClassname(1)} />
<input value={value[2] || ''} className={getClassname(2)} />
</div>
<div className="seperator"></div>
<div className="group">
<input value={value[3] || ''} className={getClassname(3)} />
<input value={value[4] || ''} className={getClassname(4)} />
<input value={value[5] || ''} className={getClassname(5)} />
</div>
</React.Fragment>
) : (
<LoadingOutlined />
)}
</div>
{isError && (
<div className="warning_text text-align-center">{isError}</div>
Expand Down
1 change: 1 addition & 0 deletions web/src/components/Form/FormFields/_FormFields.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ $placeholder--font-weight: bold;
}
&:disabled {
cursor: not-allowed;
opacity: 0.5;
}
}

Expand Down
3 changes: 2 additions & 1 deletion web/src/components/OtpForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class Form extends Component {
setFormRef = (el) => {
if (el) {
this.otpFormRef = el;
el.getElementsByTagName('input')[0].focus();
if (el.getElementsByTagName('input')[0])
el.getElementsByTagName('input')[0].focus();
}
};

Expand Down
1 change: 1 addition & 0 deletions web/src/config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export const FLEX_CENTER_CLASSES = [
];

export const TIMESTAMP_FORMAT = STRINGS['TIMESTAMP_FORMAT'];
export const DEFAULT_TIMESTAMP_FORMAT = STRINGS['DEFAULT_TIMESTAMP_FORMAT'];
export const HOUR_FORMAT = STRINGS['HOUR_FORMAT'];
export const TIMESTAMP_FORMAT_FA = STRINGS['TIMESTAMP_FORMAT']
.split('/')
Expand Down
1 change: 1 addition & 0 deletions web/src/config/icons/static.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const icons = {
SET_ADMIN_NETWORK_KEYS: '/assets/images/set-admin-network-keys.svg',
SET_ADMIN_EMAIL: '/assets/images/set-admin-email.svg',
SET_ADMIN_PASSWORD: '/assets/images/set-admin-password.svg',
MAX_ICON: '/assets/images/maxIcon.svg',
SET_ADMIN_RETYPE_PASSWORD: '/assets/images/set-admin-retype-password.svg',
TIMEZONE_WORLD_MAP: '/assets/images/timezone-worldmap.svg',
SETUP_SECTION_PRO_TRADING: '/assets/images/setup-section-pro-trading-01.svg',
Expand Down
1 change: 1 addition & 0 deletions web/src/config/lang/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"CANCEL_WITHDRAWAL": "إلغاء السحب",
"CANCEL_WITHDRAWAL_POPUP_CONFIRM": "هل تريد إلغاء السحب الذي في قيد الانتظار لـ",
"TIMESTAMP_FORMAT": "YYYY/MM/DD HH:mm:ss",
"DEFAULT_TIMESTAMP_FORMAT": "DD, MMMM, YYYY",
"HOUR_FORMAT": "HH:mm:ss",
"LOGIN_TEXT": "تسجیل الدخول",
"SIGN_IN": "تسجیل الدخول",
Expand Down
1 change: 1 addition & 0 deletions web/src/config/lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"CANCEL_WITHDRAWAL": "Auszahlung abbrechen",
"CANCEL_WITHDRAWAL_POPUP_CONFIRM": "Möchten Sie Ihre ausstehende Auszahlung stornieren?:",
"TIMESTAMP_FORMAT": "YYYY/MM/DD HH:mm:ss",
"DEFAULT_TIMESTAMP_FORMAT": "DD, MMMM, YYYY",
"NO_ACTIVE_ORDERS": "No orders detected. Place your orders on the Pro or Quick trade page",
"HOUR_FORMAT": "HH:mm:ss",
"LOGIN_TEXT": "Login",
Expand Down
Loading

0 comments on commit 96fc9f3

Please sign in to comment.