Skip to content

Commit

Permalink
chore(testing): updates local backstop refs
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrebb committed Sep 24, 2023
1 parent 3d50cab commit b836dce
Show file tree
Hide file tree
Showing 74 changed files with 42 additions and 34 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
2 changes: 1 addition & 1 deletion _ci/backstop/ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
apps: [
{
name: 'UI http-server :8080',
name: 'UI http-server :443',
namespace: 'backstop',
script: 'npm',
args: 'run serve',
Expand Down
2 changes: 1 addition & 1 deletion _ci/backstop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"pm2": "node ./node_modules/pm2/bin/pm2",
"ref": "ENVIRONMENT=\"$ENV\" backstop reference --config=backstop.config.js",
"remote": "ENVIRONMENT=\"$ENV\" backstop remote --config=backstop.config.js",
"serve": "http-server ../../front/build -p 8080",
"serve": "http-server -b -S -p 443 -a local.dgrebb.com -C ../../front/local.dgrebb.com.crt -K ../../front/local.dgrebb.com.key --cors='*' ../../front/build",
"start": "ENVIRONMENT=\"$ENV\" pm2 start ecosystem.config.js && pm2 monit",
"stop": "pm2 stop backstop && pm2 delete backstop && kill -9 $( lsof -i:3000 -t )",
"test": "ENVIRONMENT=\"$ENV\" backstop test --config=backstop.config.js",
Expand Down
12 changes: 9 additions & 3 deletions _utils/_scripts/visual-regression.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ source $directory/_scripts/functions.sh

backstopURL='http://localhost:3000/bd/html_report?remote'

if [ $2 == "s" ]; then
if [ "$2" == "s" ]; then
ENV=staging
elif [ $2 == "p" ]; then
elif [ "$2" == "p" ]; then
ENV=production
else
ENV=local
Expand All @@ -16,6 +16,11 @@ echo "${ENV} is the environment"
cd $directory/../_ci/backstop
if [[ $1 == 'ref' ]]; then
echo "Generating reference bitmaps for ${ENV}"
if [[ $ENV == 'local' ]]; then
# build the static frontend with STG
dg f b s
dg f s
fi
ENV=$ENV npm run ref
elif [[ $1 == 'remote' ]]; then
ENV=$ENV npm run remote
Expand All @@ -29,7 +34,8 @@ elif [[ $1 == 'test' ]]; then
echo ''
echo "Starting test for ${ENV}"
echo ''
ENV=$ENV npm run boot
pm2 kill
ENV=$ENV sudo npm run boot
echo ''
read -p 'Pausing for backstop remote startup...' -t 5
echo ''
Expand Down
15 changes: 7 additions & 8 deletions _utils/dg
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@ export directory=$(dirname $(realpath /usr/local/bin/dg))
source $directory/_scripts/functions.sh

showHelp() {
printf "${NC}$(basename "$0") [-h] [ d db dbl drb drbl r cms tf] -- program to manage dgrebb.com\n
printf "${NC}$(basename "$0") [-h] [ d db dbl drb drbl r f cms tf] -- cli to manage dgrebb.com\n
-h show this help text
cms interact with strapi sans docker
f | front frontend run/build commands
d | dev run strapi in development mode outside of docker
db | dbuild build docker images for aws
dbl | dbuildlocal build docker images to run locally
drb | drebuild rebuild docker images for aws
drbl rebuild docker images to run locally
dp push docker image
r | run run local docker image
cms interact with strapi sans docker
dev run strapi in development mode
tf run terraform commands
i | init initialize terraform
iu | init-upgrade upgrade terraform
p | plan plan terraform
a | apply apply terraform
\n\n"
}

if [[ $1 != "v" ]]; then
if [ "$(exec sh -c 'echo "$PPID"')" != "$$" ]; then
echo "Running dg subshell..."
else
hello
fi

Expand Down Expand Up @@ -96,6 +94,7 @@ while test "$1" != --; do
projectPath=$(realpath ${directory}/..)
if [ $(pwd) = ${projectPath} ]; then
printDgErr "Unexpected args — you done goofed!" ]
echo
showHelp
else
printDgMsg "Moving to project directory"
Expand Down
1 change: 0 additions & 1 deletion front/src/lib/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ body {
(hover: on-demand),
(-moz-touch-enabled: 1),
(pointer: coarse) {
padding-left: 0;
height: 100%;
overflow: visible;
scrollbar-gutter: auto;
Expand Down
44 changes: 24 additions & 20 deletions front/vite.local.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,32 @@ import Icons from 'unplugin-icons/vite';
import { defineConfig } from 'vite';
import postcss from './postcss.config.js';

const sourceMapsUploadOptions = {
authToken: process.env.SENTRY_AUTH_TOKEN,
uploadSourceMaps: true,
telemetry: false,
debug: true,
org: 'dgrebb',
project: 'dgrebb',
include: ['build'],
setCommits: {
auto: true,
},
release: process.env.RELEASE_NAME,
dist: process.env.DIST,
finalize: false,
deploy: {
env: 'development',
},
};

export default defineConfig({
plugins: [
sentrySvelteKit({
sourceMapsUploadOptions: {
authToken: process.env.SENTRY_AUTH_TOKEN,
uploadSourceMaps: process.env.UPLOAD_SOURCEMAPS || false,
telemetry: false,
debug: true,
org: 'dgrebb',
project: 'dgrebb',
include: ['build'],
setCommits: {
auto: true,
},
release: process.env.RELEASE_NAME,
dist: process.env.DIST,
finalize: false,
deploy: {
env: 'development',
},
},
}),
process.env.UPLOAD_SOURCEMAPS
? sentrySvelteKit({
sourceMapsUploadOptions,
})
: null,
sveltekit(),
Icons({
compiler: 'svelte',
Expand Down

0 comments on commit b836dce

Please sign in to comment.