This file contains hidden or 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 * as FS from "fs" | |
import * as Jose from "jose" | |
const { publicKey, privateKey } = await Jose.generateKeyPair( "RS256" ) | |
const publicPem = await Jose.exportSPKI( publicKey ) | |
await FS.promises.writeFile( "./public.pem", publicPem, "utf-8" ) | |
const privatePem = await Jose.exportPKCS8( privateKey ) | |
await FS.promises.writeFile( "./private.pem", privatePem, "utf-8" ) |
This file contains hidden or 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 View from "../../components/View" | |
import { h, Component } from "preact" | |
export default class AddGameWithCode extends Component<{}, {}> { | |
render() { | |
return <View title="Add Game"> | |
<label for="code">Code</label> | |
<input id="code" name="code"/> | |
<button>Fetch game data</button> | |
<ul role="list" aria-label="list of players"> |
This file contains hidden or 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
<View title="Add Game"> | |
<label for="code">Code</label> | |
<input id="code" name="code"/> | |
<button>Fetch game data</button> | |
<ul role="list" aria-label="list of players"> | |
<li> | |
<label for="player-joe">joe</label> | |
<input id="player-joe" type="radio"/> | |
</li> | |
</ul> |
This file contains hidden or 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 codeInput = await page.$( | |
`//input[@aria-labelledby = (//*[text() = 'Code']/@id) or @id = (//*[text() = 'Code']/@for)]` ) | |
await codeInput.type( "111111" ) | |
await page.click( `//button[text() = 'Fetch game data']` ) | |
await page.waitForSelector( `//*[@aria-label='list of players']` ) | |
await page.click( `//input[@aria-labelledby = (//*[text() = 'joe']/@id) or @id = (//*[text() = 'joe']/@for)]` ) | |
await page.click( `//button[@type = 'submit' and text() = 'Submit']` ) | |
const alert = await page.waitForSelector( `//*[@role = 'alert' and @aria-label = 'confirmation']` ) |
This file contains hidden or 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
for |
This file contains hidden or 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
<Route path={ "/add-game-with-code" }> | |
<h2>Add Game</h2> | |
</Route> |
This file contains hidden or 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 browserUtils from "./support/browserUtils" | |
describe( "add game via ubs", function () { | |
before( async () => { | |
await browserUtils.start() | |
} ) | |
after( async () => { | |
await browserUtils.stop() |
This file contains hidden or 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 Fs = require('fs'); | |
const Cheerio = require('cheerio'); | |
/* | |
* This script simply extracts the head and body content from react-scritps | |
* production build and puts them in separate files for teamraiser | |
* pagewrapper | |
*/ | |
const content = Fs.readFileSync('./build/index.html', 'utf-8'); |
This file contains hidden or 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
FROM node:12-buster | |
RUN apt-get update \ | |
&& apt-get install -y vim tmux fish zsh | |
RUN wget -O- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg \ | |
&& mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ \ | |
&& wget https://packages.microsoft.com/config/debian/10/prod.list \ | |
&& mv prod.list /etc/apt/sources.list.d/microsoft-prod.list \ | |
&& chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg \ |
NewerOlder