This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
changelog/unreleased/change-remove-resource-status-indicators
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Change: Remove OcStatusIndicators from OcResource | ||
|
||
We've removed OcStatusIndicators from OcResource | ||
since it will be moved in a separate column | ||
|
||
https://github.com/owncloud/web/issues/5976 | ||
https://github.com/owncloud/web/pull/6552 | ||
https://github.com/owncloud/owncloud-design-system/pull/2014 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Enhancement: Redesign OcStatusIndicators | ||
|
||
We've redesigned the share/status indicators to fit | ||
in a separate column in the ResourceTable in web | ||
|
||
https://github.com/owncloud/web/issues/5976 | ||
https://github.com/owncloud/web/pull/6552 | ||
https://github.com/owncloud/owncloud-design-system/pull/2014 |
51 changes: 51 additions & 0 deletions
51
src/components/molecules/OcStatusIndicators/OcStatusIndicators.spec.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import StatusIndicators from "./OcStatusIndicators.vue" | ||
import { mount } from "@vue/test-utils" | ||
|
||
const fileResource = { | ||
name: "forest.jpg", | ||
path: "nature/forest.jpg", | ||
thumbnail: "https://cdn.pixabay.com/photo/2015/09/09/16/05/forest-931706_960_720.jpg", | ||
indicators: [], | ||
type: "file", | ||
isFolder: false, | ||
extension: "jpg", | ||
} | ||
const indicator = { | ||
id: "testid", | ||
label: "testlabel", | ||
type: "testtype", | ||
handler: jest.fn(), | ||
} | ||
describe("OcStatusIndicators", () => { | ||
it("does call indicator handler on click", () => { | ||
var called = false | ||
const wrapper = mount(StatusIndicators, { | ||
propsData: { | ||
resource: fileResource, | ||
indicators: [ | ||
{ | ||
id: "test", | ||
label: "test", | ||
type: "test", | ||
handler: () => { | ||
called = true | ||
}, | ||
}, | ||
], | ||
target: "test", | ||
}, | ||
}) | ||
wrapper.find(".oc-status-indicators-indicator").trigger("click") | ||
expect(called).toBeTruthy() | ||
}) | ||
it("does create indicator with id", () => { | ||
const wrapper = mount(StatusIndicators, { | ||
propsData: { | ||
resource: fileResource, | ||
indicators: [indicator], | ||
target: "test", | ||
}, | ||
}) | ||
expect(wrapper.find(`#${indicator.id}`).exists()).toBeTruthy() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters