Skip to content

Commit 7e896d3

Browse files
authored
Merge pull request #41 from ProteGO-Safe/release/4.7.1
Release/4.7.1
2 parents 0731bca + bece58b commit 7e896d3

204 files changed

Lines changed: 4881 additions & 7103 deletions

File tree

Some content is hidden

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

.eslintrc

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
}
2525
},
2626
"plugins": [
27-
"react", "react-hooks", "jsx-a11y", "prettier"
27+
"react", "react-hooks", "jsx-a11y", "prettier", "cypress"
2828
],
2929
"rules": {
3030
"jsx-a11y/interactive-supports-focus": 0,
@@ -39,7 +39,12 @@
3939
"react-hooks/rules-of-hooks": "error",
4040
"no-console": "off",
4141
"react/prop-types": 0,
42-
"prettier/prettier": ["error"]
42+
"prettier/prettier": ["error"],
43+
"cypress/no-assigning-return-values": "error",
44+
"cypress/no-unnecessary-waiting": "error",
45+
"cypress/assertion-before-screenshot": "warn",
46+
"cypress/no-force": "warn",
47+
"cypress/no-async-tests": "error"
4348
},
4449
"globals": {
4550
"window": true,
@@ -48,7 +53,8 @@
4853
"FormData": true,
4954
"FileReader": true,
5055
"Blob": true,
51-
"navigator": true
56+
"navigator": true,
57+
"cypress/globals": true
5258
},
5359
"overrides": [{
5460
"files": ["**/*.tsx", "**/*.ts"],
@@ -63,7 +69,8 @@
6369
"plugin:@typescript-eslint/eslint-recommended",
6470
"plugin:@typescript-eslint/recommended",
6571
"prettier/@typescript-eslint",
66-
"plugin:prettier/recommended"
72+
"plugin:prettier/recommended",
73+
"plugin:cypress/recommended"
6774
]
6875
}]
6976
}

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
if: env.ENVIRONMENT == 'STAGE' || env.ENVIRONMENT == 'PROD' || env.ENVIRONMENT == 'DEV'
8181

8282
- name: Exec correct curl
83-
run: 'base64 -d <<< $CURL_COMMAND | sh'
83+
run: 'base64 -d <<< $CURL_COMMAND | sh || true'
8484
shell: bash
8585
if: env.ENVIRONMENT == 'STAGE' || env.ENVIRONMENT == 'PROD' || env.ENVIRONMENT == 'DEV'
8686

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## 4.7.1
8+
9+
### Added
10+
- Possibility to enter the result of the laboratory test after being signed up for it in the application.
11+
- Redirection to chatbot which enables making comments and reporting bugs in the Polish language version.
12+
713
## 4.7.0
814

915
### Added

cypress.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"baseUrl": "http://127.0.0.1:3001",
3+
"requestTimeout": 10000,
4+
"viewportHeight": 667,
5+
"viewportWidth": 375
6+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const languageSelectWrapper = '[data-cy=language-select-wrapper]';
2+
3+
const selectLanguage = selector => {
4+
cy.get(languageSelectWrapper).click();
5+
cy.get(selector).click();
6+
};
7+
8+
const checkLanguage = languageCode => {
9+
cy.get(languageSelectWrapper)
10+
.should('have.attr', 'data-lang')
11+
.and('include', languageCode);
12+
};
13+
14+
export const resolveChangeLanguage = (selector, languageCode) => () => {
15+
selectLanguage(selector);
16+
checkLanguage(languageCode);
17+
};
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import { visitBaseUrl } from '../../utils/visitBaseUrl';
2+
import { resolveChangeLanguage } from './changeLanguage.helpers';
3+
import { clearLocalStorage } from '../../utils/clearLocalStorage';
4+
5+
/**
6+
* Change language
7+
*/
8+
describe('Choose language on first screen', () => {
9+
clearLocalStorage();
10+
visitBaseUrl();
11+
12+
const changeToPolish = resolveChangeLanguage('#select_flag_PL', 'PL');
13+
const changeToEnglish = resolveChangeLanguage('#select_flag_GB', 'GB');
14+
const changeToUkrainian = resolveChangeLanguage('#select_flag_UA', 'UA');
15+
16+
it('should change language to polish', () => {
17+
changeToPolish();
18+
});
19+
20+
it('should change language to english', () => {
21+
changeToEnglish();
22+
});
23+
24+
it('should change language to ukrainian', () => {
25+
changeToUkrainian();
26+
});
27+
28+
it('should change language to english', () => {
29+
changeToEnglish();
30+
});
31+
32+
it('should change language to polish', () => {
33+
changeToPolish();
34+
});
35+
36+
it('should change language to ukrainian', () => {
37+
changeToEnglish();
38+
});
39+
40+
it('should change language to polish', () => {
41+
changeToPolish();
42+
});
43+
});
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { getByDataCy } from '../../utils/getByDataCy';
2+
3+
export const nextButtonShouldBeDisabled = () =>
4+
getByDataCy('button-default')
5+
.should('be.visible')
6+
.should('be.disabled');
7+
8+
export const nextButtonShouldBeEnabled = () =>
9+
getByDataCy('button-default')
10+
.should('be.visible')
11+
.should('be.enabled');
12+
13+
export const changeExplainerStepByDot = (prev, next) => {
14+
getByDataCy(`explainer-step-${prev}`)
15+
.should('be.visible')
16+
.within(() => {
17+
cy.get(`.slick-dots > li:nth-child(${next}) button`).click();
18+
cy.wait(500);
19+
});
20+
cy.wait(500);
21+
}

0 commit comments

Comments
 (0)