Skip to content

Commit

Permalink
WIP(ui-form-field): add ssr-regression github action
Browse files Browse the repository at this point in the history
  • Loading branch information
joyenjoyer committed Jun 11, 2024
1 parent 296af8a commit a09ede7
Show file tree
Hide file tree
Showing 127 changed files with 8,063 additions and 8,649 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ssr-regression.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: SSR Regression Tests
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
jobs:
ssr-regression:
runs-on: ubuntu-latest
strategy:
matrix:
browser: [ chrome, firefox ]
defaults:
run:
working-directory: ./regression-test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cypress run
uses: cypress-io/github-action@v6
with:
build: npm run build
start: npm start

This file was deleted.

1 change: 1 addition & 0 deletions regression-test/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
next-env.d.ts
3 changes: 3 additions & 0 deletions regression-test/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
50 changes: 39 additions & 11 deletions regression-test/.gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
dist/
public/bundle.*
node_modules/
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
**/.next/
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage

# next.js
/out/
.

# production
/build
/src/.next/
/.next/


# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
9 changes: 9 additions & 0 deletions regression-test/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from 'cypress'

export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
}
}
})
8 changes: 8 additions & 0 deletions regression-test/cypress/e2e/spec.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
describe('regression test', () => {
it('open dialog subpage', () => {
cy.visit('http://localhost:3000')
cy.get('a').contains('dialog').click()
cy.get('button').click()
cy.get('[data-cid="CloseButton"]').click()
})
})
37 changes: 37 additions & 0 deletions regression-test/cypress/support/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/// <reference types="cypress" />
// ***********************************************
// This example commands.ts shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// https://on.cypress.io/custom-commands
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add('login', (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
//
// declare global {
// namespace Cypress {
// interface Chainable {
// login(email: string, password: string): Chainable<void>
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
// }
// }
// }
20 changes: 20 additions & 0 deletions regression-test/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// ***********************************************************
// This example support/e2e.ts is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import './commands'

// Alternatively you can use CommonJS syntax:
// require('./commands')
56 changes: 0 additions & 56 deletions regression-test/esbuild.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions regression-test/next.config.js

This file was deleted.

4 changes: 4 additions & 0 deletions regression-test/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};

export default nextConfig;
Loading

0 comments on commit a09ede7

Please sign in to comment.