nielsen-oss / docs

Guidelines & Best Practices documentation shared by Nielsen with the Open Source community
Apache License 2.0
40 stars 7 forks source link

Meeting 2019-11-07 #6

Closed einatnielsen closed 4 years ago

einatnielsen commented 4 years ago

Agenda

MatanBorenkraoutNielsen commented 4 years ago

Regarding I18n, this solution may be possible:

const renderWithReactIntl = component => {
  return render(<IntlProvider locale="pt">{component}</IntlProvider>)
}

test('it should render FormattedDate and have a formated pt date', () => {
  const { container } = renderWithReactIntl(<FormatDateView />)
  expect(getByTestId(container, 'date-display')).toHaveTextContent('11/03/2019')
})

As an approach, we would prefer using aria attributes, data-attributes and only later on, text.

MatanBorenkraoutNielsen commented 4 years ago

Action items: