Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCT-1551 E2E tests occasionally show "Invalid time value" error #143

Merged
merged 30 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4c6f4a0
chore: change CY version to 13.3.2
aziolek Apr 11, 2024
fdcb4dd
chore: change CY version to 13.7.3
aziolek Apr 12, 2024
454c3c3
Merge branch 'develop' into chore/oct-1551-change-cypress-version
aziolek Apr 12, 2024
ec41ee5
test: debug, remove E2E
aziolek Apr 12, 2024
a6bc80c
test: call mutateAsyncMakeSnapshot
aziolek Apr 12, 2024
5cf5727
feat: CY to make videos
aziolek Apr 13, 2024
0392fb0
test: add debug tools
aziolek Apr 13, 2024
91c4ca7
test: add debug tools
aziolek Apr 13, 2024
48e78aa
test: debugging
aziolek Apr 13, 2024
e2b82ea
test: debugging
aziolek Apr 14, 2024
596fbde
test: debugging
aziolek Apr 14, 2024
41cccf6
test: debugging
aziolek Apr 14, 2024
0f06234
test: debugging
aziolek Apr 14, 2024
add0075
test: debugging
aziolek Apr 14, 2024
5e107de
test: debugging
aziolek Apr 14, 2024
92acd20
test: debugging
aziolek Apr 14, 2024
bd6de39
Merge branch 'master' into chore/oct-1551-change-cypress-version
aziolek Apr 15, 2024
473b450
test: remove debug playground test
aziolek Apr 15, 2024
6429362
Merge branch 'master' into chore/oct-1551-change-cypress-version
aziolek Apr 16, 2024
5cf79bf
Merge branch 'master' into chore/oct-1551-change-cypress-version
aziolek Apr 16, 2024
dc520a4
test: add debugs
aziolek Apr 16, 2024
ad34ea6
Merge branch 'master' into chore/oct-1551-change-cypress-version
aziolek Apr 23, 2024
def8637
chore: CY 13.18.1
aziolek Apr 24, 2024
d9a3c5a
Merge branch 'master' into chore/oct-1551-change-cypress-version
aziolek Apr 24, 2024
af1676c
Merge branch 'master' into chore/oct-1551-change-cypress-version
aziolek Apr 24, 2024
8cdbbb9
style: DEBUG flag removed
aziolek Apr 24, 2024
99288ea
Merge branch 'master' into chore/oct-1551-change-cypress-version
aziolek Apr 30, 2024
848e8b6
Merge branch 'master' into chore/oct-1551-change-cypress-version
aziolek Apr 30, 2024
5c42bbe
Merge branch 'master' into chore/oct-1551-change-cypress-version
aziolek May 1, 2024
948ff90
fix: project IPFS failure test to destroy request before route load
aziolek May 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions client/cypress/e2e/_2makePendingSnapshot.cy.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import axios from 'axios';

import { mockCoinPricesServer, visitWithLoader } from 'cypress/utils/e2e';
import { QUERY_KEYS } from 'src/api/queryKeys';
import { mutateAsyncMakeSnapshot } from 'cypress/utils/moveTime';
import { IS_ONBOARDING_ALWAYS_VISIBLE, IS_ONBOARDING_DONE } from 'src/constants/localStorageKeys';
import env from 'src/env';
import { ROOT_ROUTES } from 'src/routes/RootRoutes/routes';

// In E2E snapshotter is disabled. Before the first test can be run, pending snapshot needs to be done.
Expand All @@ -27,20 +24,12 @@ describe('Make pending snapshot', () => {

it('make pending snapshot', () => {
cy.window().then(async win => {
const isDecisionWindowOpen = win.clientReactQuery.getQueryData(
QUERY_KEYS.isDecisionWindowOpen,
);

if (!isDecisionWindowOpen) {
expect(true).to.be.true;
return;
}

cy.wrap(null).then(() => {
axios.post(`${env.serverEndpoint}snapshots/pending`).then(() => {
cy.get('[data-test=SyncView]', { timeout: 60000 }).should('not.exist');
return mutateAsyncMakeSnapshot(win, 'pending').then(str => {
expect(str).to.eq(true);
});
});
cy.get('[data-test=SyncView]', { timeout: 60000 }).should('not.exist');
});
});
});
7 changes: 4 additions & 3 deletions client/cypress/e2e/project.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,16 @@ Object.values(viewports).forEach(({ device, viewportWidth, viewportHeight }) =>
});

beforeEach(() => {
cy.intercept('GET', '**/ipfs/**', req => {
req.destroy();
});

mockCoinPricesServer();
localStorage.setItem(IS_ONBOARDING_DONE, 'true');
visitWithLoader(ROOT_ROUTES.projects.absolute);
});

it('entering project view shows Toast with info about IPFS failure when all providers fail', () => {
cy.intercept('GET', '**/ipfs/**', req => {
req.destroy();
});

cy.get('[data-test=Toast--ipfsMessage').should('be.visible');
});
Expand Down
2 changes: 1 addition & 1 deletion client/cypress/utils/moveTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const mutateAsyncMoveToDecisionWindowClosed = (cypressWindow: Cypress.AUTWindow)
});
});

const mutateAsyncMakeSnapshot = (
export const mutateAsyncMakeSnapshot = (
cypressWindow: Cypress.AUTWindow,
type: 'finalized' | 'pending',
): Promise<any> =>
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"vite-plugin-html-config": "^1.0.11"
},
"resolutions": {
"**/cypress": "12.17.3"
"**/cypress": "13.8.1"
},
"engines": {
"node": ">= 16.13.0 <17.0.0"
Expand Down
1 change: 1 addition & 0 deletions client/synpress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export default defineConfig({
},
supportFile: 'cypress/support/index.ts',
},
video: true,
viewportHeight: 1080,
viewportWidth: 1920,
});
49 changes: 22 additions & 27 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -958,10 +958,10 @@
js-yaml "4.1.0"
nyc "15.1.0"

"@cypress/request@^2.88.11":
version "2.88.12"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.12.tgz#ba4911431738494a85e93fb04498cb38bc55d590"
integrity sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA==
"@cypress/request@^3.0.0":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.1.tgz#72d7d5425236a2413bd3d8bb66d02d9dc3168960"
integrity sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==
dependencies:
aws-sign2 "~0.7.0"
aws4 "^1.8.0"
Expand All @@ -976,7 +976,7 @@
json-stringify-safe "~5.0.1"
mime-types "~2.1.19"
performance-now "^2.1.0"
qs "~6.10.3"
qs "6.10.4"
safe-buffer "^5.1.2"
tough-cookie "^4.1.3"
tunnel-agent "^0.6.0"
Expand Down Expand Up @@ -3179,11 +3179,6 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240"
integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==

"@types/node@^16.18.39":
version "16.18.78"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.78.tgz#3d97264128712f2eb59f1f8456bcfc5d56d8105c"
integrity sha512-2poPMDdsGfvhcLmgJZ85QrIfN6z3PijYRMiV0FWIEUiQW/t/lzH7BEm4vN+HMhjZXbtIKssMcAxTcgu4Rm83YA==

"@types/prettier@^2.6.1":
version "2.7.3"
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f"
Expand Down Expand Up @@ -4930,7 +4925,7 @@ [email protected], buffer@^6.0.3, buffer@~6.0.3:
base64-js "^1.3.1"
ieee754 "^1.2.1"

buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0:
buffer@^5.2.1, buffer@^5.5.0, buffer@^5.7.1:
version "5.7.1"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==
Expand Down Expand Up @@ -5574,20 +5569,19 @@ cypress-wait-until@^2.0.1:
resolved "https://registry.yarnpkg.com/cypress-wait-until/-/cypress-wait-until-2.0.1.tgz#69c575c7207d83e4ae023e2aaecf2b66148c9fc0"
integrity sha512-+IyVnYNiaX1+C+V/LazrJWAi/CqiwfNoRSrFviECQEyolW1gDRy765PZosL2alSSGK8V10Y7BGfOQyZUDgmnjQ==

cypress@*, [email protected]:
version "12.17.3"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.17.3.tgz#1e2b19037236fc60e4a4b3a14f0846be17a1fc0e"
integrity sha512-/R4+xdIDjUSLYkiQfwJd630S81KIgicmQOLXotFxVXkl+eTeVO+3bHXxdi5KBh/OgC33HWN33kHX+0tQR/ZWpg==
cypress@*, [email protected], [email protected]:
version "13.8.1"
resolved "https://registry.yarnpkg.com/cypress/-/cypress-13.8.1.tgz#f558e51b770a409e2360031bbd36c3f4fb3f2db4"
integrity sha512-Uk6ovhRbTg6FmXjeZW/TkbRM07KPtvM5gah1BIMp4Y2s+i/NMxgaLw0+PbYTOdw1+egE0FP3mWRiGcRkjjmhzA==
dependencies:
"@cypress/request" "^2.88.11"
"@cypress/request" "^3.0.0"
"@cypress/xvfb" "^1.2.4"
"@types/node" "^16.18.39"
"@types/sinonjs__fake-timers" "8.1.1"
"@types/sizzle" "^2.3.2"
arch "^2.2.0"
blob-util "^2.0.2"
bluebird "^3.7.2"
buffer "^5.6.0"
buffer "^5.7.1"
cachedir "^2.3.0"
chalk "^4.1.0"
check-more-types "^2.24.0"
Expand All @@ -5605,7 +5599,7 @@ cypress@*, [email protected]:
figures "^3.2.0"
fs-extra "^9.1.0"
getos "^3.2.1"
is-ci "^3.0.0"
is-ci "^3.0.1"
is-installed-globally "~0.4.0"
lazy-ass "^1.6.0"
listr2 "^3.8.3"
Expand All @@ -5614,6 +5608,7 @@ cypress@*, [email protected]:
minimist "^1.2.8"
ospath "^1.2.2"
pretty-bytes "^5.6.0"
process "^0.11.10"
proxy-from-env "1.0.0"
request-progress "^3.0.0"
semver "^7.5.3"
Expand Down Expand Up @@ -8448,7 +8443,7 @@ is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7:
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055"
integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==

is-ci@^3.0.0:
is-ci@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867"
integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==
Expand Down Expand Up @@ -11081,6 +11076,13 @@ [email protected], qrcode@^1.5.1:
pngjs "^5.0.0"
yargs "^15.3.1"

[email protected]:
version "6.10.4"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.4.tgz#6a3003755add91c0ec9eacdc5f878b034e73f9e7"
integrity sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==
dependencies:
side-channel "^1.0.4"

[email protected]:
version "6.11.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
Expand All @@ -11095,13 +11097,6 @@ qs@^6.10.3:
dependencies:
side-channel "^1.0.4"

qs@~6.10.3:
version "6.10.5"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.5.tgz#974715920a80ff6a262264acd2c7e6c2a53282b4"
integrity sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ==
dependencies:
side-channel "^1.0.4"

[email protected]:
version "7.1.3"
resolved "https://registry.yarnpkg.com/query-string/-/query-string-7.1.3.tgz#a1cf90e994abb113a325804a972d98276fe02328"
Expand Down
Loading