Skip to content

Commit

Permalink
Merge pull request #568 from nkowaokwu/io/fix-website-pages
Browse files Browse the repository at this point in the history
Fix Website Pages
  • Loading branch information
ijemmao committed Feb 17, 2023
2 parents 7e6541c + 7f69c64 commit cfd99bb
Show file tree
Hide file tree
Showing 14 changed files with 87 additions and 65 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Expand Up @@ -19,15 +19,18 @@
"cypress"
],
"rules": {
"function-call-argument-newline": ["off"],
"function-paren-newline": ["off"],
"import/prefer-default-export": ["off"],
"max-len": ["error", { "code": 120 }],
"newline-per-chained-call": ["off"],
"no-console": ["off"],
"no-nested-ternary": ["off"],
"no-promise-executor-return": ["off"],
"no-underscore-dangle": ["off"],
"semi": ["error", "always"],
"react/jsx-filename-extension": ["off"],
"react/function-component-definition": ["off"],
"react/jsx-props-no-spreading": ["off"],
"react/no-danger": ["off"],
"@next/next/no-html-link-for-pages": ["off"],
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integration.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
test:
name: Build and Test
runs-on: ubuntu-latest
timeout-minutes: 7
timeout-minutes: 10

strategy:
matrix:
Expand Down Expand Up @@ -40,5 +40,5 @@ jobs:
run: yarn test:build
- name: Test API
run: yarn jest
# - name: Test API Homepage
# run: yarn cypress:ci
- name: Test API Homepage
run: yarn cypress:ci
6 changes: 2 additions & 4 deletions .github/workflows/lint.yml
Expand Up @@ -19,7 +19,5 @@ jobs:
- name: Install Node.js dependencies
run: yarn install

- name: Run linters
uses: wearerequired/lint-action@v1
with:
eslint: true
- name: Run ESLint
run: yarn run eslint ./src --ext .js,.jsx,.ts,.tsx -c ./.eslintrc.json
10 changes: 10 additions & 0 deletions __tests__/cypress/integration/client.test.js
Expand Up @@ -21,6 +21,16 @@ describe('Igbo API Homepage', () => {
cy.contains('Email:');
});

it('render the Privacy page', () => {
cy.findByText('Privacy').click();
cy.findByText('Privacy Policy').should('exist');
});

it('render the Terms or Service page', () => {
cy.findByText('Terms of Service').click();
cy.findByText('Terms and Conditions').should('exist');
});

describe('Try it Out', () => {
it('enter a word and select flag', () => {
cy.visit('/');
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
@@ -1,7 +1,7 @@
module.exports = {
displayName: 'igbo-api-admin',
testMatch: ['**/__tests__/*.js'],
testTimeout: 15000,
testTimeout: 20000,
testEnvironment: 'node',
moduleFileExtensions: ['ts', 'js', 'json'],
globalSetup: './testSetup.js',
Expand Down
19 changes: 11 additions & 8 deletions package.json
Expand Up @@ -145,14 +145,14 @@
"babel-loader": "^8.1.0",
"cross-env": "^7.0.2",
"cypress": "^6.0.0",
"eslint": "^7.10.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-config-next": "^12.0.7",
"eslint-config-prettier": "^6.12.0",
"eslint-plugin-cypress": "^2.11.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.21.3",
"eslint": "8.34.0",
"eslint-config-airbnb": "19.0.4",
"eslint-config-next": "13.1.6",
"eslint-config-prettier": "8.6.0",
"eslint-plugin-cypress": "2.12.1",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-react": "7.32.2",
"husky": "^4.3.0",
"jest": "^29.2.2",
"lint-staged": "^10.4.0",
Expand All @@ -167,6 +167,9 @@
"tag": true
}
},
"resolutions": {
"esquery": "1.4.0"
},
"nodemonConfig": {
"delay": "1500ms"
}
Expand Down
3 changes: 2 additions & 1 deletion src/pages/_app.js
Expand Up @@ -7,6 +7,7 @@ import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import { appWithTranslation } from 'next-i18next';
import Head from 'next/head';
import ChakraTheme from '../shared/constants/ChakraTheme';
import en from '../public/locales/en';
import ig from '../public/locales/ig';
import * as gtag from '../lib/gtag';
Expand Down Expand Up @@ -49,7 +50,7 @@ const MainApp = ({ Component, pageProps, ...rest }) => {
<title>Igbo API - The First African Language API</title>
</Head>
<>
<ChakraProvider>
<ChakraProvider theme={ChakraTheme}>
<Component {...pageProps} {...rest} />
</ChakraProvider>
{/* Global Site Tag (gtag.js) - Google Analytics */}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/about.js
Expand Up @@ -41,7 +41,7 @@ const About = () => {
<a className="link" href={DICTIONARY_APP_URL}>
Nkọwa okwu
</a>
{' , our official online Igbo-English dictionary app.'}
, our official online Igbo-English dictionary app.
</p>
) : (
<p dangerouslySetInnerHTML={{
Expand Down
2 changes: 1 addition & 1 deletion src/pages/components/Footer/Footer.js
Expand Up @@ -74,7 +74,7 @@ const Footer = () => {
</li>
<li>
<a href="/terms" className="font-normal border-b border-b-gray-500">
Terms of service
Terms of Service
</a>
</li>
<li>
Expand Down

0 comments on commit cfd99bb

Please sign in to comment.