|
|
@ -1,4 +1,11 @@ |
|
|
|
const { setLocale, expectDateString, scrollWheel } = require('../utils') |
|
|
|
const { |
|
|
|
setMode, |
|
|
|
setLocale, |
|
|
|
expectDateString, |
|
|
|
scrollWheel, |
|
|
|
setMinimumDate, |
|
|
|
setMaximumDate, |
|
|
|
} = require('../utils') |
|
|
|
|
|
|
|
describe('Display text', () => { |
|
|
|
before(async () => { |
|
|
@ -32,6 +39,40 @@ describe('Display text', () => { |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
describe('date', () => { |
|
|
|
before(async () => { |
|
|
|
await device.reloadReactNative() |
|
|
|
await element(by.text('Advanced')).tap() |
|
|
|
await setMinimumDate(undefined) |
|
|
|
await setMaximumDate(undefined) |
|
|
|
await setMode('date') |
|
|
|
}) |
|
|
|
|
|
|
|
it('en-US', async () => { |
|
|
|
await expectLocaleDateString('en-US', 'February' + '1' + '2000') |
|
|
|
}) |
|
|
|
|
|
|
|
it('pt-BR', async () => { |
|
|
|
await expectLocaleDateString('pt-BR', '2janeiro' + '2000') |
|
|
|
}) |
|
|
|
|
|
|
|
it('sv-SE', async () => { |
|
|
|
await expectLocaleDateString('sv-SE', '2' + 'januari' + '2000') |
|
|
|
}) |
|
|
|
|
|
|
|
it('ko', async () => { |
|
|
|
await expectLocaleDateString('ko', '2001년' + '1월' + '1일') |
|
|
|
}) |
|
|
|
|
|
|
|
it('ja', async () => { |
|
|
|
await expectLocaleDateString('ja', '2001年' + '1月' + '1日') |
|
|
|
}) |
|
|
|
|
|
|
|
it('zh-CH', async () => { |
|
|
|
await expectLocaleDateString('zh-CH', '2001年' + '一月' + '1日') |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
const expectLocaleDateString = async (locale, dateString) => { |
|
|
|
await setLocale(locale) |
|
|
|
await scrollWheel(0, 1) |
|
|
|