Skip to content

Commit

Permalink
🎨 Maintain Cypress & Husky config
Browse files Browse the repository at this point in the history
  • Loading branch information
jyboy committed Apr 17, 2024
1 parent b3a0ed0 commit 8f111b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 308 deletions.
295 changes: 1 addition & 294 deletions .commitlintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,298 +1,5 @@
// Refer to `gitmoji-vscode`: https://github.com/seatonjiang/gitmoji-vscode/blob/main/src/gitmoji.ts
const gitmojis = [
{
emoji: '🎨',
code: ':art:'
},
{
emoji: '⚡️',
code: ':zap:'
},
{
emoji: '🔥',
code: ':fire:'
},
{
emoji: '🐛',
code: ':bug:'
},
{
emoji: '🚑',
code: ':ambulance:'
},
{
emoji: '✨',
code: ':sparkles:'
},
{
emoji: '📝',
code: ':memo:'
},
{
emoji: '🚀',
code: ':rocket:'
},
{
emoji: '💄',
code: ':lipstick:'
},
{
emoji: '🎉',
code: ':tada:'
},
{
emoji: '✅',
code: ':white_check_mark:'
},
{
emoji: '🔒️',
code: ':lock:'
},
{
emoji: '🔐',
code: ':closed_lock_with_key:'
},
{
emoji: '🔖',
code: ':bookmark:'
},
{
emoji: '🚨',
code: ':rotating_light:'
},
{
emoji: '🚧',
code: ':construction:'
},
{
emoji: '💚',
code: ':green_heart:'
},
{
emoji: '⬇️',
code: ':arrow_down:'
},
{
emoji: '⬆️',
code: ':arrow_up:'
},
{
emoji: '📌',
code: ':pushpin:'
},
{
emoji: '👷',
code: ':construction_worker:'
},
{
emoji: '📈',
code: ':chart_with_upwards_trend:'
},
{
emoji: '♻️',
code: ':recycle:'
},
{
emoji: '➕',
code: ':heavy_plus_sign:'
},
{
emoji: '➖',
code: ':heavy_minus_sign:'
},
{
emoji: '🔧',
code: ':wrench:'
},
{
emoji: '🔨',
code: ':hammer:'
},
{
emoji: '🌐',
code: ':globe_with_meridians:'
},
{
emoji: '✏️',
code: ':pencil2:'
},
{
emoji: '💩',
code: ':poop:'
},
{
emoji: '⏪',
code: ':rewind:'
},
{
emoji: '🔀',
code: ':twisted_rightwards_arrows:'
},
{
emoji: '📦',
code: ':package:'
},
{
emoji: '👽️',
code: ':alien:'
},
{
emoji: '🚚',
code: ':truck:'
},
{
emoji: '📄',
code: ':page_facing_up:'
},
{
emoji: '💥',
code: ':boom:'
},
{
emoji: '🍱',
code: ':bento:'
},
{
emoji: '♿️',
code: ':wheelchair:'
},
{
emoji: '💡',
code: ':bulb:'
},
{
emoji: '🍻',
code: ':beers:'
},
{
emoji: '💬',
code: ':speech_balloon:'
},
{
emoji: '🗃️',
code: ':card_file_box:'
},
{
emoji: '🔊',
code: ':loud_sound:'
},
{
emoji: '🔇',
code: ':mute:'
},
{
emoji: '👥',
code: ':busts_in_silhouette:'
},
{
emoji: '🚸',
code: ':children_crossing:'
},
{
emoji: '🏗️',
code: ':building_construction:'
},
{
emoji: '📱',
code: ':iphone:'
},
{
emoji: '🤡',
code: ':clown_face:'
},
{
emoji: '🥚',
code: ':egg:'
},
{
emoji: '🙈',
code: ':see_no_evil:'
},
{
emoji: '📸',
code: ':camera_flash:'
},
{
emoji: '⚗️',
code: ':alembic:'
},
{
emoji: '🔍',
code: ':mag:'
},
{
emoji: '🏷️',
code: ':label:'
},
{
emoji: '🌱',
code: ':seedling:'
},
{
emoji: '🚩',
code: ':triangular_flag_on_post:'
},
{
emoji: '🥅',
code: ':goal_net:'
},
{
emoji: '💫',
code: ':dizzy:'
},
{
emoji: '🗑️',
code: ':wastebasket:'
},
{
emoji: '🛂',
code: ':passport_control:'
},
{
emoji: '🩹',
code: ':adhesive_bandage:'
},
{
emoji: '🧐',
code: ':monocle_face:'
},
{
emoji: '⚰️',
code: ':coffin:'
},
{
emoji: '🧪',
code: ':test_tube:'
},
{
emoji: '👔',
code: ':necktie:'
},
{
emoji: '🩺',
code: ':stethoscope:'
},
{
emoji: '🧱',
code: ':bricks:'
},
{
emoji: '🧑‍💻',
code: ':technologist:'
},
{
emoji: '💸',
code: ':money_with_wings:'
},
{
emoji: '🧵',
code: ':thread:'
},
{
emoji: '🦺',
code: ':safety_vest:'
}
].map(({ emoji }) => emoji);
const gitmojis=[{emoji:'🎨',code:':art:'},{emoji:'⚡️',code:':zap:'},{emoji:'🔥',code:':fire:'},{emoji:'🐛',code:':bug:'},{emoji:'🚑',code:':ambulance:'},{emoji:'✨',code:':sparkles:'},{emoji:'📝',code:':memo:'},{emoji:'🚀',code:':rocket:'},{emoji:'💄',code:':lipstick:'},{emoji:'🎉',code:':tada:'},{emoji:'✅',code:':white_check_mark:'},{emoji:'🔒️',code:':lock:'},{emoji:'🔐',code:':closed_lock_with_key:'},{emoji:'🔖',code:':bookmark:'},{emoji:'🚨',code:':rotating_light:'},{emoji:'🚧',code:':construction:'},{emoji:'💚',code:':green_heart:'},{emoji:'⬇️',code:':arrow_down:'},{emoji:'⬆️',code:':arrow_up:'},{emoji:'📌',code:':pushpin:'},{emoji:'👷',code:':construction_worker:'},{emoji:'📈',code:':chart_with_upwards_trend:'},{emoji:'♻️',code:':recycle:'},{emoji:'➕',code:':heavy_plus_sign:'},{emoji:'➖',code:':heavy_minus_sign:'},{emoji:'🔧',code:':wrench:'},{emoji:'🔨',code:':hammer:'},{emoji:'🌐',code:':globe_with_meridians:'},{emoji:'✏️',code:':pencil2:'},{emoji:'💩',code:':poop:'},{emoji:'⏪',code:':rewind:'},{emoji:'🔀',code:':twisted_rightwards_arrows:'},{emoji:'📦',code:':package:'},{emoji:'👽️',code:':alien:'},{emoji:'🚚',code:':truck:'},{emoji:'📄',code:':page_facing_up:'},{emoji:'💥',code:':boom:'},{emoji:'🍱',code:':bento:'},{emoji:'♿️',code:':wheelchair:'},{emoji:'💡',code:':bulb:'},{emoji:'🍻',code:':beers:'},{emoji:'💬',code:':speech_balloon:'},{emoji:'🗃️',code:':card_file_box:'},{emoji:'🔊',code:':loud_sound:'},{emoji:'🔇',code:':mute:'},{emoji:'👥',code:':busts_in_silhouette:'},{emoji:'🚸',code:':children_crossing:'},{emoji:'🏗️',code:':building_construction:'},{emoji:'📱',code:':iphone:'},{emoji:'🤡',code:':clown_face:'},{emoji:'🥚',code:':egg:'},{emoji:'🙈',code:':see_no_evil:'},{emoji:'📸',code:':camera_flash:'},{emoji:'⚗️',code:':alembic:'},{emoji:'🔍',code:':mag:'},{emoji:'🏷️',code:':label:'},{emoji:'🌱',code:':seedling:'},{emoji:'🚩',code:':triangular_flag_on_post:'},{emoji:'🥅',code:':goal_net:'},{emoji:'💫',code:':dizzy:'},{emoji:'🗑️',code:':wastebasket:'},{emoji:'🛂',code:':passport_control:'},{emoji:'🩹',code:':adhesive_bandage:'},{emoji:'🧐',code:':monocle_face:'},{emoji:'⚰️',code:':coffin:'},{emoji:'🧪',code:':test_tube:'},{emoji:'👔',code:':necktie:'},{emoji:'🩺',code:':stethoscope:'},{emoji:'🧱',code:':bricks:'},{emoji:'🧑‍💻',code:':technologist:'},{emoji:'💸',code:':money_with_wings:'},{emoji:'🧵',code:':thread:'},{emoji:'🦺',code:':safety_vest:'}].map(({emoji})=>emoji);

module.exports = {
plugins: [
Expand Down
14 changes: 3 additions & 11 deletions cypress/e2e/home.cy.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
describe('The Home page', () => {
it('renders Header and Footer', () => {
beforeEach(() => {
cy.visit('/');
});

it('renders Header and Footer', () => {
cy.get('header').should('be.visible');
cy.get('footer').should('be.visible');
});

it('renders the Main sections', () => {
cy.visit('/');

cy.get('section').should('have.length', 4);
});

it('renders logo and illustrations', () => {
cy.visit('/');

cy.get('[data-testid="header-logo"]')
.invoke('prop', 'naturalWidth')
.should('be.greaterThan', 0);
Expand All @@ -24,24 +22,18 @@ describe('The Home page', () => {
});

it('navigates to Table Reservation from Hero', () => {
cy.visit('/');

cy.get('[data-testid="reserve"]').click();
cy.url().should('include', '/table-reservation');
cy.get('[data-testid="reservation"]').should('have.class', 'text-yellow');
});

it('navigates to Table Reservation from Navbar', () => {
cy.visit('/');

cy.get('[data-testid="reservation"]').click();
cy.url().should('include', '/table-reservation');
cy.get('[data-testid="reservation"]').should('have.class', 'text-yellow');
});

it('navigates to under-construction pages from Navbar', () => {
cy.visit('/');

cy.get('[data-testid="menu"]').click();
cy.url().should('include', '/menu');
cy.get('[data-testid="menu"]').should('have.class', 'text-yellow');
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/reservation.cy.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import getToday from '../../src/utils/getToday';

describe('The Table Reservation page', () => {
it('enters valid information and clicks submit', () => {
beforeEach(() => {
cy.visit('/table-reservation');
});

it('enters valid information and clicks submit', () => {
cy.get('#time').select('18:00');
cy.get('#guests').clear().type('2');
cy.get('#time').should('have.value', '18:00');
Expand All @@ -19,8 +21,6 @@ describe('The Table Reservation page', () => {
});

it('enters invalid information and shows an error', () => {
cy.visit('/table-reservation');

cy.get('#guests').clear();
cy.get('[data-testid="guests-error"]').should(
'have.text',
Expand Down

0 comments on commit 8f111b6

Please sign in to comment.