release: align H5 demo UI and login
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
const assert = require('node:assert/strict')
|
||||
const fs = require('node:fs')
|
||||
const path = require('node:path')
|
||||
|
||||
const root = path.resolve(__dirname, '..')
|
||||
const authService = fs.readFileSync(path.join(root, 'src/api/services/auth.ts'), 'utf8')
|
||||
const authStore = fs.readFileSync(path.join(root, 'src/stores/auth.ts'), 'utf8')
|
||||
const backendController = fs.readFileSync(path.resolve(root, '../backend/src/main/java/com/danyang/match/platform/auth/controller/AuthController.java'), 'utf8')
|
||||
|
||||
assert.match(authService, /demoLogin\(/)
|
||||
assert.match(authStore, /authService\.demoLogin\(/)
|
||||
assert.match(backendController, /@PostMapping\("\/demo\/login"\)/)
|
||||
|
||||
console.log('PASS: demo login contract')
|
||||
@@ -0,0 +1,15 @@
|
||||
const assert = require('node:assert/strict')
|
||||
const fs = require('node:fs')
|
||||
const path = require('node:path')
|
||||
|
||||
const root = path.resolve(__dirname, '..')
|
||||
const tabLayout = fs.readFileSync(path.join(root, 'src/layouts/TabLayout.vue'), 'utf8')
|
||||
const pageLayout = fs.readFileSync(path.join(root, 'src/layouts/PageLayout.vue'), 'utf8')
|
||||
const home = fs.readFileSync(path.join(root, 'src/pages/home/HomePage.vue'), 'utf8')
|
||||
|
||||
assert.match(tabLayout, /to="\/messages"[^>]*>消息<\/van-tabbar-item>/)
|
||||
assert.match(pageLayout, /class="page-layout__nav"/)
|
||||
assert.match(home, /home-hero-v2\.jpg/)
|
||||
assert.doesNotMatch(home, /home__banner-cover[^\n]*\{\{ \(b\.title \|\| '善'\)\.slice\(0, 1\) \}\}/)
|
||||
|
||||
console.log('PASS: H5 UI contract')
|
||||
Reference in New Issue
Block a user