Skip to content

Commit

Permalink
Maintenance: Stabilize field datetime visual regression tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvuckovic committed May 1, 2024
1 parent 8ad0fd4 commit fcd4e39
Show file tree
Hide file tree
Showing 18 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .cypress/cypress.config.mjs
Expand Up @@ -3,7 +3,7 @@ import { rm } from 'node:fs/promises'
import { resolve, dirname } from 'node:path'
import { fileURLToPath } from 'node:url'
import { initPlugin as initVisualRegressionPlugin } from '@frsource/cypress-plugin-visual-regression-diff/plugins'
import pkg from '../package.json' assert { type: 'json' }
import pkg from '../package.json' with { type: 'json' }

const dir = dirname(fileURLToPath(import.meta.url))

Expand Down
Expand Up @@ -82,6 +82,7 @@ const dark = computed(() => theme.value === 'dark')
:locale="i18n.locale()"
:max-date="context.maxDate"
:min-date="minDate"
:start-date="minDate || context.maxDate"
:ignore-time-validation="!timePicker"
:prevent-min-max-navigation="
Boolean(minDate || context.maxDate || context.futureOnly)
Expand Down
Expand Up @@ -100,6 +100,7 @@ useEventListener('click', (e) => {
:locale="i18n.locale()"
:max-date="context.maxDate"
:min-date="minDate"
:start-date="minDate || context.maxDate"
:ignore-time-validation="!timePicker"
:prevent-min-max-navigation="
Boolean(minDate || context.maxDate || context.futureOnly)
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -17,7 +17,7 @@ describe('testing visuals for "FieldDate"', () => {
mountFormField(type, {
id: 'datetime',
label: 'Date',
maxDate: '2021-02-01',
maxDate: '2021-01-31',
})
checkFormMatchesSnapshot({ type })
cy.findByLabelText('Date')
Expand All @@ -36,7 +36,7 @@ describe('testing visuals for "FieldDate"', () => {
mountFormField(type, {
id: 'datetime',
label: 'Date',
maxDate: '2021-02-01',
maxDate: '2021-01-31',
help: 'Help message!',
})
cy.findByLabelText('Date').then(() => {
Expand All @@ -49,7 +49,7 @@ describe('testing visuals for "FieldDate"', () => {
id: 'datetime',
label: 'Date',
required: true,
maxDate: '2021-02-01',
maxDate: '2021-01-31',
})
checkFormMatchesSnapshot({ type })
cy.findByLabelText('Date')
Expand All @@ -69,7 +69,7 @@ describe('testing visuals for "FieldDate"', () => {
id: 'datetime',
label: 'Date',
required: true,
maxDate: '2021-02-01',
maxDate: '2021-01-31',
validationVisibility: FormValidationVisibility.Live,
})
checkFormMatchesSnapshot({ type })
Expand All @@ -80,7 +80,7 @@ describe('testing visuals for "FieldDate"', () => {
id: 'datetime',
label: 'Date',
link: '/',
maxDate: '2021-02-01',
maxDate: '2021-01-31',
})
checkFormMatchesSnapshot({ type })
cy.findByLabelText('Date')
Expand All @@ -100,7 +100,7 @@ describe('testing visuals for "FieldDate"', () => {
id: 'datetime',
label: 'Date',
disabled: true,
maxDate: '2021-02-01',
maxDate: '2021-01-31',
})
checkFormMatchesSnapshot({ type })
})
Expand Down

0 comments on commit fcd4e39

Please sign in to comment.