-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into emil/clock-icon
- Loading branch information
Showing
21 changed files
with
392 additions
and
370 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Template Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
template-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get Yarn cache path | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- name: Checkout branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Load Yarn cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Remove Postinstall Script | ||
run: npm pkg set scripts.postinstall="echo no-postinstall" | ||
|
||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
env: | ||
CI: true | ||
|
||
- name: Create component with template | ||
run: yarn new:component --name ComponentName | ||
|
||
- name: Re-link Dependencies | ||
run: yarn install --frozen-lockfile | ||
env: | ||
CI: true | ||
|
||
- name: Build Components | ||
run: yarn build:components | ||
|
||
- name: Check global types | ||
run: | | ||
yarn vue-tsc --noEmit -p . | ||
yarn tsc --noEmit --project ./tsconfig.react.json | ||
yarn vue-tsc --noEmit --project ./tsconfig.vue.json | ||
- name: Lint all files | ||
run: yarn eslint . | ||
|
||
# run cypress component tests | ||
- name: Cypress run CT | ||
uses: cypress-io/github-action@v5 | ||
with: | ||
component: true | ||
record: true | ||
browser: chrome | ||
spec: components/ComponentName/**/* | ||
env: | ||
# Recommended: pass the GitHub token lets this action correctly | ||
# determine the unique run id necessary to re-run the checks | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} |
10 changes: 0 additions & 10 deletions
10
_templates/component/new/components_ComponentName_react_ComponentName.rootstory.tsx.ejs.t
This file was deleted.
Oops, something went wrong.
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
9 changes: 0 additions & 9 deletions
9
_templates/component/new/components_ComponentName_vue_ComponentName.rootstory.tsx.ejs.t
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,43 @@ | ||
/// <reference types="cypress" /> | ||
import { mount } from 'cypress/vue' | ||
import assertions from '../assertions' | ||
import TagStory from './Tag.rootstory' | ||
import Tag from './Tag.vue' | ||
import { SizeClasses, ColorClasses } from '../constants' | ||
|
||
describe('<Tag/>', () => { | ||
function mountStory() { | ||
mount(() => <TagStory />) | ||
mount(() => ( | ||
<div class="flex flex-row flex-wrap items-start justify-center bg-gray-700 gap-6"> | ||
{(Object.keys(SizeClasses) as Array<keyof typeof SizeClasses>).map( | ||
(size) => { | ||
return ( | ||
<div class="flex flex-col items-center gap-3 justify-center my-4 p-4 bg-white rounded-lg"> | ||
<h3 class="text-right">{size}</h3> | ||
{(Object.keys(ColorClasses) as Array<keyof typeof ColorClasses>) | ||
.reverse() | ||
.map((color) => { | ||
return ( | ||
<> | ||
<div class="flex items-center justify-center"> | ||
<Tag size={size} color={color}> | ||
{`{Tag}`} | ||
</Tag> | ||
</div> | ||
<div class="flex items-center justify-center"> | ||
<Tag size={size} color={color} dark> | ||
{`{Tag}`} | ||
</Tag> | ||
</div> | ||
</> | ||
) | ||
})} | ||
</div> | ||
) | ||
}, | ||
)} | ||
</div> | ||
)) | ||
} | ||
|
||
assertions(mountStory) | ||
}) |
Oops, something went wrong.