Skip to content

Commit

Permalink
Merge pull request #6765 from owncloud/check-props-not-html
Browse files Browse the repository at this point in the history
[unit-tests] fix failing `packages/web-app-files/tests/unit/views/shares/SharedWithOthers.spec.js`
  • Loading branch information
kiranparajuli589 authored Apr 11, 2022
2 parents f759754 + fcccd03 commit 29ba40c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import SharedWithOthers from '@files/src/views/shares/SharedWithOthers.vue'
import SharedData from '@/__fixtures__/sharedFiles.js'
import { createLocationShares } from '../../../../src/router'
import { buildSharedResource } from '../../../../src/helpers/resources'
import { Settings } from 'luxon'
import { Settings, DateTime } from 'luxon'
const resourcesList = SharedData.json().ocs.data.map((resource) => buildSharedResource(resource))

const expectedNow = DateTime.local(2022, 1, 1, 23, 0, 0)

const router = {
push: jest.fn(),
afterEach: jest.fn(),
Expand Down Expand Up @@ -47,6 +49,7 @@ const paginationStub = 'pagination-stub'
describe('SharedWithOthers view', () => {
beforeAll(() => {
Settings.defaultZone = 'utc'
Settings.now = () => expectedNow
})

it('should show the app-loading-spinner component when the wrapper is still loading', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ exports[`SharedWithOthers view when the wrapper is not loading anymore when leng
<oc-avatars-stub items="[object Object]" stacked="true" istooltipdisplayed="true" maxdisplayed="3" accessibledescription=" This folder is shared via 1 link" class="resource-table-people"></oc-avatars-stub>
</oc-button-stub>
</td>
<td class="oc-td oc-table-cell oc-table-cell-align-right oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-table-data-cell oc-table-data-cell-sdate" aria-label="9 months ago (June 9, 2021, 12:44 PM UTC)"><span tabindex="0">9 months ago</span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-right oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-table-data-cell oc-table-data-cell-sdate" aria-label="6 months ago (June 9, 2021, 12:44 PM UTC)"><span tabindex="0">6 months ago</span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-right oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-table-data-cell oc-table-data-cell-actions oc-pr-m">
<div class="resource-table-actions">
<oc-button-stub type="button" size="medium" arialabel="Show context menu" submit="button" variation="passive" appearance="raw" justifycontent="center" gapsize="medium" id="context-menu-trigger-38" class="resource-table-btn-action-dropdown"><span class="oc-icon oc-icon-m oc-icon-passive"><!----></span></oc-button-stub>
Expand All @@ -60,7 +60,7 @@ exports[`SharedWithOthers view when the wrapper is not loading anymore when leng
<oc-avatars-stub items="[object Object]" stacked="true" istooltipdisplayed="true" maxdisplayed="3" accessibledescription=" This folder is shared via 1 link" class="resource-table-people"></oc-avatars-stub>
</oc-button-stub>
</td>
<td class="oc-td oc-table-cell oc-table-cell-align-right oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-table-data-cell oc-table-data-cell-sdate" aria-label="9 months ago (June 9, 2021, 12:44 PM UTC)"><span tabindex="0">9 months ago</span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-right oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-table-data-cell oc-table-data-cell-sdate" aria-label="6 months ago (June 9, 2021, 12:44 PM UTC)"><span tabindex="0">6 months ago</span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-right oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-table-data-cell oc-table-data-cell-actions oc-pr-m">
<div class="resource-table-actions">
<oc-button-stub type="button" size="medium" arialabel="Show context menu" submit="button" variation="passive" appearance="raw" justifycontent="center" gapsize="medium" id="context-menu-trigger-64" class="resource-table-btn-action-dropdown"><span class="oc-icon oc-icon-m oc-icon-passive"><!----></span></oc-button-stub>
Expand All @@ -83,7 +83,7 @@ exports[`SharedWithOthers view when the wrapper is not loading anymore when leng
<oc-avatars-stub items="[object Object]" stacked="true" istooltipdisplayed="true" maxdisplayed="3" accessibledescription=" This folder is shared via 1 link" class="resource-table-people"></oc-avatars-stub>
</oc-button-stub>
</td>
<td class="oc-td oc-table-cell oc-table-cell-align-right oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-table-data-cell oc-table-data-cell-sdate" aria-label="9 months ago (June 9, 2021, 12:44 PM UTC)"><span tabindex="0">9 months ago</span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-right oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-table-data-cell oc-table-data-cell-sdate" aria-label="6 months ago (June 9, 2021, 12:44 PM UTC)"><span tabindex="0">6 months ago</span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-right oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-table-data-cell oc-table-data-cell-actions oc-pr-m">
<div class="resource-table-actions">
<oc-button-stub type="button" size="medium" arialabel="Show context menu" submit="button" variation="passive" appearance="raw" justifycontent="center" gapsize="medium" id="context-menu-trigger-39" class="resource-table-btn-action-dropdown"><span class="oc-icon oc-icon-m oc-icon-passive"><!----></span></oc-button-stub>
Expand All @@ -106,7 +106,7 @@ exports[`SharedWithOthers view when the wrapper is not loading anymore when leng
<oc-avatars-stub items="[object Object],[object Object]" stacked="true" istooltipdisplayed="true" maxdisplayed="3" accessibledescription="This file is shared via 1 invite This file is shared via 1 link" class="resource-table-people"></oc-avatars-stub>
</oc-button-stub>
</td>
<td class="oc-td oc-table-cell oc-table-cell-align-right oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-table-data-cell oc-table-data-cell-sdate" aria-label="9 months ago (June 9, 2021, 12:37 PM UTC)"><span tabindex="0">9 months ago</span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-right oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-table-data-cell oc-table-data-cell-sdate" aria-label="6 months ago (June 9, 2021, 12:37 PM UTC)"><span tabindex="0">6 months ago</span></td>
<td class="oc-td oc-table-cell oc-table-cell-align-right oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-table-data-cell oc-table-data-cell-actions oc-pr-m">
<div class="resource-table-actions">
<oc-button-stub type="button" size="medium" arialabel="Show context menu" submit="button" variation="passive" appearance="raw" justifycontent="center" gapsize="medium" id="context-menu-trigger-30" class="resource-table-btn-action-dropdown"><span class="oc-icon oc-icon-m oc-icon-passive"><!----></span></oc-button-stub>
Expand Down

0 comments on commit 29ba40c

Please sign in to comment.