Merge 9f38cdfd0f into e1b4f9aafe
				
					
				
			This commit is contained in:
		
						commit
						8ec42edf9f
					
				
							
								
								
									
										28
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								components.d.ts
									
									
									
									
										vendored
									
									
								
							| @ -89,17 +89,28 @@ declare module '@vue/runtime-core' { | ||||
|     HttpStatusCodes: typeof import('./src/tools/http-status-codes/http-status-codes.vue')['default'] | ||||
|     IbanValidatorAndParser: typeof import('./src/tools/iban-validator-and-parser/iban-validator-and-parser.vue')['default'] | ||||
|     'IconMdi:brushVariant': typeof import('~icons/mdi/brush-variant')['default'] | ||||
|     'IconMdi:contentCopy': typeof import('~icons/mdi/content-copy')['default'] | ||||
|     'IconMdi:kettleSteamOutline': typeof import('~icons/mdi/kettle-steam-outline')['default'] | ||||
|     IconMdiArrowDown: typeof import('~icons/mdi/arrow-down')['default'] | ||||
|     IconMdiArrowRightBottom: typeof import('~icons/mdi/arrow-right-bottom')['default'] | ||||
|     IconMdiCamera: typeof import('~icons/mdi/camera')['default'] | ||||
|     IconMdiChevronDown: typeof import('~icons/mdi/chevron-down')['default'] | ||||
|     IconMdiChevronRight: typeof import('~icons/mdi/chevron-right')['default'] | ||||
|     IconMdiClose: typeof import('~icons/mdi/close')['default'] | ||||
|     IconMdiContentCopy: typeof import('~icons/mdi/content-copy')['default'] | ||||
|     IconMdiDeleteOutline: typeof import('~icons/mdi/delete-outline')['default'] | ||||
|     IconMdiDownload: typeof import('~icons/mdi/download')['default'] | ||||
|     IconMdiEye: typeof import('~icons/mdi/eye')['default'] | ||||
|     IconMdiEyeOff: typeof import('~icons/mdi/eye-off')['default'] | ||||
|     IconMdiHeart: typeof import('~icons/mdi/heart')['default'] | ||||
|     IconMdiPause: typeof import('~icons/mdi/pause')['default'] | ||||
|     IconMdiPlay: typeof import('~icons/mdi/play')['default'] | ||||
|     IconMdiRecord: typeof import('~icons/mdi/record')['default'] | ||||
|     IconMdiRefresh: typeof import('~icons/mdi/refresh')['default'] | ||||
|     IconMdiSearch: typeof import('~icons/mdi/search')['default'] | ||||
|     IconMdiTranslate: typeof import('~icons/mdi/translate')['default'] | ||||
|     IconMdiTriangleDown: typeof import('~icons/mdi/triangle-down')['default'] | ||||
|     IconMdiVideo: typeof import('~icons/mdi/video')['default'] | ||||
|     InputCopyable: typeof import('./src/components/InputCopyable.vue')['default'] | ||||
|     IntegerBaseConverter: typeof import('./src/tools/integer-base-converter/integer-base-converter.vue')['default'] | ||||
|     Ipv4AddressConverter: typeof import('./src/tools/ipv4-address-converter/ipv4-address-converter.vue')['default'] | ||||
| @ -126,25 +137,40 @@ declare module '@vue/runtime-core' { | ||||
|     MenuLayout: typeof import('./src/components/MenuLayout.vue')['default'] | ||||
|     MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default'] | ||||
|     MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default'] | ||||
|     NAlert: typeof import('naive-ui')['NAlert'] | ||||
|     NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default'] | ||||
|     NCheckbox: typeof import('naive-ui')['NCheckbox'] | ||||
|     NCode: typeof import('naive-ui')['NCode'] | ||||
|     NCollapseTransition: typeof import('naive-ui')['NCollapseTransition'] | ||||
|     NColorPicker: typeof import('naive-ui')['NColorPicker'] | ||||
|     NConfigProvider: typeof import('naive-ui')['NConfigProvider'] | ||||
|     NDatePicker: typeof import('naive-ui')['NDatePicker'] | ||||
|     NDivider: typeof import('naive-ui')['NDivider'] | ||||
|     NDynamicInput: typeof import('naive-ui')['NDynamicInput'] | ||||
|     NEllipsis: typeof import('naive-ui')['NEllipsis'] | ||||
|     NForm: typeof import('naive-ui')['NForm'] | ||||
|     NFormItem: typeof import('naive-ui')['NFormItem'] | ||||
|     NGi: typeof import('naive-ui')['NGi'] | ||||
|     NGrid: typeof import('naive-ui')['NGrid'] | ||||
|     NH1: typeof import('naive-ui')['NH1'] | ||||
|     NH2: typeof import('naive-ui')['NH2'] | ||||
|     NH3: typeof import('naive-ui')['NH3'] | ||||
|     NIcon: typeof import('naive-ui')['NIcon'] | ||||
|     NImage: typeof import('naive-ui')['NImage'] | ||||
|     NInputGroup: typeof import('naive-ui')['NInputGroup'] | ||||
|     NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel'] | ||||
|     NInputNumber: typeof import('naive-ui')['NInputNumber'] | ||||
|     NLabel: typeof import('naive-ui')['NLabel'] | ||||
|     NLayout: typeof import('naive-ui')['NLayout'] | ||||
|     NLayoutSider: typeof import('naive-ui')['NLayoutSider'] | ||||
|     NMenu: typeof import('naive-ui')['NMenu'] | ||||
|     NProgress: typeof import('naive-ui')['NProgress'] | ||||
|     NScrollbar: typeof import('naive-ui')['NScrollbar'] | ||||
|     NSlider: typeof import('naive-ui')['NSlider'] | ||||
|     NSpin: typeof import('naive-ui')['NSpin'] | ||||
|     NStatistic: typeof import('naive-ui')['NStatistic'] | ||||
|     NSwitch: typeof import('naive-ui')['NSwitch'] | ||||
|     NTable: typeof import('naive-ui')['NTable'] | ||||
|     NTag: typeof import('naive-ui')['NTag'] | ||||
|     NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default'] | ||||
|     OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default'] | ||||
|     PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default'] | ||||
|  | ||||
| @ -9,7 +9,7 @@ const theme = useThemeVars(); | ||||
| </script> | ||||
| 
 | ||||
| <template> | ||||
|   <router-link :to="tool.path" class="decoration-none"> | ||||
|   <router-link :to="tool.path" class="it-tool-link decoration-none"> | ||||
|     <c-card class="h-full transition transition-duration-0.5s !border-2px !hover:border-primary"> | ||||
|       <div flex items-center justify-between> | ||||
|         <n-icon class="text-neutral-400 dark:text-neutral-600" size="40" :component="tool.icon" /> | ||||
|  | ||||
							
								
								
									
										46
									
								
								src/tools/all-tools.e2e.spec.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								src/tools/all-tools.e2e.spec.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,46 @@ | ||||
| import { expect, test } from '@playwright/test'; | ||||
| 
 | ||||
| const ignoredHrefs = new Set(['/camera-recorder']); | ||||
| 
 | ||||
| test.describe('IT Tool', () => { | ||||
|   test('Loads all tools correctly', async ({ page }) => { | ||||
|     test.slow(); | ||||
| 
 | ||||
|     const allTools: string[] = []; | ||||
| 
 | ||||
|     await page.goto('/'); | ||||
|     await page.waitForSelector('.it-tool-link'); | ||||
|     const allLinks = await page.locator('.it-tool-link').all(); | ||||
|     for (const a of allLinks) { | ||||
|       allTools.push((await a.getAttribute('href')) || '/'); | ||||
|     } | ||||
| 
 | ||||
|     expect(allTools.length).toBeGreaterThan(0); | ||||
| 
 | ||||
|     const errors: Array<Error> = []; | ||||
| 
 | ||||
|     page.on('pageerror', (error) => { | ||||
|       // ignore errors related to physical devices (ie camera recorder)
 | ||||
|       if (error.message.match(/Requested device not found/)) { | ||||
|         return; | ||||
|       } | ||||
|       errors.push(error); | ||||
|     }); | ||||
| 
 | ||||
|     for (const toolHref of allTools) { | ||||
|       if (ignoredHrefs.has(toolHref)) { | ||||
|         continue; | ||||
|       } | ||||
|       await test.step(toolHref, async () => { | ||||
|         errors.splice(0, errors.length); | ||||
| 
 | ||||
|         await page.goto(toolHref); | ||||
|         await page.waitForSelector('.tool-header'); | ||||
| 
 | ||||
|         await expect(page).toHaveTitle(/.+ - IT Tools/); | ||||
| 
 | ||||
|         expect(errors, `${toolHref} to have no JS error`).toHaveLength(0); | ||||
|       }); | ||||
|     } | ||||
|   }); | ||||
| }); | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user