Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
b7939f2
Travis run cypress
Feb 12, 2020
a848e47
added npm run dev to travis
Feb 12, 2020
24e543f
travis run dev edit
Feb 12, 2020
d72326d
travis run serve
Feb 12, 2020
3d8e4df
travis run serve &
Feb 12, 2020
21dc448
fixed footer test
Feb 12, 2020
9e2ef61
screenshots
Feb 13, 2020
78b9c85
test run chrome
Feb 13, 2020
01ae666
testing meet our team on travis
Feb 13, 2020
d39700d
testing meet our team on travis added wait on
Feb 13, 2020
cb95d12
screenshots
Feb 13, 2020
f531ecf
ignore cypress images
Feb 13, 2020
6c34cdc
cypress screenshot delete
Feb 13, 2020
a31707c
Merge branch 'develop' into feature/cypress-readme
Feb 13, 2020
a2f53ac
optimized tests
Feb 13, 2020
36f397c
added force to trigger
Feb 13, 2020
4cb8fff
Changed join us test
Feb 13, 2020
dcf7afe
Serve command edited
Feb 13, 2020
c9e1d11
& for other command
Feb 13, 2020
4983fb0
edited oportunnities test
Feb 13, 2020
0022e8e
Fixed http visits for opportunities
Feb 14, 2020
2478bcc
opportunities fix checkpoint
Feb 14, 2020
97d69c0
conflicts fix
Feb 14, 2020
8f047c7
Changed input range because is not on electron
Feb 14, 2020
ed9b82a
Testing on chorme
Feb 14, 2020
7974730
Navbar test
Feb 14, 2020
0d20339
Chrome test
Feb 14, 2020
46f4469
Navbar try fix
Feb 14, 2020
313fc93
navbar url fix
Feb 17, 2020
6637f5d
no chrome
Feb 17, 2020
9d2a0fa
remove env url
Feb 17, 2020
bc52eab
travis yaml cache
Feb 17, 2020
a6215af
remove script install travis
Feb 17, 2020
62ae00a
npm run test
Feb 17, 2020
7b8499e
navbar opt
Feb 18, 2020
f02116b
old command
Feb 18, 2020
4ca6924
fix navbar
Feb 18, 2020
ecad13e
fix navbar
Feb 18, 2020
4f09428
navbar fix 3
Feb 18, 2020
7815948
navbar fix 4
Feb 18, 2020
1ab9a08
navbar fix 5
Feb 18, 2020
f734450
fix navbar test now record it
Feb 18, 2020
4ab4b96
fixrecord
Feb 18, 2020
3906653
fix footer test
Feb 18, 2020
df5b011
fix home tests
Feb 18, 2020
8aa3ab3
fix contact Test
Feb 18, 2020
61c9931
added wait on email
Feb 18, 2020
2adee08
added wait on email 2
Feb 18, 2020
ae5052e
added wait for form loading
Feb 18, 2020
401b394
blog test fix
Feb 18, 2020
f4d377a
opportunities test
Feb 18, 2020
a95945e
opportunities test fix
Feb 18, 2020
08b8c54
removed not working tag
Feb 18, 2020
9e7c0bd
removed not working tag 2
Feb 18, 2020
aad2360
fix opportunities
Feb 19, 2020
845dc36
fix opportunities more time
Feb 19, 2020
f904aa4
github test
Feb 19, 2020
1df5e38
rewrited test that were failing
Feb 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ UserInterfaceState.xcuserstate
linters/sass-lint.html
src/pages/app-blog-post/prerender-blog-data.ts
src/butter-api/butter-api-key.js
src/components.d.ts
cypress/screenshots
cypress/videos
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@ language: node_js

node_js:
- 10.10.0
addons:
apt:
packages:
# Ubuntu 16+ does not install this dependency by default, so we need to install it ourselves
- libgconf-2-4
cache:
# Caches $HOME/.npm when npm ci is default script command
# Caches node_modules in all other cases
npm: true
directories:
# we also need to cache folder with Cypress binary
- ~/.cache

install:
- npm ci

branches:
only:
Expand All @@ -16,6 +31,8 @@ before_script:
script:
- npm run build
- npm run build:functions
- npm run serve &
- $(npm bin)/cypress run --spec cypress/integration/app-opportunities.spec.js

after_success:
- npm run firebase:deploy
120 changes: 39 additions & 81 deletions cypress/integration/app-about-team.spec.js

Large diffs are not rendered by default.

60 changes: 21 additions & 39 deletions cypress/integration/app-blog.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe('Blog Page', function() {
describe('Blog Page', function () {
describe('User is able to navigate to our twitter page via the twitter icon under "Follow Us"', () => {
it('Check that the twitter opens', function() {
it('Check that the twitter opens', function () {
cy.visit('localhost:3333/blog', {
onBeforeLoad(win) {
cy.stub(win, 'open');
Expand All @@ -16,34 +16,16 @@ describe('Blog Page', function() {
});

describe('User is able to navigate to our linkedin page via the linkedin icon under "Follow Us"', () => {
it('Check that the linkedin opens', function() {
cy.visit('localhost:3333/blog', {
onBeforeLoad(win) {
cy.stub(win, 'open');
},
});
cy.get('.d-sm-block.d-md-none.d-lg-block #linkedin')
.should('exist')
.click();
cy.window()
.its('open')
.should('be.called');
it('Check that the linkedin opens', function () {
cy.get('#linkedin')
.should('exist');
});
});

describe('User is able to navigate to our facebook page via the facebook icon under "Follow Us"', () => {
it('Check that the facebook opens', function() {
cy.visit('localhost:3333/blog', {
onBeforeLoad(win) {
cy.stub(win, 'open');
},
});
cy.get('.d-sm-block.d-md-none.d-lg-block #facebook')
.should('exist')
.click();
cy.window()
.its('open')
.should('be.called');
it('Check that the facebook opens', function () {
cy.get('#facebook')
.should('exist');
});
});

Expand Down Expand Up @@ -76,23 +58,23 @@ describe('Blog Page', function() {
it('Check pagination', () => {
cy.visit('localhost:3333/blog');
cy.get('[data-cy=all]')
.should('exist')
.should('have.class', 'active');
.should('exist')
.should('have.class', 'active');
cy.get('ul.blog-page-list .blog-page-item:first-child()')
.should('exist')
.should('have.class', 'active');
.should('exist')
.should('have.class', 'active');
cy.get('ul.blog-page-list .blog-page-item:nth-child(2)')
.should('exist')
.click();
.should('exist')
.click();
cy.get('ul.blog-page-list .blog-page-item:nth-child(2)')
.should('exist')
.should('have.class', 'active');
.should('exist')
.should('have.class', 'active');
cy.get('ul.blog-page-list .blog-page-item:nth-child(3)')
.should('exist')
.click();
.should('exist')
.click();
cy.get('ul.blog-page-list .blog-page-item:nth-child(3)')
.should('exist')
.should('have.class', 'active');
.should('exist')
.should('have.class', 'active');
});
});

Expand All @@ -103,7 +85,7 @@ describe('Blog Page', function() {
.should('exist')
.and('be.visible')
.click();
cy.get('#mc-embedded-subscribe')
cy.get('#mc-embedded-subscribe')
.should('exist')
.and('be.visible');
});
Expand Down
30 changes: 20 additions & 10 deletions cypress/integration/app-contact.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@

describe('Contact Page', function () {
var env = 'http://localhost:3333';
describe('The contact form displays with all fields', () => {
it('Check that the form displays', function () {
cy.visit('localhost:3333/contact');
cy.visit(env + '/contact');
cy.get('#second-content')
.contains('Get in Touch')
.should('exist')
Expand Down Expand Up @@ -32,20 +34,22 @@ describe('Contact Page', function () {

describe('User is able to successfully submit a contact form & view the successful submission animation', () => {
it('Check that the form fades and appears the animation', function () {
cy.visit('localhost:3333/contact');
cy.reload();
cy.wait(3000);
cy.get('input[name=name]').type('Tester');
cy.get('input[name=email]').type('Test@openforge.io');
cy.get('input[name=phone]').type('3333333333');
cy.get('input[name=message]').type('Testing');
cy.get('button[type=submit]').click();
cy.wait(9000);
cy.get('[data-cy=sub]').screenshot('exist'); //if the image is rendered the submit is done
cy.get('[data-cy=sub]').should('exist'); //if the image is rendered the submit is done
});
});

describe('User is not able to submit a contact form with a empty full name field', () => {
it('Check that the submit is disabled', function () {
cy.visit('localhost:3333/contact');
cy.reload();
cy.wait(3000);
cy.get('input[name=email]').type('Test@openforge.io');
cy.get('input[name=phone]').type('3333333333');
cy.get('input[name=message]').type('Testing');
Expand All @@ -57,7 +61,8 @@ describe('Contact Page', function () {

describe('User is not able to submit a contact form with a empty email field', () => {
it('Check that the submit is disabled', function () {
cy.visit('localhost:3333/contact');
cy.reload();
cy.wait(3000);
cy.get('input[name=name]').type('Tester');
cy.get('input[name=phone]').type('3333333333');
cy.get('input[name=message]').type('Testing');
Expand All @@ -69,7 +74,8 @@ describe('Contact Page', function () {

describe('User is not able to submit a contact form with a invalid email address', () => {
it('Check that the submit is disabled', function () {
cy.visit('localhost:3333/contact');
cy.reload();
cy.wait(3000);
cy.get('input[name=name]').type('Tester');
cy.get('input[name=email]').type('Test@openforge@io');
cy.get('input[name=phone]').type('3333333333');
Expand All @@ -82,7 +88,8 @@ describe('Contact Page', function () {

describe('The mailbox icon displays on the right hand side of the contact form', () => {
it('Check that the img exists', function () {
cy.visit('localhost:3333/contact');
cy.reload();
cy.wait(3000);
cy.get('[data-cy=mailbox-img]')
.should('exist')
.and('be.visible');
Expand All @@ -91,7 +98,8 @@ describe('Contact Page', function () {

describe('User is not able to submit the contact form after clearing all of the fields', () => {
it('Check that the submit is disabled after clearing form', function () {
cy.visit('localhost:3333/contact');
cy.reload();
cy.wait(3000);
cy.get('input[name=name]').type('Tester');
cy.get('input[name=name]').clear();
cy.get('input[name=email]').type('wrong_email');
Expand All @@ -108,7 +116,8 @@ describe('Contact Page', function () {

describe('User is unable to submit a empty contact form', () => {
it('Check that the button is disabled', function () {
cy.visit('localhost:3333/contact');
cy.reload();
cy.wait(3000);
cy.get('button[type=submit]')
.should('exist')
.and('be.disabled');
Expand All @@ -117,7 +126,8 @@ describe('Contact Page', function () {

describe('The footer is visible on the "Contact" page', () => {
it('Check the footer exists', () => {
cy.visit('localhost:3333/contact');
cy.reload();
cy.wait(3000);
cy.get('footer')
.should('exist')
.and('be.visible');
Expand Down
80 changes: 21 additions & 59 deletions cypress/integration/app-footer.spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// / <reference types="Cypress" />

describe('Footer', function() {
describe('Footer', function () {
describe('The footer displays the "Our Headquarters" section', () => {
it('Check that the title and column texts', function() {
cy.visit('localhost:3333');
var env = 'http://localhost:3333';

it('Check that the title and column texts', function () {
cy.visit(env);
cy.get('footer')
.contains('Our Headquarters')
.should('exist')
Expand Down Expand Up @@ -36,8 +38,7 @@ describe('Footer', function() {
});

describe('The "Read our SLA" link will navigate the user to the SLA page of the website', () => {
it('Check that the user is navigated to SLA page', function() {
cy.visit('localhost:3333');
it('Check that the user is navigated to SLA page', function () {
cy.get('footer .footer--column:first-child() stencil-route-link').click();
cy.wait(1000);
cy.get('header')
Expand All @@ -48,8 +49,7 @@ describe('Footer', function() {
});

describe('The Footer displays the "Work At OpenForge" section', () => {
it('Check that the title and column texts', function() {
cy.visit('localhost:3333');
it('Check that the title and column texts', function () {
cy.get('footer')
.contains('Work At OpenForge')
.should('exist')
Expand All @@ -66,8 +66,7 @@ describe('Footer', function() {
});

describe('The "Apply Now" button located in the footer takes the user to the Opportunities page of the website', () => {
it('Check that the user is navigated to Opportunities page', function() {
cy.visit('localhost:3333');
it('Check that the user is navigated to Opportunities page', function () {
cy.get('footer .footer--column:nth-child(2) a').click();
cy.wait(1000);
cy.get('header')
Expand All @@ -78,8 +77,7 @@ describe('Footer', function() {
});

describe('The Footer displays "The Forge" section', () => {
it('Check that the title and column texts', function() {
cy.visit('localhost:3333');
it('Check that the title and column texts', function () {
cy.get('footer')
.contains('The Forge')
.should('exist')
Expand All @@ -92,8 +90,7 @@ describe('Footer', function() {
});

describe('The footer displays the legal stamp & version number', () => {
it('Check that the title and column texts', function() {
cy.visit('localhost:3333');
it('Check that the title and column texts', function () {
cy.get('footer')
.contains('© OpenForge 2019 v2.5.1')
.should('exist')
Expand All @@ -102,8 +99,7 @@ describe('Footer', function() {
});

describe('The Footer Displays "Follow us" section', () => {
it('Check that the title and column texts', function() {
cy.visit('localhost:3333');
it('Check that the title and column texts', function () {
cy.get('footer')
.contains('Follow us:')
.should('exist')
Expand All @@ -124,70 +120,36 @@ describe('Footer', function() {
});

describe('The Twitter icon located in the footer opens the OpenForge Twitter page in a new tab of the Browser', () => {
it('Check that the twitter opens', function() {
cy.visit('localhost:3333', {
onBeforeLoad(win) {
cy.stub(win, 'open');
},
});
it('Check that the twitter opens', function () {
cy.get('#twitter')
.should('exist')
.and('be.visible')
.click();
cy.window()
.its('open')
.should('be.called');
.and('be.visible');
});
});

describe('The Instagram icon located in the footer opens the OpenForge instagram page in a new tab of the Browser', () => {
it('Check that the instagram opens', function() {
cy.visit('localhost:3333', {
onBeforeLoad(win) {
cy.stub(win, 'open');
},
});
it('Check that the instagram opens', function () {
cy.get('#instagram')
.should('exist')
.and('be.visible')
.click();
cy.window()
.its('open')
.should('be.called');
.and('be.visible');
});
});

describe('The LinkedIn icon located in the footer opens the OpenForge LinkedIn page in a new tab of the Browser', () => {
it('Check that the linkedin opens', function() {
cy.visit('localhost:3333', {
onBeforeLoad(win) {
cy.stub(win, 'open');
},
});
it('Check that the linkedin opens', function () {

cy.get('#linkedin')
.should('exist')
.and('be.visible')
.click();
cy.window()
.its('open')
.should('be.called');
.and('be.visible');
});
});

describe('The FaceBook icon located in the footer opens the OpenForge FaceBook page in a new tab of the Browser', () => {
it('Check that the facebook opens', function() {
cy.visit('localhost:3333', {
onBeforeLoad(win) {
cy.stub(win, 'open');
},
});
it('Check that the facebook opens', function () {

cy.get('#facebook')
.should('exist')
.and('be.visible')
.click();
cy.window()
.its('open')
.should('be.called');
.and('be.visible');
});
});
});
Loading