Просмотр исходного кода

fix: restore team background section after merge

Developer 2 месяцев назад
Родитель
Сommit
f162869f0c
2 измененных файлов с 40 добавлено и 18 удалено
  1. 20 18
      components/CusTeamInfoFill/index.vue
  2. 20 0
      tests/teamBackgroundFile.test.js

Разница между файлами не показана из-за своего большого размера
+ 20 - 18
components/CusTeamInfoFill/index.vue


+ 20 - 0
tests/teamBackgroundFile.test.js

@@ -1072,6 +1072,25 @@ async function testTeamWebsiteInputExposesTheAuthoritativeLengthLimit() {
 	assert.match(source, /v-model="teamInfo\.enterpriseWebsite"[^>]*maxlength="500"/)
 }
 
+async function testTeamFillRendersBackgroundFilesAndBusyState() {
+	const source = fs.readFileSync(teamFillComponentPath, 'utf8')
+	assert.match(
+		source,
+		/<cus-team-background-files[^>]*ref="backgroundRef"[^>]*>/,
+		'the team form must render the registered background-file component'
+	)
+	assert.match(
+		source,
+		/:class="\{ disabled: confirming \|\| submitting \}"/,
+		'the submit button must expose its busy state'
+	)
+	const component = await loadVueComponent(teamFillComponentPath)
+	const state = component.data()
+	assert.equal(state.confirming, false, 'the submit lock must be reactive from initialization')
+	assert.equal(component.props.confirmText.type, String)
+	assert.equal(component.props.qtype.type, Boolean)
+}
+
 async function testTeamFillFlushesBeforeEmitAndLocks() {
 	const component = await loadVueComponent(teamFillComponentPath)
 	const flushDeferred = createDeferred()
@@ -1492,6 +1511,7 @@ async function main() {
 	await testFileActionsWaitForCurrentListAndDocumentContext()
 	await testSameTeamRefreshFailurePreservesExistingFilesAndCount()
 	await testTeamWebsiteInputExposesTheAuthoritativeLengthLimit()
+	await testTeamFillRendersBackgroundFilesAndBusyState()
 	await testTeamFillFlushesBeforeEmitAndLocks()
 	await testCreatedTeamResumeAndSubmitLock()
 	await testCreatedTeamNavigationIsAwaitableAndResumable()