aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cypress/e2e/pages/blog.cy.ts6
-rw-r--r--tests/cypress/e2e/pages/homepage.cy.ts6
-rw-r--r--tests/utils/graphql/connections.ts4
3 files changed, 8 insertions, 8 deletions
diff --git a/tests/cypress/e2e/pages/blog.cy.ts b/tests/cypress/e2e/pages/blog.cy.ts
index 2ec14c2..3a422d2 100644
--- a/tests/cypress/e2e/pages/blog.cy.ts
+++ b/tests/cypress/e2e/pages/blog.cy.ts
@@ -1,4 +1,4 @@
-import { settings } from '../../../../src/utils/config';
+import { CONFIG } from '../../../../src/utils/config';
import { ROUTES } from '../../../../src/utils/constants';
type ArticlesGroup = {
@@ -27,10 +27,10 @@ describe('Blog Page', () => {
: { first: '0', total: '0' };
const totalArticles = parseInt(total, 10);
- expect(parseInt(first, 10)).to.be.within(1, settings.postsPerPage);
+ expect(parseInt(first, 10)).to.be.within(1, CONFIG.postsPerPage);
expect(totalArticles).to.be.at.least(1);
- const totalPages = Math.ceil(totalArticles / settings.postsPerPage);
+ const totalPages = Math.ceil(totalArticles / CONFIG.postsPerPage);
const remainingPages = totalPages - 1;
return Array.from({ length: remainingPages }, (_, i) => i + 1);
diff --git a/tests/cypress/e2e/pages/homepage.cy.ts b/tests/cypress/e2e/pages/homepage.cy.ts
index 8cd58cb..2d95767 100644
--- a/tests/cypress/e2e/pages/homepage.cy.ts
+++ b/tests/cypress/e2e/pages/homepage.cy.ts
@@ -1,9 +1,9 @@
-import { settings } from '../../../../src/utils/config';
+import { CONFIG } from '../../../../src/utils/config';
describe('HomePage', () => {
it('successfully loads', () => {
cy.visit('/');
- cy.findByRole('heading', { level: 1 }).contains(settings.name);
- cy.findByText(settings.baseline.fr).should('exist');
+ cy.findByRole('heading', { level: 1 }).contains(CONFIG.name);
+ cy.findByText(CONFIG.baseline).should('exist');
});
});
diff --git a/tests/utils/graphql/connections.ts b/tests/utils/graphql/connections.ts
index d1c3b93..f38fa59 100644
--- a/tests/utils/graphql/connections.ts
+++ b/tests/utils/graphql/connections.ts
@@ -1,5 +1,5 @@
import type { EdgesResponse, GraphQLEdges, Maybe } from '../../../src/types';
-import { settings } from '../../../src/utils/config';
+import { CONFIG } from '../../../src/utils/config';
/**
* Retrieve the edges.
@@ -36,7 +36,7 @@ type GetConnectionProps<T> = {
export const getConnection = <T>({
after,
data = [],
- first = settings.postsPerPage,
+ first = CONFIG.postsPerPage,
}: GetConnectionProps<T>): EdgesResponse<T> => {
const afterInt = after ? Number(after.replace('cursor', '')) : 0;
const edges = getEdges(data.slice(afterInt, afterInt + first), afterInt);