From 469818a5800eb713bb915e7a5cffb227283624e0 Mon Sep 17 00:00:00 2001 From: David Featherston Date: Tue, 22 Aug 2023 08:56:30 +1000 Subject: [PATCH] feat(@dpc-sdp/nuxt-ripple-cli): update package.json scripts to include ci mode tests --- .../init/_templates/layer/latest/gitignore.t | 5 +++++ .../init/_templates/layer/latest/package.json.t | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/gitignore.t b/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/gitignore.t index 047fc47ba1..cb184b5e40 100644 --- a/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/gitignore.t +++ b/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/gitignore.t @@ -14,6 +14,11 @@ dist .DS_Store coverage +# Cypress +cypress/downloads +cypress/screenshots +cypress/videos + # Local History .history diff --git a/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/package.json.t b/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/package.json.t index 13d45d5f1a..8b443a4412 100644 --- a/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/package.json.t +++ b/packages/nuxt-ripple-cli/src/commands/init/_templates/layer/latest/package.json.t @@ -13,15 +13,19 @@ to: package.json }, "scripts": { "build": "nuxi build .playground", - "start": "nuxi start .playground", - "cy:open": "cypress open", "dev": "nuxi prepare & nuxi dev .playground", "dev:mock": "NUXT_PUBLIC_API_URL=http://localhost:3001 API_PORT=3001 npm run dev", - "lint": "eslint .", + "start": "nuxi start .playground", + "start:mock": "NUXT_PUBLIC_API_URL=http://localhost:3001 API_PORT=3001 nuxi start .playground", + "mock": "node mockserver", "preview": "nuxi preview .playground", + "lint": "eslint .", + "cy:open": "cypress open", + "cy:run": "cypress run", "test:unit": "jest --colors --runInBand --passWithNoTests", - "test:integration": "start-test dev:mock 'http-get://localhost:3000/api/tide/site?id=8888' 'cy:open'" - }, + "test:integration": "start-test dev:mock tcp:3000 'cy:open'", + "test:integration-ci": "start-test start:mock tcp:3000 'cy:run'" + } "devDependencies": { "@babel/plugin-transform-runtime": "^7.22.4", "@babel/preset-env": "^7.22.4",