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:16-alpine as server-builder | |
WORKDIR /app | |
COPY . . | |
RUN --mount=type=cache,target=/app/.yarn/cache \ | |
npx turbo prune --scope=@me/application-a && \ | |
cp -R .yarn .yarnrc.yml tsconfig.json out/ && \ | |
cd out && \ | |
yarn install && \ |
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
{ | |
"name": "@me/monorepo", | |
"private": true, | |
"workspaces": [ | |
"packages/**/*", | |
"applications/**/*" | |
], | |
"scripts": { | |
"build": "turbo run build", | |
"dev": "concurrently \"yarn dev:init\" \"yarn watch\"", |
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
{ | |
"$schema": "https://turborepo.org/schema.json", | |
"baseBranch": "origin/master", | |
"pipeline": { | |
"build": { | |
"dependsOn": ["^build"], | |
"inputs": ["src/**/*", "package.json", "tsconfig.json"], | |
"outputs": ["dist/**"] | |
}, | |
"test": { |
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
{ | |
"name": "@me/application-a", | |
"scripts": { | |
"dev": "next dev", | |
"build": "next build", | |
"start": "next start", | |
"test": "cypress run" | |
}, | |
"dependencies": { | |
"@me/package-a": "workspace:^" |
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
{ | |
"name": "@me/package-a", | |
"scripts": { | |
"build": "concurrently \"yarn build:ts\" \"yarn build:css\" \"yarn build:assets\"", | |
"build:ts": "tsc --pretty", | |
"build:css": "postcss ./src/**/*.css --base ./src -d ./dist", | |
"build:assets": "mkdir -p ./dist/assets && cp -r ./src/assets ./dist", | |
"watch": "concurrently \"yarn watch:ts\" \"yarn watch:css\" \"yarn watch:assets\"", | |
"watch:ts": "chokidar \"src/**/*.ts\" \"src/**/*.tsx\" -c \"yarn build:ts\"", | |
"watch:css": "chokidar \"src/**/*.css\" -c \"yarn build:css\"", |
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 Chainable = Cypress.Chainable; | |
const getDialog = (name: string | RegExp) => { | |
return cy.findByRole('dialog', { name }); | |
}; | |
const getForm = (subject: Chainable, name: string | RegExp) => { | |
const chain = subject ? cy.wrap(subject) : cy; | |
return chain.findByRole('form', { |
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
Cypress.Commands.add('press', { prevSubject: 'element' }, (subject: JQuery) => { | |
cy.wrap(subject) | |
.focus(); | |
cy.focused() | |
.type('{enter}'); | |
return cy.wrap(subject); | |
}); |
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
cy.getButton('Favorite animal') | |
.press() | |
.popup() | |
.its('visible') | |
.should('be', true); | |
cy.getListBox('Favorite animal') | |
.select('Elephant'); | |
cy.getInput('Favorite animal') |
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
<label> | |
<span id="select-label">Favorite animal</span> | |
<input type="hidden" name="animal" /> | |
</label> | |
<button | |
aria-labelledby="select-label select-placeholder" | |
aria-controls="select-dropdown" | |
aria-haspopup="list" | |
aria-expanded="false" | |
> |
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
cy.getInput('Add File').attach('bear.jpg'); | |
// Wait for file to finish uploading | |
cy.getList('File List') | |
.getListItem('bear.jpg') | |
.progress() | |
.its('value') | |
.should('eq', '100'); | |
// Remove uploaded file |
NewerOlder