Skip to content

Commit

Permalink
test: purge travis
Browse files Browse the repository at this point in the history
  • Loading branch information
yubathom committed Feb 28, 2020
1 parent 011f8c6 commit 1776107
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 26 deletions.
31 changes: 7 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# == INSTRUCTIONS FOR SETTING UP TRAVIS (and GitHub Pages) ==
# == INSTRUCTIONS FOR SETTING UP TRAVIS ==
#
# 1. Find this repository in your Travis-CI dashboard.
# open settings and add an environment variable called
Expand All @@ -8,12 +8,10 @@
# **DO NOT TURN ON 'Display value in build log'!!!!**
#
# 2. Push the code to the repository.
# 3. Set the GitHub Pages source in the GitHub repository settings to the
# gh-pages branch.

language: node_js
node_js:
- "12"
- lts/*

os: linux

Expand All @@ -22,35 +20,20 @@ addons:
packages:
- libgconf-2-4 # cypress binary dependency

env:
- DEPLOY_ENV=POSTWOMAN_IO

cache:
npm: true
directories:
- "node_modules"
- ~/.cache
cache: npm

branches:
only:
- "master"
- master

install:
- "npm install firebase-tools"
- "npm install"
- npm ci

before_script:
- "npm run build" # use nuxt build and start to run tests
- "npm run test"
- npm run build # use nuxt build and start to run tests

script:
- "cd functions"
- "npm install"
- "cd .."
- "npm run generate"
- npm test

notifications:
webhooks: https://www.travisbuddy.com

after_success:
- firebase deploy --token $FIREBASE_TOKEN
6 changes: 4 additions & 2 deletions tests/e2e/integration/proxy.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ describe("Proxy disabled - local request", () => {
.get("#url")
.then(el => expect(el.val() === "https://api.thecatapi.com").to.equal(true))
.get("#response-details-wrapper")
.should("be.visible")
.should($wrapper => {
expect($wrapper).to.contain("FAKE Cat API")
})
Expand All @@ -15,9 +16,10 @@ describe("Proxy enabled - external request", () => {
cy.enableProxy("/?url=https://api.thecatapi.com&path=")
.get("#send")
.click()
.get("#response-details-wrapper")
.get("#response-details-wrapper", { timeout: 10000 })
.should("be.visible")
.should($wrapper => {
expect($wrapper).to.contain("Cat API")
expect($wrapper).to.contain("The Cat API")
})
})
})

0 comments on commit 1776107

Please sign in to comment.