forked from trent_larson/crowd-funder-for-time-pwa
feat: enhance EntityGrid with function props and improve code formatting
- Add configurable entity display logic via function props to EntityGrid - Implement comprehensive test suite for EntityGrid function props in TestView - Apply consistent code formatting across 15 components and views - Fix linting issues with trailing commas and line breaks - Add new EntityGridFunctionPropTest.vue for component testing - Update endorserServer with improved error handling and logging - Streamline PlatformServiceMixin with better cache management - Enhance component documentation and type safety Changes span 15 files with 159 additions and 69 deletions, focusing on component flexibility, code quality, and testing infrastructure.
This commit is contained in:
@@ -157,6 +157,52 @@
|
||||
{{ simpleEncryptionTestResultDisplay }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-8">
|
||||
<h2 class="text-xl font-bold mb-4">Component Tests</h2>
|
||||
Interactive tests for Vue components and their functionality.
|
||||
|
||||
<div class="mt-4">
|
||||
<h3 class="text-lg font-semibold mb-2">EntityGrid Function Props</h3>
|
||||
<p class="text-sm text-gray-600 mb-3">
|
||||
Test the new function prop functionality in EntityGrid component.
|
||||
</p>
|
||||
<button
|
||||
:class="primaryButtonClasses"
|
||||
@click="showEntityGridTest = !showEntityGridTest"
|
||||
>
|
||||
{{ showEntityGridTest ? "Hide" : "Show" }} EntityGrid Function Prop
|
||||
Test
|
||||
</button>
|
||||
|
||||
<div
|
||||
v-if="showEntityGridTest"
|
||||
class="mt-4 p-4 border border-gray-300 rounded-md bg-gray-50"
|
||||
>
|
||||
<EntityGridFunctionPropTest />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<h3 class="text-lg font-semibold mb-2">Platform Service Mixin</h3>
|
||||
<p class="text-sm text-gray-600 mb-3">
|
||||
Test database operations through PlatformServiceMixin.
|
||||
</p>
|
||||
<button
|
||||
:class="primaryButtonClasses"
|
||||
@click="showPlatformServiceTest = !showPlatformServiceTest"
|
||||
>
|
||||
{{ showPlatformServiceTest ? "Hide" : "Show" }} Platform Service Test
|
||||
</button>
|
||||
|
||||
<div
|
||||
v-if="showPlatformServiceTest"
|
||||
class="mt-4 p-4 border border-gray-300 rounded-md bg-gray-50"
|
||||
>
|
||||
<PlatformServiceMixinTest />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
@@ -192,6 +238,8 @@ import {
|
||||
import { logger } from "../utils/logger";
|
||||
import { Account } from "../db/tables/accounts";
|
||||
import { PlatformServiceMixin } from "@/utils/PlatformServiceMixin";
|
||||
import EntityGridFunctionPropTest from "../test/EntityGridFunctionPropTest.vue";
|
||||
import PlatformServiceMixinTest from "../test/PlatformServiceMixinTest.vue";
|
||||
|
||||
const inputFileNameRef = ref<Blob>();
|
||||
|
||||
@@ -231,7 +279,11 @@ const TEST_PAYLOAD = {
|
||||
* @author Matthew Raymer
|
||||
*/
|
||||
@Component({
|
||||
components: { QuickNav },
|
||||
components: {
|
||||
QuickNav,
|
||||
EntityGridFunctionPropTest,
|
||||
PlatformServiceMixinTest,
|
||||
},
|
||||
mixins: [PlatformServiceMixin],
|
||||
})
|
||||
export default class Help extends Vue {
|
||||
@@ -258,6 +310,10 @@ export default class Help extends Vue {
|
||||
|
||||
cryptoLib = cryptoLib;
|
||||
|
||||
// for component tests
|
||||
showEntityGridTest = false;
|
||||
showPlatformServiceTest = false;
|
||||
|
||||
/**
|
||||
* Computed properties for template streamlining
|
||||
* Eliminates repeated classes and logic in template
|
||||
@@ -469,7 +525,10 @@ export default class Help extends Vue {
|
||||
* Method to trigger notification test
|
||||
* Centralizes notification testing logic
|
||||
*/
|
||||
triggerTestNotification(config: any) {
|
||||
triggerTestNotification(config: {
|
||||
notification: NotificationIface;
|
||||
timeout?: number;
|
||||
}) {
|
||||
this.$notify(config.notification, config.timeout);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user