test: reintroduce tests that were failing (#1505)

This commit is contained in:
Dexter Edwards 2022-10-11 14:36:16 +01:00 committed by GitHub
parent a7d100bce8
commit 6ec6c6b8b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 11 deletions

View File

@ -13,3 +13,4 @@ NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz
#Test configuration variables
CYPRESS_FAIRGROUND=false
LC_ALL="en_US.UTF-8"

View File

@ -127,8 +127,7 @@ describe('Proposal form vote, validation and enactment deadline', () => {
expect(screen.getByTestId('validation-2-mins-extra')).toBeTruthy();
});
// eslint-disable-next-line jest/no-disabled-tests
it.skip('should show the correct datetimes', () => {
it('should show the correct datetimes', () => {
renderComponent();
// Should be adding 2 mins to the vote deadline as the minimum is set by
// default, and we add 2 mins for wallet confirmation
@ -143,8 +142,7 @@ describe('Proposal form vote, validation and enactment deadline', () => {
);
});
// eslint-disable-next-line jest/no-disabled-tests
it.skip('should be updating every second, so show the correct datetimes when 30 seconds have passed', () => {
it('should be updating every second, so show the correct datetimes when 30 seconds have passed', () => {
renderComponent();
act(() => {
jest.advanceTimersByTime(30000);
@ -161,8 +159,7 @@ describe('Proposal form vote, validation and enactment deadline', () => {
);
});
// eslint-disable-next-line jest/no-disabled-tests
it.skip('update the vote deadline date and the enactment deadline date when the vote deadline is changed', () => {
it('update the vote deadline date and the enactment deadline date when the vote deadline is changed', () => {
renderComponent();
const voteDeadlineInput = screen.getByTestId('proposal-vote-deadline');
fireEvent.change(voteDeadlineInput, { target: { value: 2 } });
@ -174,8 +171,7 @@ describe('Proposal form vote, validation and enactment deadline', () => {
);
});
// eslint-disable-next-line jest/no-disabled-tests
it.skip('updates the validation deadline max and date when the vote deadline max is changed', () => {
it('updates the validation deadline max and date when the vote deadline max is changed', () => {
renderComponent();
const voteDeadlineMinButton = screen.getByTestId('min-vote');
const voteDeadlineMaxButton = screen.getByTestId('max-vote');

View File

@ -91,7 +91,7 @@ const ValidationForm = ({
{t('ThisWillSetValidationDeadlineTo')}
</span>
<span data-testid="validation-date" className="pl-2">
{deadlineDates.validation?.toLocaleString()}
{deadlineDates.validation.toLocaleString()}
</span>
{deadlines.validation === 0 && (
<span
@ -179,7 +179,7 @@ const EnactmentForm = ({
{t('ThisWillSetEnactmentDeadlineTo')}
</span>
<span data-testid="enactment-date" className="pl-2">
{deadlineDates.enactment?.toLocaleString()}
{deadlineDates.enactment.toLocaleString()}
</span>
</p>
)}
@ -406,7 +406,7 @@ export const ProposalFormVoteAndEnactmentDeadline = ({
{t('ThisWillSetVotingDeadlineTo')}
</span>
<span data-testid="voting-date" className="pl-2">
{deadlineDates.vote?.toLocaleString()}
{deadlineDates.vote.toLocaleString()}
</span>
{deadlines.vote === minVoteHours && (
<span