View google-analytics-response.json
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
[ | |
[ | |
"/continuous-monitoring-using-flood-element-and-azure-devops/", | |
"46" | |
], | |
[ | |
"/securing-traefik-dashboard-with-azure-ad/", | |
"80" | |
], | |
... |
View google-analytics.js
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
/** | |
* Retrieves unique page views from Google Analytics | |
* @param {*} pagePath the path to filter from results | |
*/ | |
async function getUniquePageViews(pagePath) { | |
const defaults = { | |
'auth': jwt, | |
'ids': 'ga:' + process.env.GA_VIEW_ID, | |
} | |
await jwt.authorize() |
View google-auth.js
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
//create jwt object | |
const jwt = new google.auth.JWT(process.env.GA_CLIENT_EMAIL, null, process.env.GA_PRIVATE_KEY, 'https://www.googleapis.com/auth/analytics.readonly'); | |
//authorize using jwt object | |
await jwt.authorize() |
View floodrunner_puppeteer_amazon_cart.js
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
/** | |
* @name Amazon shopping cart flow | |
* | |
* @desc Searches for a "nyan cat pullover" on amazon.com and then adds it to user's cart | |
*/ | |
const puppeteer = require('puppeteer') | |
try { | |
(async () => { | |
// # 1 |
View azure-pipeline.yml
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
# Starter pipeline | |
# Start with a minimal pipeline that you can customize to build and deploy your code. | |
# Add steps that build, run tests, deploy, and more: | |
# https://aka.ms/yaml | |
variables: | |
NODE_ENV: "Production" | |
MAX_RETRIES: 3 | |
trigger: |
View package.json
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
{ | |
... | |
"scripts": { | |
"start": "node index.js", | |
"pipeline": "node index.js if [ $? -ne 0 ] then exit 1 fi", | |
... | |
}, | |
... | |
} |
View index.js
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
const winston = require('./helpers/winston'); | |
const fileCleanup = require("./helpers/file-helper"); | |
const testHelpers = require("./helpers/element-test-helper"); | |
//remove all old results and logs | |
winston.info(`--- Cleaning up all old files ---`); | |
fileCleanup(); | |
// register tests to run | |
const floodTests = [ |
View floodelement_sampletest.ts
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
import { step, TestSettings, Until, By, Device } from "@flood/element"; | |
import * as assert from "assert"; | |
export const settings: TestSettings = { | |
device: Device.iPadLandscape, | |
userAgent: | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36", | |
clearCache: true, | |
disableCache: true, | |
clearCookies: true, |
View traefik-dashboard-rule.yml
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
apiVersion: traefik.containo.us/v1alpha1 | |
kind: IngressRoute | |
metadata: | |
name: traefik-dashboard | |
spec: | |
entryPoints: | |
- web | |
- websecure | |
routes: | |
- match: Host(`traefik.YOURDOMAIN.com`) |
NewerOlder