Vue core updates -- type inference has a bug in tests that isn't addressed here, so annotate it as any with a note to remove in the future

This commit is contained in:
Dannon Baker
2023-02-13 11:43:09 -05:00
parent ddb8ab2086
commit f95154bbe4
5 changed files with 40 additions and 35 deletions
+6 -6
View File
@@ -21,7 +21,7 @@
],
"resolutions": {
"chokidar": "3.5.3",
"vue": "2.7.8",
"vue": "2.7.14",
"vue-loader": "15.10.0"
},
"dependencies": {
@@ -98,7 +98,7 @@
"tus-js-client": "^2.3.0",
"underscore": "^1.13.2",
"util": "^0.12.4",
"vue": "^2.7.8",
"vue": "^2.7.14",
"vue-infinite-scroll": "^2.0.2",
"vue-multiselect": "^2.1.6",
"vue-observe-visibility": "^1.0.0",
@@ -145,9 +145,9 @@
"@testing-library/jest-dom": "^5.16.4",
"@typescript-eslint/eslint-plugin": "^5.45.1",
"@typescript-eslint/parser": "^5.45.1",
"@vue/test-utils": "^1.3.3",
"@vue/test-utils": "^1.3.4",
"@vue/tsconfig": "^0.1.3",
"@vue/vue2-jest": "^29.2.1",
"@vue/vue2-jest": "^29.2.2",
"amdi18n-loader": "^0.9.4",
"autoprefixer": "10.4.13",
"axios-mock-adapter": "^1.20.0",
@@ -186,12 +186,12 @@
"store": "^2.0.12",
"style-loader": "^3.3.1",
"ts-jest": "^29.0.3",
"ts-loader": "^9.4.1",
"ts-loader": "^9.4.2",
"tsconfig-paths-webpack-plugin": "^4.0.0",
"typescript": "^4.9.3",
"typescript-eslint": "^0.0.1-alpha.0",
"vue-loader": "^15.10.1",
"vue-template-compiler": "^2.7.8",
"vue-template-compiler": "^2.7.14",
"webpack": "^5.75.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1",
@@ -57,9 +57,11 @@ describe("ReviewCleanupDialog.vue", () => {
const selectAllCheckbox = wrapper.find(SELECT_ALL_CHECKBOX);
expect(deleteButton.attributes().disabled).toBeTruthy();
expect(wrapper.vm.selectedItems.length).toBe(0);
// TODO: explicit any because the type of the vm is not correctly inferred, remove when fixed
expect((wrapper.vm as any).selectedItems.length).toBe(0);
await selectAllCheckbox.setChecked();
expect(wrapper.vm.selectedItems.length).toBe(EXPECTED_TOTAL_ITEMS);
// TODO: explicit any because the type of the vm is not correctly inferred, remove when fixed
expect((wrapper.vm as any).selectedItems.length).toBe(EXPECTED_TOTAL_ITEMS);
expect(deleteButton.attributes().disabled).toBeFalsy();
});
@@ -28,7 +28,8 @@ describe("QuotaUsageBar.vue", () => {
it("should display the quota source label when the quota source is not the default one", async () => {
const wrapper = mountQuotaUsageBarWith(NON_DEFAULT_QUOTA_USAGE);
const storageSourceLabel = wrapper.find(".storage-source-label");
expect(wrapper.vm.isDefaultQuota).toBe(false);
// TODO: explicit any because the type of the vm is not correctly inferred, remove when fixed
expect((wrapper.vm as any).isDefaultQuota).toBe(false);
expect(storageSourceLabel.exists()).toBe(true);
expect(storageSourceLabel.text()).toBe(NON_DEFAULT_QUOTA_USAGE.sourceLabel);
});
@@ -36,7 +37,8 @@ describe("QuotaUsageBar.vue", () => {
it("should show the usage percent when there is a quota limit", async () => {
const wrapper = mountQuotaUsageBarWith(NON_DEFAULT_QUOTA_USAGE);
const percentText = wrapper.find(".quota-percent-text");
expect(wrapper.vm.quotaHasLimit).toBe(true);
// TODO: explicit any because the type of the vm is not correctly inferred, remove when fixed
expect((wrapper.vm as any).quotaHasLimit).toBe(true);
expect(percentText.exists()).toBe(true);
expect(percentText.text()).toContain(NON_DEFAULT_QUOTA_USAGE.quotaPercent?.toString());
});
@@ -44,7 +46,8 @@ describe("QuotaUsageBar.vue", () => {
it("should not show percentage when there is no quota limit", async () => {
const wrapper = mountQuotaUsageBarWith(UNLIMITED_USAGE);
const percentText = wrapper.find(".quota-percent-text");
expect(wrapper.vm.quotaHasLimit).toBe(false);
// TODO: explicit any because the type of the vm is not correctly inferred, remove when fixed
expect((wrapper.vm as any).quotaHasLimit).toBe(false);
expect(percentText.exists()).toBe(false);
});
});
@@ -35,8 +35,8 @@ describe("QuotaUsageSummary.vue", () => {
it("should calculate the total amount of quotas without the unlimited", () => {
const wrapper = mountQuotaUsageSummaryWith(FAKE_QUOTA_USAGES_LIST);
const expectedTotalBytes = QUOTA_1_BYTES + QUOTA_2_BYTES;
expect(wrapper.vm.totalQuotaInBytes).toBe(expectedTotalBytes);
// TODO: explicit any because the type of the vm is not correctly inferred, remove when fixed
expect((wrapper.vm as any).totalQuotaInBytes).toBe(expectedTotalBytes);
});
it("should display a quota bar for each quota", () => {
+22 -22
View File
@@ -2584,10 +2584,10 @@
"@typescript-eslint/types" "5.46.1"
eslint-visitor-keys "^3.3.0"
"@vue/compiler-sfc@2.7.8":
version "2.7.8"
resolved "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.8.tgz"
integrity sha512-2DK4YWKfgLnW9VDR9gnju1gcYRk3flKj8UNsms7fsRmFcg35slVTZEkqwBtX+wJBXaamFfn6NxSsZh3h12Ix/Q==
"@vue/compiler-sfc@2.7.14":
version "2.7.14"
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-2.7.14.tgz#3446fd2fbb670d709277fc3ffa88efc5e10284fd"
integrity sha512-aNmNHyLPsw+sVvlQFQ2/8sjNuLtK54TC6cuKnVzAY93ks4ZBrvwQSnkkIh7bsbNhum5hJBS00wSDipQ937f5DA==
dependencies:
"@babel/parser" "^7.18.4"
postcss "^8.4.14"
@@ -2614,10 +2614,10 @@
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.4.5.tgz#d54e844c1adbb1e677c81c665ecef1a2b4bb8380"
integrity sha512-JD5fcdIuFxU4fQyXUu3w2KpAJHzTVdN+p4iOX2lMWSHMOoQdMAcpFLZzm9Z/2nmsoZ1a96QEhZ26e50xLBsgOQ==
"@vue/test-utils@^1.3.3":
version "1.3.3"
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.3.3.tgz#4fbd38587b0ec091dfaa355ac38ce3d888273285"
integrity sha512-DmZkKrH5/MSkrU0hhHhv5+aOXcEJSaOhutKMOh2viuiLiMaFeOLPiTEvtegLunO3rXBagzHO681qW1sNMaB1sQ==
"@vue/test-utils@^1.3.4":
version "1.3.4"
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.3.4.tgz#83a68179178cb3da4b2b7c5c59ac660dbdff8ef5"
integrity sha512-yh2sbosCxk5FfwjXYXdY9rUffaJqYEFjsod5sCD4oosRn2x8LfBLEzQH0scdo5n7z8VkBUThpYzbkI6DVAWimA==
dependencies:
dom-event-types "^1.0.0"
lodash "^4.17.15"
@@ -2628,7 +2628,7 @@
resolved "https://registry.yarnpkg.com/@vue/tsconfig/-/tsconfig-0.1.3.tgz#4a61dbd29783d01ddab504276dcf0c2b6988654f"
integrity sha512-kQVsh8yyWPvHpb8gIc9l/HIDiiVUy1amynLNpCy8p+FoCiZXCo6fQos5/097MmnNZc9AtseDsCrfkhqCrJ8Olg==
"@vue/vue2-jest@^29.2.1":
"@vue/vue2-jest@^29.2.2":
version "29.2.2"
resolved "https://registry.yarnpkg.com/@vue/vue2-jest/-/vue2-jest-29.2.2.tgz#12c1711f7e61e3c91ac8817138b6a1ce0083e076"
integrity sha512-C/b8+vuwUlFIeOsxe7uaw4LdH5w/V1jrxrwNaTEWqeOUT/fFUyyhwewUHsBGWjCFWJYX45xpla081qmS9Nb2jQ==
@@ -10942,10 +10942,10 @@ ts-jest@^29.0.3:
semver "7.x"
yargs-parser "^21.0.1"
ts-loader@^9.4.1:
version "9.4.1"
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.4.1.tgz#b6f3d82db0eac5a8295994f8cb5e4940ff6b1060"
integrity sha512-384TYAqGs70rn9F0VBnh6BPTfhga7yFNdC5gXbQpDrBj9/KsT4iRkGqKXhziofHOlE2j6YEaiTYVGKKvPhGWvw==
ts-loader@^9.4.2:
version "9.4.2"
resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-9.4.2.tgz#80a45eee92dd5170b900b3d00abcfa14949aeb78"
integrity sha512-OmlC4WVmFv5I0PpaxYb+qGeGOdm5giHU7HwDDUjw59emP2UYMHy9fFSDcYgSNoH8sXcj4hGCSEhlDZ9ULeDraA==
dependencies:
chalk "^4.1.0"
enhanced-resolve "^5.0.0"
@@ -11456,10 +11456,10 @@ vue-style-loader@^4.1.0:
hash-sum "^1.0.2"
loader-utils "^1.0.2"
vue-template-compiler@^2.7.8:
version "2.7.8"
resolved "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.8.tgz"
integrity sha512-eQqdcUpJKJpBRPDdxCNsqUoT0edNvdt1jFjtVnVS/LPPmr0BU2jWzXlrf6BVMeODtdLewB3j8j3WjNiB+V+giw==
vue-template-compiler@^2.7.14:
version "2.7.14"
resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.7.14.tgz#4545b7dfb88090744c1577ae5ac3f964e61634b1"
integrity sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==
dependencies:
de-indent "^1.0.2"
he "^1.2.0"
@@ -11474,12 +11474,12 @@ vue-virtual-scroll-list@^2.3.4:
resolved "https://registry.yarnpkg.com/vue-virtual-scroll-list/-/vue-virtual-scroll-list-2.3.4.tgz#0d08c2d26299d8609018b8c04f5e3ca608fbe2d6"
integrity sha512-a9bmmIhAdnKcp8NG0C9ZQ+pW9nAOrDv5SHqJfbbEpXxVVERCtbIgGeBnkwrGgmoILBoFz/WANIZgA22G44F0Yw==
vue@2.7.8, vue@^2.6.10, vue@^2.7.8:
version "2.7.8"
resolved "https://registry.yarnpkg.com/vue/-/vue-2.7.8.tgz#34e06553137611d8cecc4b0cd78b7a59f80b1299"
integrity sha512-ncwlZx5qOcn754bCu5/tS/IWPhXHopfit79cx+uIlLMyt3vCMGcXai5yCG5y+I6cDmEj4ukRYyZail9FTQh7lQ==
vue@2.7.14, vue@^2.6.10, vue@^2.7.14:
version "2.7.14"
resolved "https://registry.yarnpkg.com/vue/-/vue-2.7.14.tgz#3743dcd248fd3a34d421ae456b864a0246bafb17"
integrity sha512-b2qkFyOM0kwqWFuQmgd4o+uHGU7T+2z3T+WQp8UBjADfEv2n4FEMffzBmCKNP0IGzOEEfYjvtcC62xaSKeQDrQ==
dependencies:
"@vue/compiler-sfc" "2.7.8"
"@vue/compiler-sfc" "2.7.14"
csstype "^3.1.0"
vuedraggable@2.24.3: