Skip to content

[DONE ] Testing Recipes .. - #198

Merged
3imed-jaberi merged 5 commits into
reactjs:masterfrom
mohamedsgap:testing-recipes-translate
Nov 24, 2019
Merged

[DONE ] Testing Recipes ..#198
3imed-jaberi merged 5 commits into
reactjs:masterfrom
mohamedsgap:testing-recipes-translate

Conversation

@mohamedsgap

@mohamedsgapmohamedsgap commented Nov 10, 2019

Copy link
Copy Markdown
Contributor

Finish translating Testing Recipes page!
Refs: HERE

@netlify

netlifyBot commented Nov 10, 2019

Copy link
Copy Markdown

Deploy preview for ar-reactjs ready!

Built with commit 6594af5

https://deploy-preview-198--ar-reactjs.netlify.com

@3imed-jaberi3imed-jaberi changed the title Testing Recipes Translate[DONE ] Testing Recipes ..Nov 10, 2019
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated

@3imed-jaberi3imed-jaberi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mohamedsgap, شكرا لك على مساهمتك في المحتوى العربي لمستندات React 🎉 ...

ارجو منك التاكد من ان كل كلمة renders تمت ترجمتها إلى التصيير ..

Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md
Comment threadcontent/docs/testing-recipes.md
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
@3imed-jaberi3imed-jaberi added changes-requested update needed This PR needs update since last commit and removed in-review labels Nov 11, 2019
@3imed-jaberi

Copy link
Copy Markdown
Contributor

@mohamedsgap, any update !!

@mohamedsgap

Copy link
Copy Markdown
ContributorAuthor

@3imed-jaberi sorry, I'm so busy this week but I'm going to submit the new changes on Friday.

@mohamedsgap

Copy link
Copy Markdown
ContributorAuthor

@3imed-jaberi@Aissaoui-Ahmed I've finished translating the request changes!

Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
Comment threadcontent/docs/testing-recipes.md Outdated
@mohamedsgap

Copy link
Copy Markdown
ContributorAuthor

I've done the latest request changes! @3imed-jaberi@Aissaoui-Ahmed thanks a lot guys for helping me :)

Comment threadcontent/docs/testing-recipes.md Outdated
يساعد هذا في جعل اختباراتك أقرب إلى ما سيختبره المستخدمون الحقيقيون عند استخدام التطبيق الخاص بك. تستخدم بقية هذه الأمثلة `act()` لتقديم هذه الضمانات.

You might find using `act()` directly a bit too verbose. To avoid some of the boilerplate, you could use a library like [React Testing Library](https://testing-library.com/react), whose helpers are wrapped with `act()`.
قد تجد استخدام `act()`بشكل مطول قليلاً جدًا. لتجنب بعض العناصر النحاسية ، يمكنك استخدام مكتبة مثل [React Testing Library](https://testing-library.com/react)، حيث يتم لف مساعديه `act()`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
قد تجد استخدام `act()`بشكل مطول قليلاً جدًا. لتجنب بعض العناصر النحاسية ، يمكنك استخدام مكتبة مثل [React Testing Library](https://testing-library.com/react)، حيث يتم لف مساعديه `act()`.
قد تجد استخدام `act()`بشكل مطول قليلاً جدًا. لتجنب بعض العناصر النحاسية ، يمكنك استخدام مكتبة مثل [React Testing Library](https://testing-library.com/react)، حيث يتم لف مساعديه `act()`.

Comment threadcontent/docs/testing-recipes.md Outdated
> ملاحظة:
>
> The name `act` comes from the [Arrange-Act-Assert](http://wiki.c2.com/?ArrangeActAssert) pattern.
> اسم `act` يأتى من نمط ال [Arrange-Act-Assert](http://wiki.c2.com/?ArrangeActAssert)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> اسم `act` يأتى من نمط ال [Arrange-Act-Assert](http://wiki.c2.com/?ArrangeActAssert)
> اسم `act` يأتى من نمط ال [Arrange-Act-Assert](http://wiki.c2.com/?ArrangeActAssert)

Comment threadcontent/docs/testing-recipes.md Outdated
---

### Data Fetching {#data-fetching}
### جلب البيانات {#data-fetching}

@Aissaoui-AhmedAissaoui-AhmedNov 23, 2019

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### جلب البيانات {#data-fetching}
### جلب البيانات {#data-fetching}

Comment threadcontent/docs/testing-recipes.md Outdated
---

### Mocking Modules {#mocking-modules}
### محاكاة الوحدات {#mocking-modules}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### محاكاة الوحدات {#mocking-modules}
### محاكاة الوحدات {#mocking-modules}

Comment threadcontent/docs/testing-recipes.md Outdated
---

### Events {#events}
### الأحداث {#events}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### الأحداث {#events}
### الأحداث {#events}

Comment threadcontent/docs/testing-recipes.md Outdated
---

### Snapshot Testing {#snapshot-testing}
### لقطة اختبار {#snapshot-testing}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### لقطة اختبار {#snapshot-testing}
### لقطة اختبار {#snapshot-testing}

Comment threadcontent/docs/testing-recipes.md Outdated
> ملاحظة:
>
> This page assumes you're using [Jest](https://jestjs.io/) as a test runner. If you use a different test runner, you may need to adjust the API, but the overall shape of the solution will likely be the same. Read more details on setting up a testing environment on the [Testing Environments](/docs/testing-environments.html) page.
> تفترض هذه الصفحة أنك تستخدم [Jest](https://jestjs.io/) كمرشح للاختبار. إذا كنت تستخدم عداء اختبار مختلفًا ، فقد تحتاج إلى ضبط واجهة برمجة التطبيقات ، ولكن من المحتمل أن يكون الشكل العام للحل هو نفسه. اقرأ المزيد من التفاصيل حول إعداد بيئة اختبار على صفحة اختبار البيئات.[بيئات الاختبار](/docs/testing-environments.html)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> تفترض هذه الصفحة أنك تستخدم [Jest](https://jestjs.io/) كمرشح للاختبار. إذا كنت تستخدم عداء اختبار مختلفًا ، فقد تحتاج إلى ضبط واجهة برمجة التطبيقات ، ولكن من المحتمل أن يكون الشكل العام للحل هو نفسه. اقرأ المزيد من التفاصيل حول إعداد بيئة اختبار على صفحة اختبار البيئات.[بيئات الاختبار](/docs/testing-environments.html)
> تفترض هذه الصفحة أنك تستخدم [Jest](https://jestjs.io/) كمرشح للاختبار. إذا كنت تستخدم عداء اختبار مختلفًا ، فقد تحتاج إلى ضبط واجهة برمجة التطبيقات ، ولكن من المحتمل أن يكون الشكل العام للحل هو نفسه. اقرأ المزيد من التفاصيل حول إعداد بيئة اختبار على صفحة اختبار البيئات.[بيئات الاختبار](/docs/testing-environments.html)

Comment threadcontent/docs/testing-recipes.md Outdated
### التثبيت/الغاء التثبيت {#setup--teardown}

For each test, we usually want to render our React tree to a DOM element that's attached to `document`. This is important so that it can receive DOM events. When the test ends, we want to "clean up" and unmount the tree from the `document`.
لكل اختبار نقوم باعادة تقديم React tree الى عنصر DOM المرفق ب `document`. وهذا مهم حتى نتمكن من استقبال DOM events. وعندما ينتهى الاختبار نريد ازاله ال tree من `document`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
لكل اختبار نقوم باعادة تقديم React tree الى عنصر DOM المرفق ب `document`. وهذا مهم حتى نتمكن من استقبال DOM events. وعندما ينتهى الاختبار نريد ازاله ال tree من `document`.
لكل اختبار نقوم باعادة تقديم React tree الى عنصر DOM المرفق ب `document`. وهذا مهم حتى نتمكن من استقبال DOM events. وعندما ينتهى الاختبار نريد ازاله ال tree من `document`.

Comment threadcontent/docs/testing-recipes.md Outdated
لكل اختبار نقوم باعادة تقديم React tree الى عنصر DOM المرفق ب `document`. وهذا مهم حتى نتمكن من استقبال DOM events. وعندما ينتهى الاختبار نريد ازاله ال tree من `document`.

A common way to do it is to use a pair of `beforeEach` and `afterEach` blocks so that they'll always run and isolate the effects of a test to itself:
هناك طريقة شائعة للقيام بذلك هي استخدام زوج من `beforeEach` و `afterEach` بحيث يتم تشغيلهما دائمًا وعزل آثار الاختبار عن نفسه:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
هناك طريقة شائعة للقيام بذلك هي استخدام زوج من `beforeEach` و `afterEach` بحيث يتم تشغيلهما دائمًا وعزل آثار الاختبار عن نفسه:
هناك طريقة شائعة للقيام بذلك هي استخدام زوج من `beforeEach` و `afterEach` بحيث يتم تشغيلهما دائمًا وعزل آثار الاختبار عن نفسه:

@Aissaoui-AhmedAissaoui-Ahmed left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job just remove double spaces

@3imed-jaberi3imed-jaberi added in-review and removed changes-requested update needed This PR needs update since last commit labels Nov 24, 2019

@3imed-jaberi3imed-jaberi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀 ..

@mohamedsgap

Copy link
Copy Markdown
ContributorAuthor

just removed double spaces @Aissaoui-Ahmed , @3imed-jaberi approved the pull request!, what's next guys! ?
are there any pages available to translate ?

@Aissaoui-AhmedAissaoui-Ahmed left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great ❤️

@asantarissy

Copy link
Copy Markdown
Contributor

just removed double spaces @Aissaoui-Ahmed , @3imed-jaberi approved the pull request!, what's next guys! ?
are there any pages available to translate ?

Great job @mohamedsgap 🚀 check out #1 we still have couple of pages, enjoy 😊

@3imed-jaberi
3imed-jaberi merged commit 76dc5d6 into reactjs:masterNov 24, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@mohamedsgap@3imed-jaberi@asantarissy@Aissaoui-Ahmed