aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* refactor(pages): refine Blog pagesArmand Philippot2023-12-042-2/+15
| | | | | | | | | | * replace usePostsList with useArticlesList to keep names coherent * remove useIsMounted hook * rewrite useRedirection hook * add redirect in getStaticProps to avoid unecessary fetching * move Pagination component in a noscript tag * use hooks to refresh thematics and topics lists * complete Cypress tests
* refactor(pages): refine Topic pagesArmand Philippot2023-12-011-0/+38
| | | | | | * add useTopic and useTopicsList hooks to refresh data * add a table of contents * add Cypress tests
* refactor(pages): refine Thematic pagesArmand Philippot2023-12-015-6/+57
| | | | | | | | | | | * add a table of contents (however posts heading are not included) * rename posts list section title * add a useThematic hook to refresh thematic contents * add a useThematicLists hook to refresh thematics list * add a `notIn` filter in thematics list fetcher to directly remove unwanted thematics * add Cypress tests
* refactor(pages): refine Article pagesArmand Philippot2023-12-011-0/+49
| | | | | | | | | | | * use rehype to update code blocks class names * fix widget heading level (after a level 1 it should always be a level 2 and not 3) * replace Spinner with LoadingPage and LoadingPageComments components to keep layout coherent * refactor useArticle and useComments hooks * fix URLs in JSON LD schema * add Cypress tests
* refactor(pages): refine CV pageArmand Philippot2023-11-291-2/+29
| | | | | | * reduce the number of statements by grouping the messages * remove LinkedIn from the widget (it is obviously not a repo and my CV is already here, no need to link to an external site)
* refactor(pages): improve HomepageArmand Philippot2023-11-291-1/+26
| | | | | | | | | * move custom homepage components that does not require props to the MDX file (links should not need to be translated here but where they are defined) * move SEO title and meta desc to MDX file * make Page component the wrapper instead of using a React fragment * fix MDX module types
* fix(services,types): make queries and types coherent for TopicArmand Philippot2023-11-2810-1/+310
| | | | | | * some nodes was missing in topicQuery * a node was mispelled in topicsListQuery * add tests for all topics fetchers
* fix(services,types): make coherent Thematic type and queryArmand Philippot2023-11-2810-2/+316
| | | | | | * some nodes was queried but missing in the Thematic type and vice versa, it is now fixed * add tests for all thematics fetchers
* test(services): add tests for comments list fetcherArmand Philippot2023-11-289-15/+246
|
* test(services): add tests for posts fetchersArmand Philippot2023-11-2813-1/+442
|
* test: add MSW to intercept GraphQL requestsArmand Philippot2023-11-279-0/+266
|
* refactor(services, types): reorganize GraphQL fetchers and data typesArmand Philippot2023-11-271-4/+11
| | | | | | | | | | | | The Typescript mapped types was useful for autocompletion in fetchers but their are harder to maintain. I think it's better to keep each query close to its fetcher to have a better understanding of the fetched data. So I: * colocate queries with their own fetcher * colocate mutations with their own mutator * remove Typescript mapped types for queries and mutations * move data convertors inside graphql services * rename most of data types and fetchers
* test: fix most of the e2e tests errorsArmand Philippot2023-11-155-33/+57
| | | | | | | | | * back-to-top test is not working: for some reasons, the link only appears when manually scrolling * search test has failure test: it seems the page meta is too long to load Anyway, the pages will be refactored and the e2e should also be refactored. But the back to top test remains problematic...
* refactor(hooks): remove useSettings hookArmand Philippot2023-11-153-8/+8
| | | | | | | It does not make sense to re-export an existing object through a hook. On some pages both the hook and the object was imported... It is better to use the CONFIG (previously settings) object directly and by doing it we avoid potential errors because of conditional hooks.
* refactor(hooks): rewrite usePagination hookArmand Philippot2023-11-132-0/+55
| | | | | | | * replace `isLoadingInitialData` with `isLoading` & `isRefreshing` * rename `fallbackData` prop to `fallback` * replace `setSize` return with a `loadMore` callback * add tests
* refactor(components): replace Overview with ProjectOverview componentArmand Philippot2023-11-111-0/+9
| | | | | | * `cover` prop is now expecting a ReactElement (NextImage) * `meta` prop is now limited to a specific set of meta items * add a `name` prop to add an accessible name to the figure element
* refactor(providers,hooks): rewrite PrismThemeProvider & usePrismThemeArmand Philippot2023-11-111-13/+16
| | | | | | * reuse Theme provider logic * move DOM mutation from provider to hook * add a script to init theme before page load
* feat: replace next-themes with a custom ThemeProviderArmand Philippot2023-11-111-3/+6
| | | | | | | To be honest, next-themes was working fine. However since I use a theme provider for Prism code blocks, some code is duplicated between this app and the library. So I prefer to use a custom Provider without the options I don't need.
* refactor(hooks,provider): move reduce motion setterArmand Philippot2023-11-111-2/+8
| | | | | | | | | | Since the local storage key is not meant to change between the components, it should be set directly inside the app file. So both the local storage and the data attribute should be handle in a provider. I also added a custom document because we need a script to retrieve the stored value in local storage earlier to avoid flashing on hydration.
* refactor(hooks,providers): rewrite useAckee hook and AckeeProviderArmand Philippot2023-11-111-12/+24
|
* refactor(routes): replace hardcoded routes with constantsArmand Philippot2023-10-246-32/+52
| | | | | | | | It makes it easier to change a route if needed and it avoid typo mistakes. I also refactored a bit the concerned files to be complient with the new ESlint config. However, I should rewrite the pages to reduce the number of statements.
* build: convert project to esmArmand Philippot2023-10-241-0/+2
|
* refactor(build): replace paths aliases with relative pathsArmand Philippot2023-09-192-2/+2
| | | | | | Using paths aliases starting with "@" can be confusing and can lead to conflict with existings modules. I prefer to use relative paths to avoid extra configuration in tools because of these aliases.
* test(e2e): add settings form testArmand Philippot2022-06-031-0/+177
|
* test(e2e): add other pages testArmand Philippot2022-06-034-0/+27
| | | | | Sometimes a build can be successful but the page is not working, so these tests allows me to check if the page is correctly loaded.
* test(e2e): add contact page testArmand Philippot2022-06-031-0/+41
|
* test(e2e): add loading more button test for blog pageArmand Philippot2022-06-031-0/+44
|
* test(e2e): add back to top button visibility testArmand Philippot2022-06-021-0/+14
|
* test(e2e): add search feature testArmand Philippot2022-06-021-0/+41
|
* test(e2e): add Footer navigation testArmand Philippot2022-06-021-0/+12
|
* test(e2e): add main navigation testArmand Philippot2022-06-021-0/+62
|
* test: install and configure cypressArmand Philippot2022-06-027-0/+121
| | | | I also configure Jest to avoid conflicts between Cypress and Jest.
* build: configure jestArmand Philippot2022-03-242-2/+0
| | | | | | Since Next.js v12, Jest is already configured with the next/jest package. I also added a package to mock next/router.
* build: configure JestArmand Philippot2021-12-122-0/+2