-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #222 from ElioDiNino/refactor/v4
refactor: v4 of the website
- Loading branch information
Showing
37 changed files
with
1,628 additions
and
938 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Ignore artifacts: | ||
build | ||
coverage | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import { defineConfig } from "cypress"; | ||
import eyesPlugin from '@applitools/eyes-cypress' | ||
import { defineConfig } from 'cypress'; | ||
import eyesPlugin from '@applitools/eyes-cypress'; | ||
|
||
export default eyesPlugin(defineConfig({ | ||
e2e: { | ||
baseUrl: 'http://localhost:3000', | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
export default eyesPlugin( | ||
defineConfig({ | ||
e2e: { | ||
baseUrl: 'http://localhost:3000', | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
}, | ||
}, | ||
})); | ||
}), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
/// <reference types="cypress" /> | ||
|
||
describe('Contact Page', () => { | ||
beforeEach(() => { | ||
cy.visit('/contact') | ||
}) | ||
beforeEach(() => { | ||
cy.visit('/contact'); | ||
}); | ||
|
||
it('Contact Page Layout', () => { | ||
cy.eyesOpen({ | ||
appName: 'Personal Website', | ||
testName: Cypress.currentTest.title, | ||
}) | ||
cy.eyesCheckWindow({ | ||
tag: "Contact Page", | ||
target: 'window', | ||
fully: true, | ||
}); | ||
it('Contact Page Layout', () => { | ||
cy.eyesOpen({ | ||
appName: 'Personal Website', | ||
testName: Cypress.currentTest.title, | ||
}); | ||
cy.eyesCheckWindow({ | ||
tag: 'Contact Page', | ||
target: 'window', | ||
fully: true, | ||
}); | ||
|
||
cy.contains('Submit') | ||
cy.eyesClose() | ||
}) | ||
cy.contains('Submit'); | ||
cy.eyesClose(); | ||
}); | ||
|
||
it('Contact Page Form', () => { | ||
cy.get('input[name="user_name"]').type('Elio Di Nino').should('have.value', 'Elio Di Nino') | ||
cy.get('input[name="user_email"]').type('[email protected]').should('have.value', '[email protected]') | ||
cy.get('textarea[name="message"]').type('This is a test message').should('have.value', 'This is a test message') | ||
}) | ||
}) | ||
it('Contact Page Form', () => { | ||
cy.get('input[name="user_name"]') | ||
.type('Elio Di Nino') | ||
.should('have.value', 'Elio Di Nino'); | ||
cy.get('input[name="user_email"]') | ||
.type('[email protected]') | ||
.should('have.value', '[email protected]'); | ||
cy.get('textarea[name="message"]') | ||
.type('This is a test message') | ||
.should('have.value', 'This is a test message'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
/// <reference types="cypress" /> | ||
|
||
describe('Home Page', () => { | ||
beforeEach(() => { | ||
cy.visit('/') | ||
beforeEach(() => { | ||
cy.visit('/'); | ||
|
||
cy.eyesOpen({ | ||
appName: 'Personal Website', | ||
testName: Cypress.currentTest.title, | ||
}) | ||
}) | ||
cy.eyesOpen({ | ||
appName: 'Personal Website', | ||
testName: Cypress.currentTest.title, | ||
}); | ||
}); | ||
|
||
it('Home Page Layout', () => { | ||
cy.contains('Resume') | ||
cy.contains('Links') | ||
cy.contains('GitHub') | ||
it('Home Page Layout', () => { | ||
cy.contains('Resume'); | ||
cy.contains('Links'); | ||
cy.contains('GitHub'); | ||
|
||
cy.eyesCheckWindow({ | ||
tag: "Home Page", | ||
target: 'window', | ||
fully: true, | ||
matchLevel: 'Layout' | ||
}); | ||
}) | ||
cy.eyesCheckWindow({ | ||
tag: 'Home Page', | ||
target: 'window', | ||
fully: true, | ||
matchLevel: 'Layout', | ||
}); | ||
}); | ||
|
||
afterEach(() => { | ||
cy.eyesClose() | ||
}) | ||
}) | ||
afterEach(() => { | ||
cy.eyesClose(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
/// <reference types="cypress" /> | ||
|
||
describe('Links Page', () => { | ||
beforeEach(() => { | ||
cy.visit('/links') | ||
// Wait up to 10 seconds for the background image to load | ||
cy.get('.background', { timeout: 10000 }) | ||
.should('be.visible') | ||
.then($el => { | ||
const url = $el.css('background-image').match(/url\("(.*)"\)/)[1] | ||
cy.request({url, failOnStatusCode: false}) | ||
.its('status') | ||
.should('eq', 200) | ||
}) | ||
.wait(1000) | ||
beforeEach(() => { | ||
cy.visit('/links'); | ||
// Wait up to 10 seconds for the background image to load | ||
cy.get('.background', { timeout: 10000 }) | ||
.should('be.visible') | ||
.then(($el) => { | ||
const url = $el.css('background-image').match(/url\("(.*)"\)/)[1]; | ||
cy.request({ url, failOnStatusCode: false }) | ||
.its('status') | ||
.should('eq', 200); | ||
}) | ||
.wait(1000); | ||
|
||
cy.eyesOpen({ | ||
appName: 'Personal Website', | ||
testName: Cypress.currentTest.title, | ||
}) | ||
}) | ||
cy.eyesOpen({ | ||
appName: 'Personal Website', | ||
testName: Cypress.currentTest.title, | ||
}); | ||
}); | ||
|
||
it('Links Page Layout', () => { | ||
cy.eyesCheckWindow({ | ||
tag: "Links Page", | ||
target: 'window', | ||
fully: true, | ||
}); | ||
it('Links Page Layout', () => { | ||
cy.eyesCheckWindow({ | ||
tag: 'Links Page', | ||
target: 'window', | ||
fully: true, | ||
}); | ||
|
||
cy.contains('Website') | ||
cy.contains('Contact') | ||
cy.contains('Resume') | ||
}) | ||
cy.contains('Website'); | ||
cy.contains('Contact'); | ||
cy.contains('Resume'); | ||
}); | ||
|
||
afterEach(() => { | ||
cy.eyesClose() | ||
}) | ||
}) | ||
afterEach(() => { | ||
cy.eyesClose(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
import "@applitools/eyes-cypress" | ||
import '@applitools/eyes-cypress'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["es5", "dom"], | ||
"types": ["cypress", "node"] | ||
}, | ||
"include": ["**/*.ts"] | ||
} | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["es5", "dom"], | ||
"types": ["cypress", "node"] | ||
}, | ||
"include": ["**/*.ts"] | ||
} |
Oops, something went wrong.