From 2ee4019eb24819c0800aff6da4865ab0230e7d13 Mon Sep 17 00:00:00 2001 From: Krzysztof Jelski Date: Wed, 6 Oct 2021 19:48:15 +0200 Subject: [PATCH] Increase UI test timeouts and mark interBTC unreachable (#6247) * Mark Westend interBTC as unreachable * Increase timeout when searching for component in UI tests * Remove the Westend interBTC chain * Restore the Westend interBTC chain --- jest/jest-setup.ts | 4 ++++ .../src/CreateAccount.slow.spec.tsx | 16 ++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/jest/jest-setup.ts b/jest/jest-setup.ts index b6b7465d74..a794a9197a 100644 --- a/jest/jest-setup.ts +++ b/jest/jest-setup.ts @@ -3,9 +3,13 @@ import '@testing-library/jest-dom'; +import { configure } from '@testing-library/dom'; + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore // eslint-disable-next-line no-global-assign CSS = { supports (): boolean { return false; } }; + +configure({ asyncUtilTimeout: 10000 }); diff --git a/packages/page-accounts/src/CreateAccount.slow.spec.tsx b/packages/page-accounts/src/CreateAccount.slow.spec.tsx index 8874473bf6..f059f406ac 100644 --- a/packages/page-accounts/src/CreateAccount.slow.spec.tsx +++ b/packages/page-accounts/src/CreateAccount.slow.spec.tsx @@ -47,7 +47,7 @@ describe('--SLOW--: Account Create', () => { it('created account is added to list', async () => { const { findByTestId, findByText, queryByText } = renderAccounts(); - const addAccountButton = await findByText('Add account', {}, { timeout: 5000 }); + const addAccountButton = await findByText('Add account', {}); fireEvent.click(addAccountButton); @@ -56,7 +56,7 @@ describe('--SLOW--: Account Create', () => { fireEvent.click(hiddenCheckbox); - const nextStepButton = await findByText('Next', {}, { timeout: 4000 }); + const nextStepButton = await findByText('Next', {}); fireEvent.click(nextStepButton); @@ -72,11 +72,11 @@ describe('--SLOW--: Account Create', () => { fireEvent.change(passwordInput2, { target: { value: 'password' } }); - const toStep3Button = await findByText('Next', {}, { timeout: 4000 }); + const toStep3Button = await findByText('Next', {}); fireEvent.click(toStep3Button); - const createAnAccountButton = await findByText('Save', {}, { timeout: 4000 }); + const createAnAccountButton = await findByText('Save', {}); fireEvent.click(createAnAccountButton); @@ -88,19 +88,19 @@ describe('--SLOW--: Account Create', () => { it('gives an error message when entering invalid derivation path', async () => { const { findByTestId, findByText } = renderAccounts(); - const addAccountButton = await findByText('Add account', {}, { timeout: 5000 }); + const addAccountButton = await findByText('Add account', {}); fireEvent.click(addAccountButton); - const showAdvancedOptionsButton = await findByText('Advanced creation options', {}, { timeout: 5000 }); + const showAdvancedOptionsButton = await findByText('Advanced creation options', {}); fireEvent.click(showAdvancedOptionsButton); - const derivationPathInput = await findByTestId('secret derivation path', {}, { timeout: 5000 }); + const derivationPathInput = await findByTestId('secret derivation path', {}); fireEvent.change(derivationPathInput, { target: { value: '//abc//' } }); - const errorMsg = await findByText('Unable to match provided value to a secret URI', {}, { timeout: 5000 }); + const errorMsg = await findByText('Unable to match provided value to a secret URI', {}); expect(errorMsg).toBeTruthy(); });