Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: layout of testimonials (#47) * chore: Added Danny too testimonials (#48) * Install cypress (#49) * chore: installed cypress * test: initial install for example tests * adding Cypress * delete Cypress example tests * adding first tests * removing "only" filter in test spec * Update README.md * eslint Cypress plugin added * cleanup via eslint * Removing package-lock.json and .gitignore update Co-authored-by: Benjamin Lo <wolfnun011@gmail.com>
- Loading branch information
1 parent
c066e61
commit 5e20aa0
Showing
17 changed files
with
15,056 additions
and
37,594 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 |
---|---|---|
|
@@ -70,4 +70,8 @@ yarn-error.log | |
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
.now | ||
.now | ||
|
||
# Cypress | ||
cypress/videos | ||
cypress/screenshots |
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,3 @@ | ||
{ | ||
"baseUrl": "http://localhost:8000" | ||
} |
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,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "hello@cypress.io", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
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,24 @@ | ||
/// <reference types="cypress" /> | ||
|
||
describe('E2E tests', () => { | ||
beforeEach(() => { | ||
cy.visit('/'); | ||
}); | ||
it('checks if link to repository is opening in a new tab', () => { | ||
cy.get('.GlEmu > a:nth-of-type(1)').should('have.attr', 'target', '_blank'); | ||
}); | ||
it('checks if the contact form is visible after "Contact me" click', () => { | ||
cy.get('.Intro___StyledButton-bAANjW').click(); | ||
cy.get('#contact').should('be.visible'); | ||
}); | ||
it('checks if form validation works during typing', () => { | ||
cy.get(':nth-child(1) > .Input-eXLwAq').type('J{backspace}').blur(); | ||
cy.get(':nth-child(1) > .styles__Error-MrfTy').should('be.visible').and('have.text', 'Full name field is required'); | ||
|
||
cy.get(':nth-child(2) > .Input-eXLwAq').type('qwerty').blur(); | ||
cy.get(':nth-child(2) > .styles__Error-MrfTy').should('be.visible').and('have.text', 'Invalid email'); | ||
|
||
cy.get(':nth-child(3) > .Input-eXLwAq').type('D{backspace}').blur(); | ||
cy.get(':nth-child(3) > .styles__Error-MrfTy').should('be.visible').and('have.text', 'Message field is required'); | ||
}); | ||
}); |
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,22 @@ | ||
// / <reference types="cypress" /> | ||
// *********************************************************** | ||
// This example plugins/index.js can be used to load plugins | ||
// | ||
// You can change the location of this file or turn off loading | ||
// the plugins file with the 'pluginsFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/plugins-guide | ||
// *********************************************************** | ||
|
||
// This function is called when a project is opened or re-opened (e.g. due to | ||
// the project's config changing) | ||
|
||
/** | ||
* @type {Cypress.PluginConfig} | ||
*/ | ||
// eslint-disable-next-line no-unused-vars | ||
module.exports = (on, config) => { | ||
// `on` is used to hook into various events Cypress emits | ||
// `config` is the resolved Cypress config | ||
}; |
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,25 @@ | ||
// *********************************************** | ||
// This example commands.js shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add('login', (email, password) => { ... }) | ||
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) |
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,20 @@ | ||
// *********************************************************** | ||
// This example support/index.js is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
import './commands'; | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
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,10 +1,8 @@ | ||
{ | ||
"en": { | ||
"title": "Trusted by", | ||
"read more": "Read more" | ||
"title": "Trusted by" | ||
}, | ||
"ja": { | ||
"title": "お客様の声", | ||
"read more": "続きを読む" | ||
"title": "お客様の声" | ||
} | ||
} |
Oops, something went wrong.