Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add remaining tests for mailbox representation #385

Merged
merged 5 commits into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"homepage": "https://github.com/solidos/solid-panes",
"dependencies": {
"@solid/better-simple-slideshow": "^0.1.0",
"@types/jest": "^29.5.12",
"activitystreams-pane": "^0.6.13",
"chat-pane": "^2.4.26",
"contacts-pane": "^2.6.12",
Expand All @@ -68,7 +69,6 @@
"@babel/preset-typescript": "^7.24.1",
"@testing-library/dom": "^9.3.4",
"@testing-library/jest-dom": "^6.4.2",
"@types/jest": "^29.5.12",
"@types/webpack-env": "^1.18.4",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
Expand Down
105 changes: 0 additions & 105 deletions src/outline/licenseOptions.js

This file was deleted.

9 changes: 0 additions & 9 deletions src/outline/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import * as UI from 'solid-ui'
import { authn, authSession, store } from 'solid-logic'
import { propertyViews } from './propertyViews'
import { licenseOptions } from './licenseOptions'

import { outlineIcons } from './outlineIcons.js' // @@ chec
import { UserInput } from './userInput.js'
import * as queryByExample from './queryByExample.js'
Expand Down Expand Up @@ -169,7 +167,7 @@
obj,
view,
deleteNode,
statement

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (16.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (16.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (16.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (16.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (16.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (16.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (16.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (16.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'statement' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 170 in src/outline/manager.js

View workflow job for this annotation

GitHub Actions / build (18.x)

'statement' is defined but never used. Allowed unused args must match /^_/u
) {
const td = dom.createElement('td')
td.setAttribute(
Expand All @@ -179,13 +177,6 @@
td.setAttribute('notSelectable', 'false')
let theClass = 'obj'

// check the IPR on the data. Ok if there is any checked license which is one the document has.
if (statement && statement.why) {
if (licenseOptions && licenseOptions.checklicense && licenseOptions.checklicense()) {
theClass += ' licOkay' // flag as light green etc .licOkay {background-color: #dfd}
}
}

// set about and put 'expand' icon
if (
obj.termType === 'NamedNode' ||
Expand Down
3 changes: 2 additions & 1 deletion src/outline/propertyViews.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe('property views', () => {
const view = views.defaults[property]
const result = view(sym('mailto:[email protected]'))
expect(result).toBeInstanceOf(HTMLAnchorElement)
expect(result).toHaveAttribute('href', 'mailto:[email protected]')
expect(result).toHaveAttribute('href', 'mailto:[email protected]');
expect(result).toHaveTextContent('[email protected]');
})
})
8 changes: 7 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
// See https://stackoverflow.com/questions/54139158/cannot-find-name-describe-do-you-need-to-install-type-definitions-for-a-test

"compilerOptions": {
/* Basic Options */
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
Expand Down Expand Up @@ -50,9 +52,13 @@
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
"typeRoots": [
"node_modules/@types",
"node_modules/@testing-library",
"./typings"
] /* List of folders to include type definitions from. */,
// "types": [], /* Type declaration files to be included in compilation. */

"types": ["node", "jsdom", "jest", "jest-dom"], /* https://medium.com/heybooster/debugging-typescript-jest-dom-matchers-in-vue-js-6962dab4d4cc */

// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
Expand All @@ -68,5 +74,5 @@
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
},
"include": ["src/**/*"],
"exclude": ["node_modules", "**/*.test.ts"]
"exclude": ["node_modules"] // was , "**/*.test.ts"
}
Loading