mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
fix: tests
This commit is contained in:
@@ -6,7 +6,6 @@ import { page } from '$app/stores';
|
||||
|
||||
const analytics = Analytics({
|
||||
app: 'appwrite',
|
||||
debug: dev,
|
||||
plugins: [
|
||||
googleAnalytics({
|
||||
measurementIds: [globalThis.GOOGLE_ANALYTICS]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher, onDestroy, onMount } from 'svelte';
|
||||
import { Alert } from '$lib/components';
|
||||
import { trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
export let show = false;
|
||||
export let size: 'small' | 'big' = null;
|
||||
@@ -23,6 +24,9 @@
|
||||
|
||||
function handleBLur(event: MouseEvent) {
|
||||
if (event.target === dialog) {
|
||||
trackEvent('click_close_modal', {
|
||||
from: 'backdrop'
|
||||
});
|
||||
closeModal();
|
||||
}
|
||||
}
|
||||
@@ -47,6 +51,9 @@
|
||||
function handleKeydown(event: KeyboardEvent) {
|
||||
if (event.key === 'Escape') {
|
||||
event.preventDefault();
|
||||
trackEvent('click_close_modal', {
|
||||
from: 'escape'
|
||||
});
|
||||
closeModal();
|
||||
}
|
||||
}
|
||||
@@ -87,6 +94,10 @@
|
||||
class="x-button"
|
||||
aria-label="Close Modal"
|
||||
title="Close Modal"
|
||||
on:click={() =>
|
||||
trackEvent('click_close_modal', {
|
||||
from: 'button'
|
||||
})}
|
||||
on:click={closeModal}>
|
||||
<span class="icon-x" aria-hidden="true" />
|
||||
</button>
|
||||
|
||||
+4
-1
@@ -23,7 +23,10 @@ const config = {
|
||||
environment: 'jsdom',
|
||||
globals: true,
|
||||
threads: true,
|
||||
setupFiles: ['./tests/unit/setup.ts']
|
||||
setupFiles: ['./tests/unit/setup.ts'],
|
||||
deps: {
|
||||
inline: ['@analytics/type-utils']
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user