(textfield, type, value, expectedError)
| 220 | describe('Test IP validaton', function () { |
| 221 | |
| 222 | async function testValidation(textfield, type, value, expectedError) { |
| 223 | setDeepProp(textfield, 'config.type', type); |
| 224 | textfield.setProps({value: value}); |
| 225 | await vueTicks(); |
| 226 | |
| 227 | if (isEmptyString(expectedError)) { |
| 228 | expect(textfield.currentError).toBe(expectedError) |
| 229 | } else { |
| 230 | expect(textfield.currentError).toInclude(expectedError) |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | it('Test IPv4 127.0.0.1', async function () { |
| 235 | await testValidation(this.textfield, 'ip4', '127.0.0.1', '') |
no test coverage detected