-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
2382 lines (2276 loc) · 157 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html class="sg-html sg-html--home" lang="fr" id="sg-home-html">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0">
<meta name="Content-Language" content="fr">
<meta name="Subject" content="React Starter - workshop">
<meta name="Copyright" content="2023 Samuel Gomez">
<meta name="Author" content="Samuel Gomez">
<meta name="Publisher" content="Samuel Gomez">
<meta name="Identifier-Url" content="">
<meta name="Reply-To" content="samuel.gomez@axa.fr">
<meta name="Revisit-After" content="15 days">
<meta name="Robots" content="all">
<meta name="Rating" content="general">
<meta name="Distribution" content="global">
<meta name="Geography" content="Lille, France, 59000">
<meta name="Category" content="engineering">
<meta name="DC.Title" content="React Starter - workshop">
<meta name="DC.Content-Language" content="fr">
<meta name="DC.Description" content="Samuel Gomez OpenSource Axa Front-End Nodejs React à Lille.">
<meta name="DC.Keywords" content="Samuel Gomez, développeur frontend, Open Source,Open source Axa, Axa France">
<meta name="DC.Subject" content="React Starter - workshop">
<meta name="DC.Copyright" content="2023 Samuel Gomez">
<meta name="DC.Author" content="Samuel Gomez">
<meta name="DC.Publisher" content="Samuel Gomez">
<meta name="DC.Identifier-Url" content="">
<meta name="DC.Reply-To" content="samuel.gomez@axa.fr">
<meta property="og:image" content="./assets/images/assets/images/axa.svg">
<meta property="og:site_name" content="GitHub AxaGuiDev">
<meta property="og:type" content="profile">
<meta property="og:title" content="React Starter - workshop">
<meta property="og:url" content="">
<meta property="og:description" content="Samuel Gomez OpenSource Axa Front-End Nodejs React à Lille.">
<meta property="profile:username" content="Samuel Gomez">
<!--https://realfavicongenerator.net/-->
<link rel="apple-touch-icon" sizes="57x57" href="./assets/favicons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="./assets/favicons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="./assets/favicons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="./assets/favicons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="./assets/favicons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="./assets/favicons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="./assets/favicons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="./assets/favicons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="./assets/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="./assets/favicons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="./assets/favicons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="./assets/favicons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="./assets/favicons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="./assets/favicons/manifest.json">
<link rel="mask-icon" href="./assets/favicons/safari-pinned-tab.svg" color="#5bbad5">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="./assets/favicons/mstile-144x144.png">
<meta name="theme-color" content="#ffffff">
<title>React Starter - workshop
</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="plugin/highlight/vs.css">
<link rel="stylesheet" href="dist/theme/axa.css">
</head>
<body class="sg-body" id="sg-home-body">
<div class="sg-menu js-menu"><img class="sg-img sg-img--close js-img js-img--close sg-menu__close" src="././assets/images/cross-gap.svg" alt="cross-gap.svg" loading="lazy"/><img class="sg-img sg-img--open js-img js-img--open sg-menu__open" src="././assets/images/menu-button.svg" alt="menu-button.svg" loading="lazy"/>
<nav class="sg-menu__nav">
<ul class="sg-menu__list" role="menu">
<li class="sg-menu__item sg-menu__item--active"><a class="sg-menu__item-link" href="/#/" title="">
<svg class="sg-menu__item-icon" id="Accueil" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 50 50">
<path d="M25 1.05c-.22 0-.43.07-.62.21l-23 17.95a1 1 0 0 0-.17 1.4 1 1 0 0 0 1.4.18L4 19.7V46a1 1 0 0 0 1 1h14V29h12v18h14a1 1 0 0 0 1-1V19.71l1.38 1.08c.2.14.4.21.62.21a1 1 0 0 0 .79-.38 1 1 0 0 0-.17-1.4l-23-17.96c-.19-.14-.4-.2-.62-.2zM35 5v1.05l6 4.68V5h-6z"></path>
</svg><span class="sg-menu__item-link-text">Accueil</span></a>
</li>
<li class="sg-menu__item"><a class="sg-menu__item-link" href="/#/besoin" title="">
<svg class="sg-menu__item-icon" id="Besoin" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" viewbox="0 0 32 32">
<path fill-rule="nonzero" d="M17.34 26.36h4.91c.4-.4.83-.8 1.27-1.21.92-.88 1.88-1.79 2.87-2.92 1.13-1.3 1.25-1.76 1.6-3.04l.23-.84.58-2.06.01-.03c.32-.92.34-1.52.21-1.87a.43.43 0 0 0-.15-.22.27.27 0 0 0-.18-.04.8.8 0 0 0-.48.29l-1.75 4.15a2.24 2.24 0 0 1-.48.64l-3.1 3.46a.45.45 0 0 1-.64.04.45.45 0 0 1-.03-.64l3.1-3.46.04-.04c.32-.3.42-.64.36-.88a.4.4 0 0 0-.1-.18.27.27 0 0 0-.16-.07c-.28-.03-.68.18-1.18.76l-.04.05-1.2 1.06h-.01c-1.3 1.24-1.86 1.53-2.88 2.06l-.73.39c-.12.06-.23.14-.34.22l-.33.27c-.54.46-.83.82-.99 1.23a15.41 15.41 0 0 0-.41 2.88Zm6.06.16c.07.08.1.19.1.3v2.72c0 .25-.2.46-.45.46h-6.18a.46.46 0 0 1-.46-.46c0-1.2-.04-2.44.04-3.64l.08-.89c.09-.77.16-1.33.37-1.87.22-.56.58-1.04 1.24-1.6l.37-.3.46-.3.74-.39c.95-.5 1.46-.76 2.68-1.91l.03-.03 1.17-1.03c.71-.84 1.41-1.12 1.95-1.06.26.03.49.13.66.29l1.19-2.82a.47.47 0 0 1 .07-.11c.33-.4.74-.62 1.14-.66.27-.03.53.03.76.18.22.14.4.36.51.66.2.53.2 1.34-.2 2.48l-.58 2.05-.22.83c-.39 1.43-.52 1.93-1.8 3.4-1 1.15-1.98 2.08-2.93 2.98l-.74.72Zm-6.07.76v1.8h5.27v-1.8h-5.27Zm-2.67-.92H9.75c-.4-.4-.83-.8-1.27-1.21-.92-.88-1.88-1.79-2.87-2.92-1.13-1.3-1.25-1.76-1.6-3.04l-.23-.84-.58-2.06-.01-.03c-.32-.92-.34-1.52-.21-1.87a.43.43 0 0 1 .15-.22.34.34 0 0 1 .18-.04.8.8 0 0 1 .48.29l1.75 4.15a2.24 2.24 0 0 0 .49.64l3.08 3.46c.17.2.46.2.65.04.19-.17.2-.46.03-.64L6.7 18.6l-.04-.04c-.32-.3-.42-.64-.36-.88a.4.4 0 0 1 .1-.18.26.26 0 0 1 .16-.07c.28-.03.68.18 1.18.76l.04.05 1.2 1.06h.01c1.3 1.24 1.86 1.53 2.88 2.06l.73.39c.12.06.23.14.34.22l.34.27c.53.46.82.82.98 1.23a15.41 15.41 0 0 1 .41 2.88Zm-6.06.16a.47.47 0 0 0-.1.3v2.72c0 .25.2.46.45.46h6.18c.26 0 .46-.2.46-.46 0-1.2.04-2.44-.04-3.64l-.08-.89a7.25 7.25 0 0 0-.37-1.87 3.97 3.97 0 0 0-1.24-1.6l-.37-.3-.45-.3-.75-.39c-.95-.5-1.46-.76-2.67-1.91l-.03-.03-1.18-1.03c-.71-.84-1.41-1.12-1.95-1.06-.26.03-.49.13-.66.29l-1.2-2.82a.47.47 0 0 0-.07-.11c-.33-.4-.74-.62-1.14-.66-.27-.03-.53.03-.76.18-.22.14-.4.36-.51.66-.2.53-.2 1.34.2 2.48l.58 2.05.22.83c.39 1.43.52 1.93 1.8 3.4 1 1.15 1.98 2.08 2.93 2.98l.74.72Zm6.07.76v1.8H9.41v-1.8h5.26Z"></path>
<path d="M16.45 1.79a.5.5 0 0 0-.9 0s-4.27 9.1-4.27 12.99a4.72 4.72 0 0 0 9.44 0c0-3.9-4.27-13-4.27-13ZM16 3.19c-1.08 2.41-3.72 8.59-3.72 11.59a3.72 3.72 0 0 0 7.44 0c0-3-2.64-9.18-3.72-11.58Z"></path>
<path d="M13.52 13.87s-.22.83-.09 1.67c.1.64.4 1.26 1.03 1.64.37.22.88.36 1.57.32a.5.5 0 0 0-.06-1 1.7 1.7 0 0 1-1-.18c-.36-.21-.5-.58-.55-.93a3.6 3.6 0 0 1 .06-1.27.5.5 0 0 0-.96-.25Z"></path>
</svg><span class="sg-menu__item-link-text">Besoin</span></a>
</li>
<li class="sg-menu__item"><a class="sg-menu__item-link" href="/#/stack-technique" title="">
<svg class="sg-menu__item-icon" id="Stack" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24">
<path d="M15.13 2.5c-.28-.47-.9-.63-1.37-.36a.98.98 0 0 0-.37 1.35l4.22 7.17-5.9-5.8a1.02 1.02 0 0 0-1.44 0 .98.98 0 0 0 0 1.4l6 5.88-7.25-4.1a1.01 1.01 0 0 0-1.38.37.98.98 0 0 0 .37 1.35l7.43 4.2-8.18-2.14a1.01 1.01 0 0 0-1.23.71.99.99 0 0 0 .7 1.22L15.3 16H7a1 1 0 1 0 0 2h10a1 1 0 0 0 .62-1.78 1 1 0 0 0 .27-1.32c.2-.08.37-.22.48-.42.14-.23.17-.5.1-.74.21-.03.41-.13.57-.28a.98.98 0 0 0 .3-.66.98.98 0 0 0 .99-1.48l-5.2-8.81ZM4 17a1 1 0 1 0-2 0v1a4 4 0 0 0 4 4h12a4 4 0 0 0 4-4v-1a1 1 0 1 0-2 0v1a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-1Z"></path>
</svg><span class="sg-menu__item-link-text">Stack</span></a>
</li>
<li class="sg-menu__item"><a class="sg-menu__item-link" href="/#/structure" title="">
<svg class="sg-svg sg-svg--circle js-svg js-svg--circle" id="Structure" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 48 48" width="34px">
<g data-name="Layer 2">
<g data-name="icons Q2"></g>
<path fill="none" d="M0 0h48v48H0z"></path>
<path d="M26 30h16a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2H26a2 2 0 0 0-2 2v2h-8v-8h6a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h6v26a2 2 0 0 0 2 2h10v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2H26a2 2 0 0 0-2 2v2h-8V26h8v2a2 2 0 0 0 2 2Z"></path>
</g>
</svg><span class="sg-menu__item-link-text">Structure</span></a>
</li>
<li class="sg-menu__item"><a class="sg-menu__item-link" href="/#/playground" title="">
<svg class="sg-svg sg-svg--circle" id="Playground" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" overflow="hidden" viewbox="0 0 342.99 280">
<path fill-rule="evenodd" d="M233.87 0h109.12L109.12 280H0L233.87 0zm66.12 144.54V239h-78.8l-34.2 41h156V93zM43 41h78.8L156 0H0v187l43-51.54z" clip-rule="evenodd"></path>
</svg><span class="sg-menu__item-link-text">Playground</span></a>
</li>
<li class="sg-menu__item"><a class="sg-menu__item-link" href="/#/get-started-intro" title="">
<svg class="sg-menu__item-icon" id="Get Started" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20Zm-1.3-6.15 4.71-2.8c.79-.45.79-1.65 0-2.1l-4.72-2.8C9.93 7.71 9 8.3 9 9.21v5.58c0 .92.93 1.5 1.7 1.06Z" clip-rule="evenodd"></path>
</svg><span class="sg-menu__item-link-text">Get Started</span></a>
</li>
<li class="sg-menu__item"><a class="sg-menu__item-link" href="/#/exo1-intro" title="">
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewbox="0 0 219 256" width="25px">
<path d="M74.5 26.84a24.84 24.84 0 1 1 49.68 0 24.84 24.84 0 0 1-49.68 0zm119.76 89.2 11.67-60.65-11.09-2.13-10.77 56h-28.59a12.42 12.42 0 0 0-12.17-14.5l-49-.23-13.4-35.91C78.43 49.37 72.27 42.9 61.5 42.9c-11.47 0-19.17 10.43-23.13 21.2-7.9 21.44-13.55 57.58-11.26 81.04 1.23 10.96 4.18 19.95 11.6 23.96H18.03V93.83H2.24V253.8h15.8v-68.87h74.54l-10.4 51.5a14.68 14.68 0 0 0 28.78 5.8l9.15-45.34 12.66 33.95a14.68 14.68 0 1 0 27.5-10.25l-25.73-69.02a14.68 14.68 0 0 0-13.75-9.55H82.34l-.02-9.03h118.64V253.8h15.8V116.04h-22.5z"></path>
</svg><span class="sg-menu__item-link-text">Exo 1</span></a>
</li>
</ul>
</nav>
</div>
<header class="sg-header"><a class="sg-header__name-link" href="./" title="Retour à l'accueil">
<div class="sg-logo sg-logo--header sg-logo--opened"><img class="sg-img sg-logo__img" src="././assets/images/slash-logo-white.svg" alt="Retour à l'accueil" loading="lazy"/>
<div class="sg-logo__title">
<h2 class="sg-title sg-title--logo-name">React Starter
</h2>
<h3 class="sg-title sg-title--logo-subtitle">Workshop
</h3>
</div>
</div></a></header>
<div class="reveal">
<div class="slides">
<section class="sg-home" id="home" data-background="" data-background-transition="fade">
<section class="sg-preface" id="preface" data-background="" data-background-transition="fade">
<h1>React Starter</h1><img src="assets/images/starter-react.svg" alt="Starter React">
</section>
<section class="sg-preface-about" id="preface-about" data-background="" data-background-transition="fade">
<h2>Contributeurs</h2>
<div class="sg-cards-flex">
<article class="sg-card sg-card--user fade-up"> <img class="sg-img sg-card__image" src="././assets/images/johan.jpg" alt="johan.jpg" loading="lazy"/>
<h3 class="sg-card__title"> Johan Korger</h3>
<p class="sg-card__content"> Lead Front-end</p>
<footer class="sg-card__footer"> <a class="sg-card__footer-link" href="https://twitter.com/gamuez" title="Voir le compte twitter">
<svg class="sg-card__footer-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" id="twitter-icon">
<path d="M18.24 2.25h3.31l-7.23 8.26 8.5 11.24h-6.65l-5.21-6.82-5.97 6.82H1.68l7.73-8.84L1.25 2.25h6.83l4.71 6.23zm-1.16 17.52h1.84L7.08 4.13H5.12z"></path>
</svg></a>
</footer>
</article>
<article class="sg-card sg-card--user fade-up"> <img class="sg-img sg-card__image" src="././assets/images/sam.jpg" alt="sam.jpg" loading="lazy"/>
<h3 class="sg-card__title"> Samuel Gomez</h3>
<p class="sg-card__content"> Lead Front-end</p>
<footer class="sg-card__footer"> <a class="sg-card__footer-link" href="https://twitter.com/gamuez" title="Voir le compte twitter">
<svg class="sg-card__footer-icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" id="twitter-icon">
<path d="M18.24 2.25h3.31l-7.23 8.26 8.5 11.24h-6.65l-5.21-6.82-5.97 6.82H1.68l7.73-8.84L1.25 2.25h6.83l4.71 6.23zm-1.16 17.52h1.84L7.08 4.13H5.12z"></path>
</svg></a>
</footer>
</article>
</div>
</section>
</section>
<section id="besoin" data-background-transition="fade">
<h1>Le Besoin</h1>
<div class="sg-cards">
<article class="sg-card fade-up">
<h3 class="sg-card__title"> CAPITALISER LES DÉVELOPPEMENTS AU FIL DES PROJETS</h3>
<p class="sg-card__content"> Chaque projet a contribué à l’amélioration du starter</p>
</article>
<article class="sg-card fade-up">
<h3 class="sg-card__title"> NE PAS REFAIRE LES CONFIGURATIONS À CHAQUE PROJET</h3>
<p class="sg-card__content"> (Jest, MSW, Cucumber, Eslint, Typescript, Toolkit, OIDC, …)</p>
</article>
<article class="sg-card fade-up">
<h3 class="sg-card__title"> RÉCUPÉRER LE SOCLE COMMUN</h3>
<p class="sg-card__content"> (Header, Footer, Router, Layout, etc …)</p>
</article>
<article class="sg-card fade-up">
<h3 class="sg-card__title"> AMÉLIORATION DU TTM</h3>
<p class="sg-card__content"> Pouvoir démarrer un projet rapidement dans les environnements AXA avec une stack à jour</p>
</article>
</div>
</section>
<section id="stack">
<section id="stack-technique">
<h1>Stack technique </h1>
<div class="sg-cards-3cols">
<article class="sg-card sg-card--with-left-icon fade-up"> <img class="sg-img sg-card__image" src="././assets/images/github.svg" alt="github.svg" loading="lazy"/>
<h3 class="sg-card__title"> Open Source</h3>
<p class="sg-card__content"> Sources disponiblent sur Github</p>
</article>
<article class="sg-card sg-card--with-left-icon fade-up"> <img class="sg-img sg-card__image" src="././assets/images/typescript.svg" alt="typescript.svg" loading="lazy"/>
<h3 class="sg-card__title"> Typescript</h3>
<p class="sg-card__content"> Personnalisable dans le tsconfig.js</p>
</article>
<article class="sg-card sg-card--with-left-icon fade-up"> <img class="sg-img sg-card__image" src="././assets/images/slash.svg" alt="slash.svg" loading="lazy"/>
<h3 class="sg-card__title"> Toolkit Slash DS</h3>
<p class="sg-card__content"> Implémentation de Slash Design System</p>
</article>
<article class="sg-card sg-card--with-left-icon fade-up"> <img class="sg-img sg-card__image" src="././assets/images/quality.svg" alt="quality.svg" loading="lazy"/>
<h3 class="sg-card__title"> Quality</h3>
<p class="sg-card__content"> Eslint, Prettier, Husky, Sonar, Lint Staged</p>
</article>
<article class="sg-card sg-card--with-left-icon fade-up"> <img class="sg-img sg-card__image" src="././assets/images/accessibility.svg" alt="accessibility.svg" loading="lazy"/>
<h3 class="sg-card__title"> Accessibility</h3>
<p class="sg-card__content"> Eslint A11y, Axe Core, Jest Axe, A11yMenu</p>
</article>
<article class="sg-card sg-card--with-left-icon fade-up"> <img class="sg-img sg-card__image" src="././assets/images/security.svg" alt="security.svg" loading="lazy"/>
<h3 class="sg-card__title"> Security</h3>
<p class="sg-card__content"> Authentification avec React OIDC</p>
</article>
<article class="sg-card sg-card--with-left-icon fade-up"> <img class="sg-img sg-card__image" src="././assets/images/form.svg" alt="form.svg" loading="lazy"/>
<h3 class="sg-card__title"> Forms</h3>
<p class="sg-card__content"> Gestion des formulaires avec React Hook Form</p>
</article>
<article class="sg-card sg-card--with-left-icon fade-up"> <img class="sg-img sg-card__image" src="././assets/images/router.svg" alt="router.svg" loading="lazy"/>
<h3 class="sg-card__title"> Routing</h3>
<p class="sg-card__content"> Système de routes avec React Router</p>
</article>
<article class="sg-card sg-card--with-left-icon fade-up"> <img class="sg-img sg-card__image" src="././assets/images/fetch.svg" alt="fetch.svg" loading="lazy"/>
<h3 class="sg-card__title"> Fetch</h3>
<p class="sg-card__content"> Gestion des requêtes avec React Query</p>
</article>
<article class="sg-card sg-card--with-left-icon fade-up"> <img class="sg-img sg-card__image" src="././assets/images/tests.svg" alt="tests.svg" loading="lazy"/>
<h3 class="sg-card__title"> Tests</h3>
<p class="sg-card__content"> Vitest, Jest Cucumber, Testing Library, Jest Axe, Gherkins</p>
</article>
</div>
</section>
<section id="stack-github">
<svg class="sg-svg sg-svg--title" id="github-icon" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" overflow="hidden" viewbox="0 0 52 52">
<path d="M48.58 14.32A25.38 25.38 0 0 0 26.5 1.62c-4.63 0-8.9 1.14-12.8 3.42A25.38 25.38 0 0 0 1 27.12c0 5.56 1.62 10.56 4.86 15a24.97 24.97 0 0 0 12.57 9.2c.6.12 1.04.04 1.33-.23.29-.26.43-.6.43-1l-.02-1.78a279.9 279.9 0 0 1-.01-2.96l-.77.13c-.48.1-1.1.13-1.84.12-.74-.01-1.51-.09-2.3-.23a5.15 5.15 0 0 1-2.23-1 4.22 4.22 0 0 1-1.46-2.04l-.33-.76a8.27 8.27 0 0 0-1.05-1.7 4 4 0 0 0-1.44-1.26l-.24-.16a2.48 2.48 0 0 1-.73-.87c-.06-.15 0-.28.17-.38.18-.1.5-.15.96-.15l.67.1c.44.09.99.35 1.64.8a5.37 5.37 0 0 1 1.61 1.72c.5.91 1.12 1.6 1.84 2.08.72.47 1.45.71 2.18.71.73 0 1.36-.05 1.89-.16a6.6 6.6 0 0 0 1.5-.5c.2-1.48.74-2.62 1.62-3.42-1.26-.13-2.4-.33-3.4-.6-1.01-.27-2.05-.7-3.12-1.3a8.93 8.93 0 0 1-2.68-2.22c-.7-.88-1.29-2.05-1.74-3.48a16.6 16.6 0 0 1-.68-4.99 9.7 9.7 0 0 1 2.62-6.84c-.82-2.01-.74-4.27.24-6.77.64-.2 1.59-.05 2.85.45a19.9 19.9 0 0 1 4.18 2.17 23.83 23.83 0 0 1 12.76 0l1.26-.8a18.5 18.5 0 0 1 3.05-1.45c1.17-.45 2.07-.57 2.7-.37.99 2.5 1.08 4.76.26 6.78a9.68 9.68 0 0 1 2.62 6.83c0 1.89-.23 3.55-.68 5a10.28 10.28 0 0 1-1.76 3.49 9.28 9.28 0 0 1-2.69 2.2c-1.07.6-2.11 1.03-3.12 1.3-1 .27-2.14.47-3.4.6 1.15 1 1.72 2.57 1.72 4.71v7c0 .4.14.74.42 1 .27.27.71.35 1.3.24a24.97 24.97 0 0 0 12.58-9.22A24.79 24.79 0 0 0 52 27.12c0-4.62-1.14-8.89-3.42-12.8Z"></path>
</svg>
<h2>Github</h2>
<p>Le projet est <a href="https://github.com/samuel-gomez/react-starter-vitejs">Open Source, </a>vous pouvez donc forker ou <a href="/#/get-started-clone">cloner le projet</a><br>Si vous rencontrez des bugs, vous pouvez <a href="https://github.com/samuel-gomez/react-starter-vitejs/issues">créer une issue sur le repository.</a><br>Si vous souhaitez contribuer au projet, vous pouvez en faire la demande pour être ajouter à l'équipe.</p>
</section>
<section id="stack-typescript">
<svg class="sg-svg sg-svg--title" id="typescript-icon" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" overflow="hidden" viewbox="0 0 45 46">
<path d="M22.5 0H0v46h45V0H22.5Zm3.29 25.03h-5.87v17.02H15.8v-17H9.93l.02-1.89.02-1.87 7.85-.02c4.33 0 7.9 0 7.91.04.04.02.06.88.06 1.9v1.82Zm15.3 13.51c-.71 1.9-2.47 3.22-4.97 3.65-.77.14-2.6.13-3.42-.04a8.1 8.1 0 0 1-4.58-2.44 8.47 8.47 0 0 1-1.17-1.78c.01-.03.2-.14.42-.27.2-.12.95-.55 1.67-.99l1.3-.77.26.41c.39.6 1.22 1.4 1.7 1.68 1.45.77 3.42.66 4.39-.24.42-.4.58-.79.58-1.38 0-.54-.07-.77-.34-1.17-.35-.5-1.07-.93-3.1-1.83-2.31-1.03-3.31-1.66-4.23-2.66a6.05 6.05 0 0 1-1.23-2.3 9.1 9.1 0 0 1-.07-2.93 5.52 5.52 0 0 1 4.62-4.37c.8-.16 2.64-.09 3.41.11 1.15.29 2.03.81 2.82 1.65a6.54 6.54 0 0 1 1.07 1.48c.02.05-1.95 1.4-3.13 2.15-.04.04-.21-.16-.4-.45-.58-.86-1.18-1.24-2.11-1.29-1.37-.09-2.25.63-2.24 1.85 0 .36.06.58.2.86.3.63.86 1.01 2.6 1.8 3.22 1.42 4.6 2.35 5.45 3.68a6.78 6.78 0 0 1 .5 5.6Z"></path>
</svg>
<h2>Typescript</h2>
<p>L'ensemble du projet a été développé avec Typescript<br>Si vous souhaitez adapter sa configuration, vous pouvez modifier le fichier tsconfig.</p>
<article class="sg-youtube">
<iframe width="560" height="315" src="https://www.youtube.com/embed/ffCIANfx_-0?si=G_PT-XV3bX29FzIU" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/R1MlRKjCOLU?si=Nq6snyZhIL1nnhLL" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></iframe>
</article>
</section>
<section id="stack-slash">
<svg class="sg-svg sg-svg--title" id="slash-icon" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" overflow="hidden" viewbox="0 0 342.99 280">
<path fill-rule="evenodd" d="M233.87 0h109.12L109.12 280H0L233.87 0zm66.12 144.54V239h-78.8l-34.2 41h156V93zM43 41h78.8L156 0H0v187l43-51.54z" clip-rule="evenodd"></path>
</svg>
<h2>Slash Design System</h2>
<main class="sg-gallery__main">
<article class="sg-gallery__item sg-gallery__slash">
<div class="sg-gallery__item-info-wrap">
<div class="sg-gallery__item-info">
<div class="sg-gallery__item-info-front sg-gallery__slash"></div>
<div class="sg-gallery__item-info-back">
<h3 class="sg-gallery__item-title">Slash DS</h3><a class="sg-gallery__item-link" title="Voir undefined" href="https://axafrance.github.io/design-system/" target="_blank" rel="noreferrer">View on WebSite</a>
</div>
</div>
</div>
</article>
<article class="sg-gallery__item sg-gallery__storybook">
<div class="sg-gallery__item-info-wrap">
<div class="sg-gallery__item-info">
<div class="sg-gallery__item-info-front sg-gallery__storybook"></div>
<div class="sg-gallery__item-info-back">
<h3 class="sg-gallery__item-title">Storybook</h3><a class="sg-gallery__item-link" title="Voir undefined" href="https://axafrance.github.io/react-toolkit/latest/storybook/" target="_blank" rel="noreferrer">View on WebSite</a>
</div>
</div>
</div>
</article>
<article class="sg-gallery__item sg-gallery__github">
<div class="sg-gallery__item-info-wrap">
<div class="sg-gallery__item-info">
<div class="sg-gallery__item-info-front sg-gallery__github"></div>
<div class="sg-gallery__item-info-back">
<h3 class="sg-gallery__item-title">Github</h3><a class="sg-gallery__item-link" title="Voir undefined" href="https://github.com/AxaFrance/react-toolkit" target="_blank" rel="noreferrer">View on WebSite</a>
</div>
</div>
</div>
</article>
</main>
<div class="sg-alert sg-alert--warning" role="alert">
<svg class="sg-svg" id="info-icon" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Zm-10 5.75c.41 0 .75-.34.75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .41.34.75.75.75ZM12 7a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z" clip-rule="evenodd"></path>
</svg><span class="sg-alert__content">Le starter peut être utilisé sans le toolkit Slash. <br>Cela nécessitera un nettoyage manuel du starter (comme supprimer tous les composants basés sur les composants Slash )</span>
</div>
</section>
<section id="stack-quality">
<svg class="sg-svg sg-svg--title" id="quality-icon" viewbox="0 0 512.01 512.01" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
<path d="m347.37 207.3-25.6-25.6a8.52 8.52 0 0 0-12.07 0l-87.83 87.84-28.1-28.1a8.52 8.52 0 0 0-12.07 0l-25.6 25.6a8.52 8.52 0 0 0 0 12.07l59.74 59.73a8.5 8.5 0 0 0 12.07 0l119.46-119.47a8.52 8.52 0 0 0 0-12.06zm-125.5 113.44-47.67-47.67 13.54-13.53 28.1 28.1a8.52 8.52 0 0 0 12.06 0l87.84-87.83 13.53 13.53-107.4 107.4z"></path>
<path d="M510.02 301.75 471.92 256l38.1-45.74a8.53 8.53 0 0 0-6.55-14H391.4l-7.48-52.4a8.53 8.53 0 0 0-8.45-7.33H310.3l-48.82-40.69a8.51 8.51 0 0 0-10.93 0l-48.83 40.7h-65.17a8.54 8.54 0 0 0-8.45 7.31l-7.49 52.41H8.54a8.55 8.55 0 0 0-6.56 14L40.1 256 2 301.75a8.53 8.53 0 0 0 6.55 14H120.6l7.49 52.4a8.52 8.52 0 0 0 8.44 7.32h65.17l48.83 40.7a8.5 8.5 0 0 0 10.92 0l48.82-40.7c13.27 0 65.2.04 65.19 0a8.54 8.54 0 0 0 8.45-7.32l7.49-52.4h112.06a8.55 8.55 0 0 0 6.55-14zm-483.26-3.08 31-37.2a8.53 8.53 0 0 0 0-10.92l-31-37.21h83.03l-31 37.2a8.53 8.53 0 0 0 0 10.93l31 37.2H26.76zm350.7 3.07a8.4 8.4 0 0 0-1.07 1.64c-.6 1.2-.63 1.25-8.3 55.03-62.89 0-62.95.03-64.7.9-.59.3-1.14.66-1.65 1.08L256 398.49l-45.73-38.1a8.5 8.5 0 0 0-5.47-1.98h-60.86c-7.68-53.78-7.7-53.83-8.3-55.03a8.85 8.85 0 0 0-1.08-1.64L96.45 256l38.1-45.74a8.5 8.5 0 0 0 1.9-4.26l7.49-52.4h60.87c2 0 3.92-.7 5.46-1.98l45.73-38.1c46.49 38.74 46.52 38.75 47.38 39.2 1.19.58 2.5.89 3.82.89h60.86l7.49 52.4a8.51 8.51 0 0 0 1.9 4.27l38.1 45.73-38.1 45.73zm24.76-3.07 31-37.2a8.53 8.53 0 0 0 0-10.92l-31-37.2h83.03l-31 37.2a8.53 8.53 0 0 0 0 10.92l31 37.2h-83.03z"></path>
</svg>
<h2>Quality</h2>
<div class="sg-alert sg-alert--success" role="alert">
<svg class="sg-svg" id="info-icon" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Zm-10 5.75c.41 0 .75-.34.75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .41.34.75.75.75ZM12 7a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z" clip-rule="evenodd"></path>
</svg><span class="sg-alert__content"><strong>Eslint : </strong>Vous pouvez modifier la configuration depuis le fichier <em>.eslintrc.cjs</em></span>
</div>
<div class="sg-alert sg-alert--success" role="alert">
<svg class="sg-svg" id="info-icon" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Zm-10 5.75c.41 0 .75-.34.75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .41.34.75.75.75ZM12 7a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z" clip-rule="evenodd"></path>
</svg><span class="sg-alert__content"><strong>Prettier : </strong>Vous pouvez modifier la configuration depuis le fichier <em>.prettierrc.cjs</em></span>
</div>
<div class="sg-alert sg-alert--success" role="alert">
<svg class="sg-svg" id="info-icon" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Zm-10 5.75c.41 0 .75-.34.75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .41.34.75.75.75ZM12 7a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z" clip-rule="evenodd"></path>
</svg><span class="sg-alert__content"><strong>Husky : </strong>Vous pouvez modifier la configuration depuis le dossier <em>.husky</em></span>
</div>
<div class="sg-alert sg-alert--success" role="alert">
<svg class="sg-svg" id="info-icon" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Zm-10 5.75c.41 0 .75-.34.75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .41.34.75.75.75ZM12 7a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z" clip-rule="evenodd"></path>
</svg><span class="sg-alert__content"><strong>Lint-staged : </strong>Vous pouvez modifier la configuration depuis le fichier <em>.lintstagedrc.cjs</em></span>
</div>
<div class="sg-alert sg-alert--success" role="alert">
<svg class="sg-svg" id="info-icon" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Zm-10 5.75c.41 0 .75-.34.75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .41.34.75.75.75ZM12 7a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z" clip-rule="evenodd"></path>
</svg><span class="sg-alert__content"><strong>Commitlint : </strong>Vous pouvez modifier la configuration depuis le fichier <em>.commitlintrc.cjs</em></span>
</div>
</section>
<section id="stack-accessibility">
<svg class="sg-svg sg-svg--title" id="accessibility-icon" viewbox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" overflow="hidden">
<path d="M24.84 1.52C12.02 1.34 1.74 11.86 1.76 24.5c0 12.69 10.13 22.8 22.35 22.98 12.87.2 22.98-10.26 23.1-22.64A22.89 22.89 0 0 0 24.85 1.52Zm-.34 7.94a2.6 2.6 0 0 1-.03 5.17 2.57 2.57 0 0 1-2.53-2.61 2.55 2.55 0 0 1 2.56-2.56Zm11.46 8.28-4.64.55-1.78.2c-.97.14-1.6.68-1.57 1.78.03 1.33 0 2.64.03 3.97.02 1.51.26 2.98.57 4.46.32 1.39.58 2.8.86 4.18l.87 4.13c.15.68-.19 1.3-.81 1.46-.66.18-1.23-.2-1.44-.86l-1.67-5.72-.94-3.21c-.13-.42-.44-.66-.86-.66s-.73.27-.84.68a540.54 540.54 0 0 0-2.58 8.93c-.18.66-.79 1.02-1.41.84-.63-.16-.97-.76-.81-1.44.02-.1.05-.2.05-.31.05-.13.08-.26.1-.42l.4-1.96c.26-1.25.52-2.48.75-3.7.06-.13.08-.27.1-.42l.5-2.46c.27-1.28.37-2.55.4-3.83.02-1.23 0-2.43 0-3.66 0-1.04-.53-1.64-1.57-1.78l-6.55-.78c-.5-.05-.87-.52-.84-1.04a1 1 0 0 1 1.02-.97h22.2c.22 0 .43-.03.64.03a1 1 0 0 1 .75 1.04 1.1 1.1 0 0 1-.94.97Z"></path>
</svg>
<h2>Accessibility</h2>
<div class="sg-alert sg-alert--success" role="alert">
<svg class="sg-svg" id="info-icon" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Zm-10 5.75c.41 0 .75-.34.75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .41.34.75.75.75ZM12 7a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z" clip-rule="evenodd"></path>
</svg><span class="sg-alert__content"><strong>Eslint A11y : </strong>Ajoute une couche de vérification sur le JSX pour détecter les erreurs d'accessibilité</span>
</div>
<div class="sg-alert sg-alert--success" role="alert">
<svg class="sg-svg" id="info-icon" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Zm-10 5.75c.41 0 .75-.34.75-.75v-6a.75.75 0 0 0-1.5 0v6c0 .41.34.75.75.75ZM12 7a1 1 0 1 1 0 2 1 1 0 0 1 0-2Z" clip-rule="evenodd"></path>
</svg><span class="sg-alert__content"><strong>Jest Axe : </strong>Effectue un analyse du DOM généré pour signaler les violations lors des tests.</span>
</div>
</section>
<section id="stack-test">
<svg class="sg-svg sg-svg--title" id="test-icon" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M23.45 9.76c.02.05.05.1.07.18l-.07-.18c.59 2.3-1.95 5-5.13 4.24 4.6-3.01 2.33-6.78.19-8.58-1.76-1.5-.72-1.95.02-1.95.24 0 .44.04.52.12-.02-1.44-5.07-1.11-.65 3.49 2.27 2.37-.4 7.6-3.6 3.62a.97.97 0 0 1-.07-.11c.52-.22.94-.8.94-1.76a2.38 2.38 0 0 0-.2-.98c.37-.75.7-1.65.7-2.77C16.18 2.39 14.45 0 12 0S7.82 2.4 7.82 5.08c0 1.12.34 2.02.7 2.77a2.37 2.37 0 0 0-.2.99c0 .95.43 1.54.95 1.75a.98.98 0 0 1-.08.11c-3.18 3.98-5.86-1.25-3.6-3.62 4.42-4.6-.63-4.92-.64-3.5.08-.07.28-.12.52-.12.74 0 1.78.46.02 1.95-2.13 1.8-4.38 5.54.14 8.55l.05.04C2.5 14.76-.03 12.07.55 9.76c-1.18 1.62-.61 5.78 3.77 6.17l.06.02c-4.36 1-3.05 7.02.02 6.05h-.01.01c-2.13-.35-2.29-3-1.22-3.91 1.17-1 2.52-.14 5.3-.94h.03c-.03 2.45 2.35 3.76 1.1 5.16-1.32 1.47-3.11-.1-2.86-1.55v-.03.01C5.65 22.6 7.05 24 8.61 24c.9 0 1.85-.46 2.43-1.57C12.25 20.1 8.65 16 12 16c3.34 0-.26 4.1.96 6.43A2.71 2.71 0 0 0 15.39 24c1.57 0 2.97-1.41 1.85-3.27v.02-.01c.27 1.45-1.54 3.05-2.86 1.57-1.24-1.4 1.13-2.72 1.1-5.16 2.81.81 4.16-.07 5.34.94 1.07.9.9 3.56-1.23 3.9h.01c3.07.97 4.38-5.05.02-6.05 4.44-.36 5.01-4.57 3.83-6.18zm-20.24.39C3.07 7.9 5 6.07 5.62 5.57c.84-.71 1.17-1.28 1-1.73a.8.8 0 0 0-.66-.51 1.41 1.41 0 0 0-.57.03c.17-.09.36-.13.57-.13.48 0 .87.22 1 .56.12.32.12 1.01-1.18 2.14-2.04 1.78-2.2 3.92-1.68 5.33.46 1.22 1.47 2.01 2.58 2.01.18 0 .35-.02.53-.06a3.1 3.1 0 0 1-1.41.66c-1.5-1.04-2.51-2.42-2.6-3.73zm5.2 6.87c-1.13.3-2.29.32-3.03.32-.93 0-1.66.01-2.33.6-.62.52-.88 1.59-.61 2.53.09.33.19.66.42.86.18.15.48.37.79.52h-.02l.06.03c-1-.21-1.58-1.18-1.65-2.13-.08-1.21.6-2.73 2.84-3.06.35-.05.72-.08 1.1-.11a6.13 6.13 0 0 0 2.5-.54l-.06.98zm.26-2.68c-.65 1-1.94 1.15-3.07 1.29-.32.03-.62.08-.89.13l-.35-.02c-1.8-.16-3.14-1-3.78-2.4a4.07 4.07 0 0 1-.35-2.05s.04-.38.1-.77c-.08 1.1.21 2.14.89 3a4.65 4.65 0 0 0 3.63 1.76c1.33 0 2.6-.6 3.55-1.67.33-.37.48-.4.52-.4.12.2.01.71-.25 1.13zm6.37-5.5c0 1.34-1.53 1.34-1.53 0s1.53-1.35 1.53 0zm-1.8-5.5c0 .74-1.24.74-1.24 0s1.23-.74 1.23 0zm-.26 8.16c0 .75-.06 1.35-.14 1.35s-.12-.6-.12-1.35c0-.75.06-1.36.13-1.36s.13.6.13 1.36zm-.96-1.62c.06 0 .1.73.1 1.63s-.04 1.63-.1 1.63-.1-.73-.1-1.63c0-.9.05-1.63.1-1.63zm-.19-8.2c0 .5-.85.5-.85 0s.85-.51.85 0zm-.59 4.21c0-.35.6-.35.6 0 0 .36-.6.36-.6 0zm.05 5.62c0 .77-.06 1.4-.14 1.4-.07 0-.13-.63-.13-1.4s.07-1.38.14-1.38.13.62.13 1.38zm0-7.5c0 .52-.85.52-.85 0s.85-.5.85 0zm-1.15-1.23c0 .36-.58.36-.58 0s.58-.35.58 0zm-.08 2.51c0 .26-.42.26-.42 0 0-.25.42-.25.42 0zm-1.1 3.54c0-1.34 1.53-1.34 1.53 0s-1.53 1.35-1.53 0zm5.33 9.1a10.1 10.1 0 0 1-.45 1.94c-.34 1.13-.62 2.03.25 3 .36.4.82.62 1.34.62a2.1 2.1 0 0 0 1.67-.89 1.97 1.97 0 0 0 .32-.84c.02.16.03.3.02.41a1.62 1.62 0 0 1-.2.65 2.1 2.1 0 0 1-1.85.98 2.5 2.5 0 0 1-2.25-1.46c-.48-.92-.14-2.21.17-3.35.3-1.11.57-2.07.1-2.68-.26-.34-.72-.5-1.41-.5-.7 0-1.16.16-1.42.5-.46.6-.2 1.57.1 2.68.32 1.14.66 2.43.18 3.35a2.52 2.52 0 0 1-2.25 1.46 2.1 2.1 0 0 1-1.85-.98 1.62 1.62 0 0 1-.18-1.06c.05.3.14.59.32.84.39.55 1.03.9 1.67.9.51 0 .98-.22 1.34-.63.87-.97.6-1.86.24-3-.17-.57-.36-1.2-.44-1.95-.1-.96.12-1.83.6-2.36.4-.44.97-.66 1.69-.66s1.3.22 1.69.66c.48.53.7 1.4.6 2.36zm3.03-4.66c1.1 0 2.12-.79 2.58-2.01.52-1.4.36-3.55-1.7-5.33-1.29-1.13-1.28-1.82-1.17-2.13.13-.35.52-.57 1-.57.19 0 .37.04.53.11h.01a1.47 1.47 0 0 0-.53-.01.8.8 0 0 0-.66.51c-.17.46.16 1.02 1 1.73.6.5 2.55 2.33 2.41 4.58-.08 1.3-1.1 2.68-2.6 3.72a3.07 3.07 0 0 1-1.4-.65c.17.03.35.05.53.05zm4.63 6.47c-.07.96-.65 1.93-1.64 2.14l.04-.03c.3-.15.6-.37.79-.52.23-.2.33-.53.42-.86.27-.94.01-2-.6-2.53-.68-.59-1.42-.6-2.34-.6-.74 0-1.9-.02-3.04-.32l-.05-.98c.64.38 1.59.46 2.5.54.37.03.74.06 1.1.11 2.22.33 2.91 1.85 2.82 3.05zm-2.66-3.98c-.27-.05-.57-.1-.89-.14-1.13-.13-2.42-.29-3.07-1.29-.27-.4-.38-.93-.29-1.09a.14.14 0 0 1 .05 0c.09 0 .24.07.5.37a4.74 4.74 0 0 0 3.56 1.67c1.4 0 2.77-.66 3.63-1.77.67-.85.97-1.9.88-2.99.07.4.1.77.1.77a4.07 4.07 0 0 1-.34 2.05c-.64 1.4-1.98 2.24-3.78 2.4l-.35.02zm-9.7-7.5a.24.24 0 0 1 .12.23.24.24 0 1 1-.47 0 .23.23 0 0 1 .36-.22zm4.3.45a.23.23 0 0 1-.1-.22.23.23 0 1 1 .46 0 .24.24 0 0 1-.36.22z"></path>
</svg>
<h2>Testing</h2>
<div class="sg-cards-flex">
<article class="sg-card sg-card--user fade-up"> <img class="sg-img sg-card__image" src="././assets/images/testing-library.svg" alt="testing-library.svg" loading="lazy"/>
<h3 class="sg-card__title"> Testing Library</h3>
<p class="sg-card__content"> Permet de tester le DOM et les interactions utilisateur</p>
</article>
<article class="sg-card sg-card--user fade-up"> <img class="sg-img sg-card__image" src="././assets/images/vitest.svg" alt="vitest.svg" loading="lazy"/>
<h3 class="sg-card__title"> Vitest</h3>
<p class="sg-card__content"> Pour personnaliser, modifiez le fichier vite.config.ts</p>
</article>
<article class="sg-card sg-card--user fade-up"> <img class="sg-img sg-card__image" src="././assets/images/cucumber.svg" alt="cucumber.svg" loading="lazy"/>
<h3 class="sg-card__title"> Jest Cucumber</h3>
<p class="sg-card__content"> Pour les tests d'intégration, un dossier /features contient les scénarios Gherkin</p>
</article>
<article class="sg-card sg-card--user fade-up"> <img class="sg-img sg-card__image" src="././assets/images/msw.svg" alt="msw.svg" loading="lazy"/>
<h3 class="sg-card__title"> MSW</h3>
<p class="sg-card__content"> Pour modifier les réponses d'api lors des tests : src/shared/testsUtils/msw.ts</p>
</article>
</div>
</section>
<section id="stack-fetch">
<svg class="sg-svg sg-svg--title" id="reactquery-icon" xmlns="http://www.w3.org/2000/svg" preserveaspectratio="xMidYMid" viewbox="0 0 256 230">
<path fill="#00435B" d="m157.98 142.49-4.91 8.52a8.29 8.29 0 0 1-7.18 4.16h-37.62a8.29 8.29 0 0 1-7.18-4.16l-4.91-8.52h61.8Zm13.75-23.87-8.66 15.03H91.09l-8.66-15.03h89.3Zm-8.34-23.35 8.35 14.51H82.42l8.35-14.5h72.62Zm-17.5-22.06c2.96 0 5.7 1.58 7.18 4.15l5.23 9.08H95.86l5.23-9.08a8.29 8.29 0 0 1 7.18-4.15h37.62Z"></path>
<path fill="#002B3B" d="M53.52 69.25c-4.16-20.2-5.06-35.7-2.36-46.96 1.6-6.69 4.53-12.15 8.98-16.09C64.84 2.04 70.79 0 77.46 0c11.02 0 22.6 5.03 34.99 14.57 5.04 3.9 10.29 8.59 15.73 14.08.43-.55.92-1.08 1.47-1.57 15.38-13.7 28.34-22.23 39.42-25.51 6.58-1.95 12.77-2.14 18.4-.24 5.95 2 10.68 6.13 14.03 11.93 5.51 9.56 6.97 22.12 4.91 37.63a159.64 159.64 0 0 1-4.3 20.68c.77.09 1.53.26 2.3.5 19.51 6.48 33.34 13.44 41.7 21.39 4.99 4.73 8.24 10 9.41 15.82 1.24 6.15.03 12.33-3.3 18.12-5.51 9.54-15.63 17.07-30.06 23.04a157.24 157.24 0 0 1-19.66 6.51c.33.75.6 1.56.77 2.4 4.16 20.2 5.06 35.7 2.36 46.95-1.6 6.7-4.53 12.16-8.98 16.1-4.7 4.15-10.65 6.2-17.32 6.2-11.02 0-22.6-5.03-34.99-14.57-5.1-3.94-10.4-8.7-15.9-14.26-.57.88-1.26 1.7-2.09 2.44-15.38 13.71-28.34 22.23-39.42 25.52-6.58 1.95-12.77 2.13-18.4.24-5.95-2-10.68-6.14-14.03-11.93-5.51-9.56-6.97-22.13-4.91-37.64a160.5 160.5 0 0 1 4.52-21.48c-.84-.09-1.68-.26-2.51-.54-19.52-6.47-33.35-13.43-41.72-21.38-4.98-4.73-8.23-10-9.4-15.82-1.24-6.16-.03-12.33 3.3-18.12C9.3 91.52 19.41 84 33.84 78.02a160.94 160.94 0 0 1 20.32-6.69 11.7 11.7 0 0 1-.64-2.08Z"></path>
<path fill="#fff" d="M189.65 161.33c1.94-.34 3.8.9 4.23 2.81l.03.12.2 1.07c6.71 35.28 1.99 52.91-14.18 52.91-15.81 0-35.94-15.05-60.39-45.15a3.69 3.69 0 0 1 2.78-6h1.4c10.29.06 20.29-.3 30-1.07a378.06 378.06 0 0 0 35.93-4.69Zm-111-26.66.06.1.64 1.13a358 358 0 0 0 16.18 25.63 383.02 383.02 0 0 0 22.3 28.91 3.68 3.68 0 0 1-.31 5.08l-.1.09-.83.71c-27.3 23.4-45.05 28.07-53.24 14.01-8.02-13.76-5.11-38.77 8.72-75.04a3.68 3.68 0 0 1 6.58-.62ZM203.5 82.6l.12.04 1.02.35c33.7 11.73 46.51 24.61 38.42 38.66-7.92 13.74-30.93 23.74-69.04 30a3.68 3.68 0 0 1-3.78-5.5 359.58 359.58 0 0 0 14.76-27.7 382.75 382.75 0 0 0 13.97-33.58 3.68 3.68 0 0 1 4.43-2.29l.11.03ZM84.45 76.7a3.68 3.68 0 0 1 1.3 5.04 359.58 359.58 0 0 0-14.74 27.72 382.75 382.75 0 0 0-13.97 33.57 3.68 3.68 0 0 1-4.54 2.26l-.12-.04-1.02-.35c-33.7-11.73-46.51-24.61-38.42-38.66 7.92-13.73 30.93-23.73 69.04-30 .85-.14 1.72.02 2.47.46Zm108.2-57.75c8.02 13.76 5.11 38.78-8.72 75.05a3.68 3.68 0 0 1-6.58.62l-.06-.1-.64-1.13a358 358 0 0 0-16.18-25.63 383.02 383.02 0 0 0-22.3-28.92 3.68 3.68 0 0 1 .31-5.08l.1-.08.83-.72c27.3-23.4 45.05-28.06 53.24-14ZM77.45 10.6c15.81 0 35.94 15.05 60.4 45.15a3.69 3.69 0 0 1-2.79 6h-1.4c-10.29-.06-20.29.3-30 1.07a378.06 378.06 0 0 0-35.93 4.7c-1.94.34-3.8-.9-4.23-2.82l-.02-.11-.21-1.08C56.56 28.23 61.29 10.6 77.45 10.6Z"></path>
<path fill="#fff" d="M111.3 73.67h31.57a12.9 12.9 0 0 1 11.18 6.47l15.86 27.63a12.9 12.9 0 0 1 0 12.83l-15.86 27.63a12.9 12.9 0 0 1-11.18 6.48h-31.58a12.9 12.9 0 0 1-11.18-6.48L84.26 120.6a12.9 12.9 0 0 1 0-12.83l15.85-27.63c2.3-4 6.57-6.47 11.18-6.47ZM138.05 82a12.9 12.9 0 0 1 11.18 6.48l11.06 19.29a12.9 12.9 0 0 1 0 12.82l-11.06 19.29a12.9 12.9 0 0 1-11.18 6.48H116.1a12.9 12.9 0 0 1-11.19-6.48l-11.05-19.3a12.9 12.9 0 0 1 0-12.81l11.05-19.3c2.3-4 6.57-6.47 11.19-6.47h21.95Zm-5.19 9.12H121.3a12.9 12.9 0 0 0-11.17 6.47l-5.85 10.16a12.9 12.9 0 0 0 0 12.85l5.85 10.17c2.3 4 6.56 6.47 11.17 6.47h11.58a12.9 12.9 0 0 0 11.18-6.47l5.84-10.17a12.9 12.9 0 0 0 0-12.85l-5.84-10.16a12.9 12.9 0 0 0-11.18-6.47Zm-5 8.73a12.9 12.9 0 0 1 11.18 6.46l.83 1.44a12.9 12.9 0 0 1 0 12.86l-.83 1.44a12.9 12.9 0 0 1-11.17 6.46h-1.6a12.9 12.9 0 0 1-11.16-6.46l-.83-1.44a12.9 12.9 0 0 1 0-12.86l.83-1.44c2.3-4 6.56-6.46 11.17-6.46h1.59Zm-.79 8.6a5.74 5.74 0 1 0 0 11.46 5.74 5.74 0 1 0 0-11.47Zm-46.5 5.73H90.9"></path>
</svg>
<h2>React Query</h2>
<p> <a href="https://tanstack.com/query/latest/docs/react/quick-start" target="blank">React Query</a> permet de faciliter la synchronisation entre le front et le back et offre des fonctionnalités qui facilitent la vie du développeur et améliorent l’expérience utilisateur. </p>
<article class="sg-youtube">
<iframe width="560" height="315" src="https://www.youtube.com/embed/38wJmjeJNAk?si=hZqYmIzlo190iTfq" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></iframe>
<iframe width="560" height="315" src="https://www.youtube.com/embed/r8Dg0KVnfMA?si=gVroT_roo18l1Qlg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></iframe>
</article>
</section>
<section id="stack-form">
<svg class="sg-svg sg-svg--title" id="reacthookform-icon" xmlns="http://www.w3.org/2000/svg" preserveaspectratio="xMidYMid" viewbox="0 0 203 202">
<path fill="#fff" stroke="#002B3B" stroke-width="17" d="M158 8.5c10.08 0 19.2 4.09 25.8 10.7s10.7 15.72 10.7 25.8v112c0 10.08-4.09 19.2-10.7 25.8a36.39 36.39 0 0 1-25.8 10.7H45c-10.07 0-19.2-4.09-25.8-10.7S8.5 167.09 8.5 157V45c0-10.08 4.09-19.2 10.7-25.8A36.39 36.39 0 0 1 45 8.5z"></path>
<path fill="#002B3B" d="M133.38 51.6h-20.86c-1.53-4.76-5.98-8-11.01-8s-9.48 3.24-11.01 8H69.62a14.85 14.85 0 0 0-14.9 14.82v77.17c0 8.18 6.67 14.82 14.9 14.82h63.76c8.23 0 14.9-6.64 14.9-14.82V66.42c0-8.18-6.67-14.82-14.9-14.82zm-41.84 2.7a1.35 1.35 0 0 0 1.35-1.07 8.85 8.85 0 0 1 17.3 0 1.35 1.35 0 0 0 1.35 1.07h7.28v8.82a4.05 4.05 0 0 1-4.06 4.04H88.31a4.05 4.05 0 0 1-4.06-4.04V54.3h7.29zm54.02 89.3c0 6.69-5.45 12.11-12.18 12.11H69.63a12.15 12.15 0 0 1-12.18-12.12V66.42c0-6.7 5.45-12.12 12.18-12.12h11.92v8.82a6.75 6.75 0 0 0 6.77 6.73h26.39a6.75 6.75 0 0 0 6.76-6.73V54.3h11.93c6.72 0 12.18 5.42 12.18 12.12v77.17zm-14.83-48h-23.82a1.35 1.35 0 0 0-1.35 1.35 1.35 1.35 0 0 0 1.35 1.35h23.82a1.35 1.35 0 0 0 1.36-1.35 1.35 1.35 0 0 0-1.36-1.35zm-35.18 0H71.73a1.35 1.35 0 0 0-1.36 1.35 1.35 1.35 0 0 0 1.36 1.35h23.82a1.35 1.35 0 0 0 1.35-1.35 1.35 1.35 0 0 0-1.35-1.35zm35.25 32.6h-23.89a1.35 1.35 0 0 0-1.35 1.34 1.35 1.35 0 0 0 1.35 1.35h23.89a1.35 1.35 0 0 0 1.35-1.35 1.35 1.35 0 0 0-1.35-1.35zm-35.19 0H71.73a1.35 1.35 0 0 0-1.36 1.34 1.35 1.35 0 0 0 1.36 1.35H95.6a1.35 1.35 0 0 0 1.36-1.35 1.35 1.35 0 0 0-1.36-1.35z"></path>
</svg>
<h2>React Hook Form</h2>
<p> <a href="https://react-hook-form.com/get-started" target="blank">React Hook Form</a> permet de gérer l'état et la validation des formulaires de manière performante et simple. </p>
<article class="sg-youtube">
<iframe width="560" height="315" src="https://www.youtube.com/embed/Ipgf8PLRmY8?si=4Nf9XzKCPLUrYaFL" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></iframe>
</article>
</section>
<section id="stack-router">
<svg class="sg-svg sg-svg--title" id="reactrouter-icon" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 94 61">
<path d="M72.73 20.94c-2.68-.85-4.06-.56-6.87-.87-4.34-.47-6.06-2.17-6.8-6.53-.4-2.44.08-6.01-.97-8.22-2-4.21-6.7-6.1-11.4-5.02a10.11 10.11 0 0 0-7.48 8.97 9.67 9.67 0 0 0 7 10c2.17.66 4.47.98 6.73 1.15 4.15.3 4.47 2.61 5.6 4.5.7 1.2 1.39 2.38 1.39 5.95 0 3.57-.7 4.75-1.4 5.95-1.12 1.89-2.5 3.13-6.65 3.44-2.26.16-4.57.5-6.73 1.14a9.68 9.68 0 0 0-7 10.01 10.1 10.1 0 0 0 7.47 8.97c4.7 1.08 9.4-.81 11.4-5.02a27.23 27.23 0 0 0 2.04-7.15c.74-4.37 2.47-6.06 6.8-6.54 2.81-.3 5.72 0 8.35-1.5 2.78-2.02 5.26-5.07 5.26-9.3 0-4.22-2.67-8.65-6.74-9.93ZM28.2 40.77a9.96 9.96 0 0 1 0-19.9 9.96 9.96 0 0 1 0 19.9ZM9.9 61a9.96 9.96 0 0 1 .07-19.9A9.96 9.96 0 0 1 9.9 61Zm73.81 0a9.97 9.97 0 0 1-10-9.88 9.97 9.97 0 0 1 9.85-10.03 9.97 9.97 0 0 1 10.01 9.88c.03 5.49-4.4 10-9.86 10.03Z"></path>
</svg>
<h2>React Router</h2>
<p> <a href="https://reactrouter.com/en/main" target="blank">React Router</a> est une librairie de routing basée sur la déclaration de routes <br>(contrairement à NextJS qui se base sur le file system)</p>
<article class="sg-youtube">
<iframe width="560" height="315" src="https://www.youtube.com/embed/Ul3y1LXxzdU?si=ha-jtXHg-ESh84iE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen=""></iframe>
</article>
</section>
</section>
<section class="sg-playground" id="playground" data-background="" data-background-transition="fade">
<section class="sg-playground-link" id="playground-link" data-background="./assets/images/playground.png" data-background-transition="fade">
<h1>Playground</h1><a href="https://react-starter-vitejs.netlify.app/" target="blank">Lien vers le playground</a>
</section>
<section class="sg-playground-reveal" id="playground-reveal" data-background="" data-background-transition="fade" data-background-iframe="https://react-starter-vitejs.netlify.app/" data-background-interactive="data-background-interactive">
</section>
</section>
<section class="sg-structure" id="structure" data-background="" data-background-transition="fade">
<h1>Structure</h1>
<div class="sg-tree">
<details class="sg-tree-item">
<summary> <span>App</span></summary>
<div class="sg-tree-item__content">C'est le core du starter, on va y trouver les providers communs ainsi que les routes</div>
<div class="sg-tree-sub">
<details class="sg-tree-item">
<summary> <span>EnvironmentProvider</span></summary>
<div class="sg-tree-item__content">Provider permettant de récupérer les variables d'environnement. Il récupère la configuration dans les fichiers du dossier /public.</div>
</details>
<details class="sg-tree-item">
<summary> <span>Authentication</span></summary>
<div class="sg-tree-item__content">Composant permettant de désactiver l'OIDC. si l'OIDC est activé, il utilise l'OidcProvider</div>
</details>
<details class="sg-tree-item">
<summary> <span>UserProvider</span></summary>
<div class="sg-tree-item__content">Provider permettant de récupérer les infos utilisateur de l'OIDC</div>
</details>
<details class="sg-tree-item">
<summary> <span>FetchProvider</span></summary>
<div class="sg-tree-item__content">Provider permettant de customiser le fetch (fetchCustom) en fonction de l'environnment et des infos de connexion OIDC (bearer) pour toute l'application.</div>
</details>
<details class="sg-tree-item">
<summary> <span>QueryProvider</span></summary>
<div class="sg-tree-item__content">Ce provider instancie React Query en se basant sur le fetchCustom.</div>
</details>
<details class="sg-tree-item">
<summary> <span>NotificationProvider</span></summary>
<div class="sg-tree-item__content">Ce provider permet de déclencher des notifications dans l'application</div>
</details>
<details class="sg-tree-item">
<summary> <span>Routes</span></summary>
<div class="sg-tree-item__content">Ce composant sert à gérer les routes de l'application. Celles-ci sont chargées en lazy afin d'optimiser le bundle des pages. </div>
<div class="sg-tree-sub">
<details class="sg-tree-item">
<summary> <span>RouteSecure</span></summary>
<div class="sg-tree-item__content">Ce composant permet de protéger une ou plusieurs routes par authentification. Il suffit de wrapper les routes souhaitées par ce composant. Il va véfifier dans le userContext si le role est autorisé à voir la page.</div>
</details>
</div>
</details>
</div>
</details>
<details class="sg-tree-item">
<summary> <span>Layout</span></summary>
<div class="sg-tree-item__content">Ce composant permet d'obtenir un template de page commun et personnalisable. <br/>
Des propriétés permettent de masquer certaines parties comme le Header ou le Footer.</div>
<div class="sg-tree-sub">
<details class="sg-tree-item">
<summary> <span>A11yMenu</span></summary>
<div class="sg-tree-item__content">Menu d'accès rapide, il est personnalisable depuis la page courante. (Accessibilité)</div>
</details>
<details class="sg-tree-item">
<summary> <span>Header</span></summary>
<div class="sg-tree-item__content">Entete de l'application, il est basé sur les composants du Toolkit. Les infos utilisateurs sont récupérées depuis le contexte.</div>
</details>
<details class="sg-tree-item">
<summary> <span>Footer</span></summary>
<div class="sg-tree-item__content">Footer de l'application, il est basé sur les composants du Toolkit. La version est récupérée depuis le package.json.</div>
</details>
<details class="sg-tree-item">
<summary> <span>Menu</span></summary>
<div class="sg-tree-item__content">Menu de l'application, il est basé sur les composants Navbar du Toolkit. Utilisable au clavier.</div>
</details>
<details class="sg-tree-item">
<summary> <span>TitleBar</span></summary>
<div class="sg-tree-item__content">Ce composant doit servir à situer l'utilisateur dans sa navigation (comme un fil d'ariane)</div>
</details>
</div>
</details>
<details class="sg-tree-item">
<summary> <span>pages</span></summary>
<div class="sg-tree-item__content">C'est dans ce dossier que l'on va mettre les composants de page. D'une manière générale, la structure des dossiers doit refléter la structure de votre page.</div>
<div class="sg-tree-sub">
<details class="sg-tree-item">
<summary> <span>Home</span></summary>
<div class="sg-tree-item__content">Page d'accueil de l'application</div>
</details>
<details class="sg-tree-item">
<summary> <span>NotFound</span></summary>
<div class="sg-tree-item__content">Page 404 introuvable, basée sur le composant ResiliencePage</div>
</details>
<details class="sg-tree-item">
<summary> <span>Unauthorize</span></summary>
<div class="sg-tree-item__content">Page 403 non autorisée, basée sur le composant ResiliencePage</div>
</details>
</div>
</details>
<details class="sg-tree-item">
<summary> <span>shared</span></summary>
<div class="sg-tree-item__content">C'est dans ce dossier que l'on va mettre tout ce qui est commun au projet.</div>
<div class="sg-tree-sub">
<details class="sg-tree-item">
<summary> <span>components</span></summary>
<div class="sg-tree-item__content">C'est dans ce dossier que l'on va mettre tous les composants partagés.</div>
<div class="sg-tree-sub">
<details class="sg-tree-item">
<summary> <span>Authorize</span></summary>
<div class="sg-tree-item__content">Permet de rendre n'importe quel composant visible selon les profils autorisés.</div>
</details>
<details class="sg-tree-item">
<summary> <span>form</span></summary>
<div class="sg-tree-item__content">Dossier contenant les champs de formulaire gérés par React Hook Form et basés sur les composants du Toolkit.</div>
</details>
<details class="sg-tree-item">
<summary> <span>Grid</span></summary>
<div class="sg-tree-item__content">Composants permettant d'utiliser les grilles de Boostraps.</div>
</details>
<details class="sg-tree-item">
<summary> <span>HelpInfo</span></summary>
<div class="sg-tree-item__content">Composant permettant d'ajouter un Tooltip sur n'importe quel composant.</div>
</details>
<details class="sg-tree-item">
<summary> <span>Icon</span></summary>
<div class="sg-tree-item__content">Composant générique pour créer un svg avec un path. <em>(déprécié)</em></div>
</details>
<details class="sg-tree-item">
<summary> <span>Loader</span></summary>
<div class="sg-tree-item__content">Composant apportant des corrections sur celui du Toolkit<em>(amené à être réintégré au Toolkit)</em></div>
</details>
<details class="sg-tree-item">
<summary> <span>ModalCommon</span></summary>
<div class="sg-tree-item__content">Composant haut niveau basé sur le composant Modal du Toolkit.</div>
</details>
<details class="sg-tree-item">
<summary> <span>Resilience</span></summary>
<div class="sg-tree-item__content">Composant wrapper qui peut être utilisé pour des appels asynchrones. <br/>
L'idée est d'afficher automatiquement un message d'alert ou un autre composant de fallback selon les réponses de l'API (200,404,500,...)</div>
</details>
<details class="sg-tree-item">
<summary> <span>ResiliencePage</span></summary>
<div class="sg-tree-item__content">Composant template pour les pages comme les 404, 403, ...</div>
</details>
<details class="sg-tree-item">
<summary> <span>Skeleton</span></summary>
<div class="sg-tree-item__content">Composant loader au style skeleton qui permet d'indiquer à l'utilisateur qu'une partie de l'application se charge sans devoir mettre un loader sur toute la page.</div>
</details>
<details class="sg-tree-item">
<summary> <span>SkeletonInputField</span></summary>
<div class="sg-tree-item__content">Composant loader au style skeleton adapté aux champs de formulaire.</div>
</details>
<details class="sg-tree-item">
<summary> <span>Table</span></summary>
<div class="sg-tree-item__content">Composant de plus haut niveau basé sur le Table du Toolkit. Il propose de base, du tri, de la pagination et des tooltips sur les cellules.</div>
</details>
</div>
</details>
<details class="sg-tree-item">
<summary> <span>helpers</span></summary>
<div class="sg-tree-item__content">Dossier contenant des fonctions utilitaire javascript</div>
</details>
<details class="sg-tree-item">
<summary> <span>hoc</span></summary>
<div class="sg-tree-item__content">Dossier contenant des HOC</div>
</details>
<details class="sg-tree-item">
<summary> <span>scss</span></summary>
<div class="sg-tree-item__content">Dossier contenant du style pour le projet (grilles bootstrap, reset, variables, custom, mixins, keyframes)</div>
</details>
<details class="sg-tree-item">
<summary> <span>testsUtils</span></summary>
<div class="sg-tree-item__content">Dossier contenant des utilitaires pour les tests comme un renderCustom pour adapter les contextes selon ses besoins, les endpoints pour MSW ou des scénarios type.</div>
</details>
</div>
</details>
</div>
</section>
<section class="sg-get-started" id="get-started" data-background="" data-background-transition="fade">
<section class="sg-get-started-intro" id="get-started-intro" data-background="" data-background-transition="fade">
<h1>Get Started </h1>
<p>
Nous allons maintenant passer à la pratique. <br>Veuillez utiliser la navigation vers le bas pour suivre les étapes.</p>
<svg class="sg-img--go-down" id="go-down" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewbox="0 0 100 100">
<path d="M42.2 5.6v-.2 66.9l-21.1-21a5.52 5.52 0 0 0-7.8 0L10 54.6a5.52 5.52 0 0 0 0 7.8l36.1 36.1a5.52 5.52 0 0 0 7.8 0L90 62.4a5.52 5.52 0 0 0 0-7.8l-3.3-3.3c-1-1-2.4-1.6-3.9-1.6s-2.8.6-3.8 1.6L57.8 72.6V5.5c0-3-2.6-5.5-5.6-5.5h-4.6c-3 0-5.4 2.6-5.4 5.6z"></path>
</svg>
</section>
<section class="sg-get-started-clone" id="get-started-clone" data-background="" data-background-transition="fade">
<h2>Clone du projet</h2>
<p>Vous pouvez cloner le projet de la démo depuis l'url ci-dessous :</p>
<pre><code class="language-shell">https://github.com/samuel-gomez/react-starter-vitejs.git</code></pre>
</section>
<section class="sg-get-started-clean" id="get-started-clean" data-background="" data-background-transition="fade">
<h2>Clean du projet</h2>
<p>Il faut ensuite nettoyer les éléments de la démo</p>
<pre><code class="language-shell">npm run clean</code></pre>
</section>
<section class="sg-get-started-install" id="get-started-install" data-background="" data-background-transition="fade">
<h2>Installation</h2>
<p>Vous pouvez maintenant effectuer l'installation</p>
<pre><code class="language-shell">npm i</code></pre>
</section>
<section class="sg-get-started-launch" id="get-started-launch" data-background="" data-background-transition="fade">
<h2>Démarrer le projet</h2>
<p>
Vous pouvez lancer le projet en saisissant la commande suivante.</p>
<pre><code class="language-shell">npm start</code></pre>
<p> Le projet va démarrer à l'adresse : <a href="http://localhost:3000" target="blank">http://localhost:3000</a></p>
</section>
</section>
<section class="sg-exo1" id="exo1" data-background="" data-background-transition="fade">
<section class="sg-exo1-intro" id="exo1-intro" data-background="" data-background-transition="fade">
<h1>Exo 1 : page liste </h1>
<p>
Commençons par créer une nouvelle page<br>Dans le dossier /pages, créez un nouveau dossier /People<br>le but sera de récupérer les données d'une API et de les afficher dans un tableau</p>
</section>
<section class="sg-exo1-page" id="exo1-page" data-background="" data-background-transition="fade">
<h2>Création de la page</h2><span class="file">src/pages/People/index.ts</span>
<pre><code class="language-javascript sg-code js-code" data-trim="data-trim" data-line-numbers="" data-ln-start-from="">export { default } from './People';</code>
<textarea class="sg-code-input">export { default } from './People';</textarea></pre><span class="file">src/pages/People/People.tsx </span>
<pre><code class="language-javascript sg-code js-code" data-trim="data-trim" data-line-numbers="" data-ln-start-from="">import { TITLE_BAR, TITLE } from './constants';
const People = () => (
<p>Ma page people</p>
);
export default People;</code>
<textarea class="sg-code-input">import { TITLE_BAR, TITLE } from './constants';
const People = () => (
<p>Ma page people</p>
);
export default People;</textarea></pre>
</section>
<section class="sg-exo1-layout" id="exo1-layout" data-background="" data-background-transition="fade">
<h2>Ajouter le layout </h2><span class="file">src/pages/People/constants.ts</span>
<pre><code class="language-javascript sg-code js-code" data-trim="data-trim" data-line-numbers="" data-ln-start-from="">export const TITLE_BAR = 'Liste des gens';
export const TITLE = 'Tableau des gens';
export const ROUTE_URL_PEOPLE = 'people';</code>
<textarea class="sg-code-input">export const TITLE_BAR = 'Liste des gens';
export const TITLE = 'Tableau des gens';
export const ROUTE_URL_PEOPLE = 'people';</textarea></pre><span class="file">src/pages/People/People.tsx</span>
<pre class="code-wrapper--notes">
<div class="sg-notes">
<div class="sg-note fragment fade-in-then-out" style="top: 10px"><span class="sg-note__content">on importe le Composant Layout</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 33.5px"><span class="sg-note__content">on importe les constantes</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 80.5px"><span class="sg-note__content">On définit le type du Composant People</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 127.5px"><span class="sg-note__content">On met à jour les props du Composant People</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 151px"><span class="sg-note__content">Composant Layout avec les propriétés propsTitle</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 174.5px"><span class="sg-note__content">On ajoute un titre </span></div>
</div><code class="language-javascript sg-code js-code" data-trim="data-trim" data-line-numbers="1,2,4,6,7,8" data-ln-start-from="">import Layout, { type TLayoutPage } from 'Layout';
import { TITLE_BAR, TITLE } from './constants';
export type TPeople = TLayoutPage;
const People = ({ titleBar = TITLE_BAR, title = TITLE }: TPeople) => (
<Layout propsTitle={{ title: titleBar, backHome: true }}>
<h2 className="af-title--content">{title}</h2>
<p>Ma page people</p>
</Layout>
);
export default People;</code>
<textarea class="sg-code-input">import Layout, { type TLayoutPage } from 'Layout';
import { TITLE_BAR, TITLE } from './constants';
export type TPeople = TLayoutPage;
const People = ({ titleBar = TITLE_BAR, title = TITLE }: TPeople) => (
<Layout propsTitle={{ title: titleBar, backHome: true }}>
<h2 className="af-title--content">{title}</h2>
<p>Ma page people</p>
</Layout>
);
export default People;</textarea></pre>
</section>
<section class="sg-exo1-route" id="exo1-route" data-background="" data-background-transition="fade">
<h2>Ajouter la route</h2><span class="file">src/App/Routes/constants.ts </span>
<pre class="code-wrapper--notes">
<div class="sg-notes">
<div class="sg-note fragment fade-in-then-out" style="top: 33.5px"><span class="sg-note__content">on importe la route depuis le Composant People</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 127.5px"><span class="sg-note__content">On réexporte pour centraliser les routes</span></div>
</div><code class="language-javascript sg-code js-code" data-trim="data-trim" data-line-numbers="2,6" data-ln-start-from="">import { ROUTE_URL_UNAUTHORIZE as UNAUTHORIZE } from 'pages/Unauthorize/constants';
import { ROUTE_URL_PEOPLE as PEOPLE } from 'pages/People/constants';
const ROUTE_URLS = {
HOME,
PEOPLE,
...
};
export default ROUTE_URLS;</code>
<textarea class="sg-code-input">import { ROUTE_URL_UNAUTHORIZE as UNAUTHORIZE } from 'pages/Unauthorize/constants';
import { ROUTE_URL_PEOPLE as PEOPLE } from 'pages/People/constants';
const ROUTE_URLS = {
HOME,
PEOPLE,
...
};
export default ROUTE_URLS;</textarea></pre><span class="file">src/App/Routes/Routes.tsx </span>
<pre class="code-wrapper--notes">
<div class="sg-notes">
<div class="sg-note fragment fade-in-then-out" style="top: 33.5px"><span class="sg-note__content">on importe le Composant People</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 174.5px"><span class="sg-note__content">On ajoute la route dans le Router</span></div>
</div><code class="language-javascript sg-code js-code" data-trim="data-trim" data-line-numbers="2,8" data-ln-start-from="">const PageNotFound = lazy(() => import('pages/NotFound'));
const PagePeople = lazy(() => import('pages/People'));
...
<Routes>
<Route element={<RouteSecureCmpt />}>
<Route index path={ROUTE_URLS.HOME} element={<Home />} />
</Route>
<Route index path={ROUTE_URLS.PEOPLE} element={<PagePeople />} />
...
</code>
<textarea class="sg-code-input">const PageNotFound = lazy(() => import('pages/NotFound'));
const PagePeople = lazy(() => import('pages/People'));
...
<Routes>
<Route element={<RouteSecureCmpt />}>
<Route index path={ROUTE_URLS.HOME} element={<Home />} />
</Route>
<Route index path={ROUTE_URLS.PEOPLE} element={<PagePeople />} />
...
</textarea></pre>
</section>
<section class="sg-exo1-link" id="exo1-link" data-background="" data-background-transition="fade">
<h2>Ajouter un lien dans le menu </h2><span class="file">src/Layout/Menu/constants.ts </span>
<pre class="code-wrapper--notes">
<div class="sg-notes">
<div class="sg-note" style="top: 268.5px"><span class="sg-note__content">On ajoute le lien dans le menu</span></div>
</div><code class="language-javascript sg-code js-code" data-trim="data-trim" data-line-numbers="10-13" data-ln-start-from="">import ROUTE_URL from 'App/Routes/constants';
export const CLASS_BODY_MENU_OPEN = 'af-menu-open';
const MENU_ITEMS = [
{
label: 'Accueil',
url: ROUTE_URL.HOME,
},
{
label: 'People',
url: `/${ROUTE_URL.PEOPLE}`,
},
];
export default MENU_ITEMS;
</code>
<textarea class="sg-code-input">import ROUTE_URL from 'App/Routes/constants';
export const CLASS_BODY_MENU_OPEN = 'af-menu-open';
const MENU_ITEMS = [
{
label: 'Accueil',
url: ROUTE_URL.HOME,
},
{
label: 'People',
url: `/${ROUTE_URL.PEOPLE}`,
},
];
export default MENU_ITEMS;
</textarea></pre>
</section>
<section class="sg-exo1-feature" id="exo1-feature" data-background="" data-background-transition="fade">
<h2>Ajouter le scénario de test</h2><span class="file">Feature/People/People.feature</span>
<pre> <code class="gherkin sg-code js-code" data-trim="data-trim" data-line-numbers="" data-ln-start-from="">Feature: Page People
En tant que profil autorisé, je souhaite pouvoir afficher la page People
@RG1
Scenario Outline: Affichage de la page People
Given Je suis un utilisateur connu et connecté avec le profil "<profil>"
When J'accède à la page People
Then un titre "Tableau des gens" est visible
Examples:
| profil |
| Admin |
| User |
</code>
<textarea class="sg-code-input">Feature: Page People
En tant que profil autorisé, je souhaite pouvoir afficher la page People
@RG1
Scenario Outline: Affichage de la page People
Given Je suis un utilisateur connu et connecté avec le profil "<profil>"
When J'accède à la page People
Then un titre "Tableau des gens" est visible
Examples:
| profil |
| Admin |
| User |
</textarea></pre>
</section>
<section class="sg-exo1-cucumber" id="exo1-cucumber" data-background="" data-background-transition="fade" data-auto-animate="data-auto-animate">
<h2>Ajouter le fichier de test </h2><span class="file">src/pages/People/__tests__/People.spec.tsx </span>
<pre class="code-wrapper--notes" data-id="code-animation">
<div class="sg-notes">
<div class="sg-note fragment fade-in-then-out" style="top: 10px"><span class="sg-note__content">On importe Jest Cucumber</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 33.5px"><span class="sg-note__content">On importe "configure" de Testing Library via le customRender</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 57px"><span class="sg-note__content">On inclut les éléments cachés pour l'accessibilité (<a target="blank" href="https://testing-library.com/docs/queries/byrole#hidden" >doc</a>)</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 127.5px"><span class="sg-note__content">On importe le fichier People.feature</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 174.5px"><span class="sg-note__content">On pose le test à vide</span></div>
</div><code class="language-javascript sg-code js-code" data-trim="data-trim" data-line-numbers="" data-ln-start-from="">import { defineFeature, loadFeature } from 'jest-cucumber';
import { configure } from 'shared/testsUtils/customRender';
configure({ defaultHidden: true });
const feature = loadFeature('features/People/People.feature');
defineFeature(feature, test => {
test('Affichage de la page People', ({ given, and, when, then }) => {});
});
</code>
<textarea class="sg-code-input">import { defineFeature, loadFeature } from 'jest-cucumber';
import { configure } from 'shared/testsUtils/customRender';
configure({ defaultHidden: true });
const feature = loadFeature('features/People/People.feature');
defineFeature(feature, test => {
test('Affichage de la page People', ({ given, and, when, then }) => {});
});
</textarea></pre>
</section>
<section class="sg-exo1-cucumber-2" id="exo1-cucumber-2" data-background="" data-background-transition="fade" data-auto-animate="data-auto-animate">
<h2>Générer le test</h2><span class="file">Lancer la commande suivante :</span>
<pre> <code class="language-javascript sg-code js-code" data-trim="data-trim" data-ln-start-from="">npm t People.spec.tsx</code>
<textarea class="sg-code-input">npm t People.spec.tsx</textarea></pre><span class="file">Récupérez le code généré dans le terminal</span><br><img class="sg-img " src="././assets/images/guerkin-test-fail.jpg" alt="gherkin test fail" loading="lazy"/><br><span class="file">src/pages/People/__tests__/People.spec.tsx </span>
<pre data-id="code-animation"> <code class="language-javascript sg-code js-code" data-trim="data-trim" data-line-numbers="3-5" data-ln-start-from="">defineFeature(feature, test => {
test('Affichage de la page People', ({ given, when, then }) => {
given(/^Je suis un utilisateur connu et connecté avec le profil (.*)$/, arg0 => {});
when("J'accède à la page People", () => {});
then(/^un titre "(.*)" est visible$/, arg0 => {});
});
});
</code>
<textarea class="sg-code-input">defineFeature(feature, test => {
test('Affichage de la page People', ({ given, when, then }) => {
given(/^Je suis un utilisateur connu et connecté avec le profil (.*)$/, arg0 => {});
when("J'accède à la page People", () => {});
then(/^un titre "(.*)" est visible$/, arg0 => {});
});
});
</textarea></pre>
</section>
<section class="sg-exo1-cucumber-3" id="exo1-cucumber-3" data-background="" data-background-transition="fade" data-auto-animate="data-auto-animate">
<h2>Modifier le test</h2><span class="file">src/pages/People/__tests__/People.spec.tsx</span>
<pre class="code-wrapper--notes" data-id="code-animation">
<div class="sg-notes">
<div class="sg-note fragment fade-in-then-out" style="top: 33.5px"><span class="sg-note__content">On importe "render" et "screen" de Testing Library</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 57px"><span class="sg-note__content">On importe les scénarios type</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 80.5px"><span class="sg-note__content">On importe notre composant de page</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 221.5px"><span class="sg-note__content">On mocke le role depuis les valeurs du scénario</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 315.5px"><span class="sg-note__content">On rend la page avec le rôle défini</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 339px"><span class="sg-note__content">On vérifie le nom de l'utilisateur</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 386px"><span class="sg-note__content">On vérifie la présence du titre de niveau 2</span></div>
</div><code class="language-javascript sg-code sg-code--no-max-height js-code js-code--no-max-height" data-trim="data-trim" data-line-numbers="2-4, 7, 10-17" data-ln-start-from="">...
import { configure, render, screen } from 'shared/testsUtils/customRender';
import { JeSuisUnUtilisateurConnuEtConnecteAvecleProfil, UnTitreEstVisible } from 'shared/testsUtils/sharedScenarios';
import People from '..';
...
defineFeature(feature, test => {
let role: string;
test('Affichage de la page People', ({ given, when, then }) => {
JeSuisUnUtilisateurConnuEtConnecteAvecleProfil(given, (roleMock: string) => {
role = roleMock;
});
when("J'accède à la page People", async () => {
render(<People />, {}, { role });
expect(await screen.findByText('Samuel Gomez')).toBeInTheDocument();
});
UnTitreEstVisible(then,2);
});
});</code>
<textarea class="sg-code-input">...
import { configure, render, screen } from 'shared/testsUtils/customRender';
import { JeSuisUnUtilisateurConnuEtConnecteAvecleProfil, UnTitreEstVisible } from 'shared/testsUtils/sharedScenarios';
import People from '..';
...
defineFeature(feature, test => {
let role: string;
test('Affichage de la page People', ({ given, when, then }) => {
JeSuisUnUtilisateurConnuEtConnecteAvecleProfil(given, (roleMock: string) => {
role = roleMock;
});
when("J'accède à la page People", async () => {
render(<People />, {}, { role });
expect(await screen.findByText('Samuel Gomez')).toBeInTheDocument();
});
UnTitreEstVisible(then,2);
});
});</textarea></pre>
</section>
<section class="sg-exo1-cucumber-4" id="exo1-cucumber-4" data-background="" data-background-transition="fade" data-auto-animate="data-auto-animate">
<h2>Modifier le scénario</h2><span class="file">Feature/People/People.feature </span>
<pre class="code-wrapper--notes" data-id="code-animation">
<div class="sg-notes">
<div class="sg-note fragment fade-in-then-out" style="top: 33.5px"><span class="sg-note__content">On définie les données reçues via l'api que l'on va fournir à MSW</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 221.5px"><span class="sg-note__content">On vérifie la présence du tableau</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 245px"><span class="sg-note__content">On vérifie les entêtes du tableau</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 268.5px"><span class="sg-note__content">On vérifie le contenu du tableau</span></div>
</div><code class="gherkin sg-code sg-code--no-max-height js-code js-code--no-max-height" data-trim="data-trim" data-line-numbers="2-7,10-17" data-ln-start-from="">Given Je suis un utilisateur connu et connecté avec le profil "<profil>"
And la page reçoit les données suivantes
| _id | firstname | lastname | birthDate | photo | entity | manager | managerId |
| 1 | Samuel | Gomez | 1983-10-20T00:00:00 | https://randomuser.me/portraits/men/34.jpg | BIOSPAN | Sophie | 4 |
| 2 | John | Doe | 1978-10-20T00:00:00 | https://randomuser.me/portraits/men/34.jpg | PEARLESSA | Sophie | 4 |
| 3 | Guillaume | Chervet | 1985-10-20T00:00:00 | https://randomuser.me/portraits/men/34.jpg | CIRCUM | Sophie | 4 |
| 4 | Sophie | Danneels | 1992-10-20T00:00:00 | https://randomuser.me/portraits/women/85.jpg | TRIPSCH | | |
When J'accède à la page People
Then un titre "Tableau des gens" est visible
And la page contient un tableau répertoriant la liste des gens
And le tableau présente des entêtes de colonnes dans l’ordre suivant : "Prénom", "Nom", "Date de naissance", "Entité"
And le tableau contient 4 lignes avec 4 colonnes dans l'ordre suivant :
| firstname | lastname | birthdate | entity |
| Samuel | Gomez | 20/10/1983 | BIOSPAN |
| John | Doe | 20/10/1978 | PEARLESSA |
| Guillaume | Chervet | 20/10/1985 | CIRCUM |
| Sophie | Danneels | 20/10/1992 | TRIPSCH |
</code>
<textarea class="sg-code-input">Given Je suis un utilisateur connu et connecté avec le profil "<profil>"
And la page reçoit les données suivantes
| _id | firstname | lastname | birthDate | photo | entity | manager | managerId |
| 1 | Samuel | Gomez | 1983-10-20T00:00:00 | https://randomuser.me/portraits/men/34.jpg | BIOSPAN | Sophie | 4 |
| 2 | John | Doe | 1978-10-20T00:00:00 | https://randomuser.me/portraits/men/34.jpg | PEARLESSA | Sophie | 4 |
| 3 | Guillaume | Chervet | 1985-10-20T00:00:00 | https://randomuser.me/portraits/men/34.jpg | CIRCUM | Sophie | 4 |
| 4 | Sophie | Danneels | 1992-10-20T00:00:00 | https://randomuser.me/portraits/women/85.jpg | TRIPSCH | | |
When J'accède à la page People
Then un titre "Tableau des gens" est visible
And la page contient un tableau répertoriant la liste des gens
And le tableau présente des entêtes de colonnes dans l’ordre suivant : "Prénom", "Nom", "Date de naissance", "Entité"
And le tableau contient 4 lignes avec 4 colonnes dans l'ordre suivant :
| firstname | lastname | birthdate | entity |
| Samuel | Gomez | 20/10/1983 | BIOSPAN |
| John | Doe | 20/10/1978 | PEARLESSA |
| Guillaume | Chervet | 20/10/1985 | CIRCUM |
| Sophie | Danneels | 20/10/1992 | TRIPSCH |
</textarea></pre>
</section>
<section class="sg-exo1-cucumber-5" id="exo1-cucumber-5" data-background="" data-background-transition="fade" data-auto-animate="data-auto-animate">
<h2>Modifier le fichier de test</h2>
<pre> <code class="language-javascript sg-code sg-code--no-max-height js-code js-code--no-max-height" data-trim="data-trim" data-ln-start-from="">npm t People.spec.tsx</code>
<textarea class="sg-code-input">npm t People.spec.tsx</textarea></pre><span class="file">src/pages/People/__tests__/People.spec.tsx</span>
<pre data-id="code-animation"> <code class="language-javascript sg-code sg-code--no-max-height js-code js-code--no-max-height" data-trim="data-trim" data-line-numbers="1,5, 11-13" data-ln-start-from="">test('Affichage de la page People', ({ given, when, then, and }) => {
JeSuisUnUtilisateurConnuEtConnecteAvecleProfil(given, (roleMock: string) => {
role = roleMock;
});
and('la page reçoit les données suivantes', table => {});
when("J'accède à la page People", async () => {
render(<People />, {}, { role });
expect(await screen.findByText('Samuel Gomez')).toBeInTheDocument();
});
UnTitreEstVisible(then,2);
and('la page contient un tableau répertoriant la liste des gens', () => {});
and(/^le tableau présente des entêtes de colonnes dans l’ordre suivant : "(.*)", "(.*)", "(.*)", "(.*)"$/, (arg0, arg1, arg2, arg3) => {});
and(/^le tableau contient (\d+) lignes avec (\d+) colonnes dans l'ordre suivant :$/, (arg0, arg1, table) => {});
});</code>
<textarea class="sg-code-input">test('Affichage de la page People', ({ given, when, then, and }) => {
JeSuisUnUtilisateurConnuEtConnecteAvecleProfil(given, (roleMock: string) => {
role = roleMock;
});
and('la page reçoit les données suivantes', table => {});
when("J'accède à la page People", async () => {
render(<People />, {}, { role });
expect(await screen.findByText('Samuel Gomez')).toBeInTheDocument();
});
UnTitreEstVisible(then,2);
and('la page contient un tableau répertoriant la liste des gens', () => {});
and(/^le tableau présente des entêtes de colonnes dans l’ordre suivant : "(.*)", "(.*)", "(.*)", "(.*)"$/, (arg0, arg1, arg2, arg3) => {});
and(/^le tableau contient (\d+) lignes avec (\d+) colonnes dans l'ordre suivant :$/, (arg0, arg1, table) => {});
});</textarea></pre>
</section>
<section class="sg-exo1-cucumber-6" id="exo1-cucumber-6" data-background="" data-background-transition="fade" data-auto-animate="data-auto-animate">
<h2>Utiliser les scénarios type</h2><span class="file">src/pages/People/People/People.spec.tsx</span>
<pre class="code-wrapper--notes" data-id="code-animation">
<div class="sg-notes">
<div class="sg-note fragment fade-in-then-out" style="top: 80.5px"><span class="sg-note__content">On importe les scénarios type</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 198px"><span class="sg-note__content">On importe <i>serverUseGet</i> qui permet de mocker les appels réseaux en GET via MSW</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 315.5px"><span class="sg-note__content">On passe les données du gherkin à la méthode <i>serverUseGet</i> (le typage sera fait après)</span></div>
<div class="sg-note fragment fade-in-then-out" style="top: 386px"><span class="sg-note__content">Ensuite, on remplace les scénarios générés par les scénarios type</span></div>
</div><code class="language-javascript sg-code sg-code--no-max-height js-code js-code--no-max-height" data-trim="data-trim" data-line-numbers="4-6,9, 12-15, 17-27" data-ln-start-from="">...
import {
JeSuisUnUtilisateurConnuEtConnecteAvecleProfil,
LaPageContientUnTableau,
LeTableauContientLesLignesCorrespondantAuxDonneesRecues,
LeTableauPresenteDesEntetesDeColonnesDansLOrdreSuivant,
UnTitreEstVisible,
} from 'shared/testsUtils/sharedScenarios';
import { serverUseGet } from 'shared/testsUtils/msw';
import People from '..';
...
const tableItemsType = 'membres';
and('la page reçoit les données suivantes', responseBody => {
serverUseGet<TPeopleData[]>({ route: 'people', responseBody }); // le typage sera fait juste après
});
...
LaPageContientUnTableau(and, 'la page contient un tableau répertoriant la liste des gens', tableItemsType);
LeTableauPresenteDesEntetesDeColonnesDansLOrdreSuivant(
and,
/^le tableau présente des entêtes de colonnes dans l’ordre suivant : "(.*)", "(.*)", "(.*)", "(.*)"$/,
tableItemsType,
);
LeTableauContientLesLignesCorrespondantAuxDonneesRecues(
and,
/^le tableau contient (\d+) lignes avec (\d+) colonnes dans l'ordre suivant :$/,
tableItemsType,
);</code>
<textarea class="sg-code-input">...
import {
JeSuisUnUtilisateurConnuEtConnecteAvecleProfil,
LaPageContientUnTableau,