Skip to content

Commit

Permalink
Update primevue
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas ONeil <[email protected]>
  • Loading branch information
loneil committed Aug 11, 2023
1 parent 03b2c03 commit 7ddb3bb
Show file tree
Hide file tree
Showing 17 changed files with 136 additions and 117 deletions.
8 changes: 4 additions & 4 deletions services/tenant-ui/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion services/tenant-ui/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"pinia": "^2.1.6",
"primeflex": "^3.3.1",
"primeicons": "^6.0.1",
"primevue": "^3.29.2",
"primevue": "^3.32.0",
"qrcode.vue": "^3.4.1",
"vanilla-jsoneditor": "^0.17.8",
"vue": "^3.3.1",
Expand Down
17 changes: 0 additions & 17 deletions services/tenant-ui/frontend/test/App.test.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ exports[`Acapy > mount matches snapshot with expected values 1`] = `
</div>
<div data-v-59165757=\\"\\" class=\\"grid mt-4\\">
<div data-v-59165757=\\"\\" class=\\"col-12 md:col-6 lg:col-4\\">
<div data-v-59165757=\\"\\" class=\\"p-accordion p-component\\">
<div class=\\"p-accordion-tab\\" data-index=\\"0\\">
<div class=\\"p-accordion-header\\"><a id=\\"undefined_0_header_action\\" class=\\"p-accordion-header-link p-accordion-header-action\\" tabindex=\\"0\\" role=\\"button\\" aria-expanded=\\"false\\" aria-controls=\\"undefined_0_content\\"><svg width=\\"14\\" height=\\"14\\" viewBox=\\"0 0 14 14\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"p-icon p-accordion-toggle-icon\\" aria-hidden=\\"true\\">
<div data-v-59165757=\\"\\" class=\\"p-accordion p-component\\" data-pc-name=\\"accordion\\" data-pc-section=\\"root\\">
<div class=\\"p-accordion-tab\\" data-pc-section=\\"root\\" data-pc-name=\\"accordiontab\\" data-pc-index=\\"0\\" data-p-active=\\"false\\">
<div class=\\"p-accordion-header\\" data-pc-section=\\"header\\" data-p-highlight=\\"false\\"><a id=\\"undefined_0_header_action\\" class=\\"p-accordion-header-link p-accordion-header-action\\" tabindex=\\"0\\" role=\\"button\\" aria-expanded=\\"false\\" aria-controls=\\"undefined_0_content\\" data-pc-section=\\"headeraction\\"><svg width=\\"14\\" height=\\"14\\" viewBox=\\"0 0 14 14\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"p-icon p-accordion-toggle-icon\\" aria-hidden=\\"true\\" data-pc-section=\\"headericon\\">
<path d=\\"M4.38708 13C4.28408 13.0005 4.18203 12.9804 4.08691 12.9409C3.99178 12.9014 3.9055 12.8433 3.83313 12.7701C3.68634 12.6231 3.60388 12.4238 3.60388 12.2161C3.60388 12.0084 3.68634 11.8091 3.83313 11.6622L8.50507 6.99022L3.83313 2.31827C3.69467 2.16968 3.61928 1.97313 3.62287 1.77005C3.62645 1.56698 3.70872 1.37322 3.85234 1.22959C3.99596 1.08597 4.18972 1.00371 4.3928 1.00012C4.59588 0.996539 4.79242 1.07192 4.94102 1.21039L10.1669 6.43628C10.3137 6.58325 10.3962 6.78249 10.3962 6.99022C10.3962 7.19795 10.3137 7.39718 10.1669 7.54416L4.94102 12.7701C4.86865 12.8433 4.78237 12.9014 4.68724 12.9409C4.59212 12.9804 4.49007 13.0005 4.38708 13Z\\" fill=\\"currentColor\\"></path>
</svg><span class=\\"p-accordion-header-text\\">about.acaPy.plugins</span>
</svg><span class=\\"p-accordion-header-text\\" data-pc-section=\\"headertitle\\">about.acaPy.plugins</span>
<!---->
</a></div>
<transition-stub name=\\"p-toggleable-content\\" appear=\\"false\\" persisted=\\"false\\" css=\\"true\\">
<div id=\\"undefined_0_content\\" class=\\"p-toggleable-content\\" role=\\"region\\" aria-labelledby=\\"undefined_0_header_action\\" style=\\"display: none;\\">
<div class=\\"p-accordion-content\\">
<transition-stub name=\\"p-toggleable-content\\" appear=\\"false\\" persisted=\\"false\\" css=\\"true\\" data-pc-section=\\"accordiontab.transition\\">
<div id=\\"undefined_0_content\\" class=\\"p-toggleable-content\\" role=\\"region\\" aria-labelledby=\\"undefined_0_header_action\\" data-pc-section=\\"toggleablecontent\\" style=\\"display: none;\\">
<div class=\\"p-accordion-content\\" data-pc-section=\\"content\\">
<div data-v-59165757=\\"\\" class=\\"vjs-tree\\">
<div class=\\"vjs-tree-node\\">
<!---->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ describe('InfoModal', () => {
const wrapper = mountInfoModal();

const dialog = wrapper.getComponent({ name: 'Dialog' });
expect(dialog.vm.visible).toBe(false);
expect(dialog.vm.modal).toBe(true);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().visible).toBe(
'false'
);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().modal).toBe(
'true'
);
});

test('clicking span sets dialog to visible', async () => {
Expand All @@ -35,8 +39,12 @@ describe('InfoModal', () => {

await flushPromises();
const dialog = wrapper.getComponent({ name: 'Dialog' });
expect(dialog.vm.visible).toBe(true);
expect(dialog.vm.modal).toBe(true);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().visible).toBe(
'true'
);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().modal).toBe(
'true'
);
});

test('setting displayModal on open modal to false closes to modal', async () => {
Expand All @@ -46,9 +54,13 @@ describe('InfoModal', () => {
wrapper.get('span').trigger('click');
await flushPromises();

expect(dialog.vm.visible).toBe(true);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().visible).toBe(
'true'
);
wrapperVm.displayModal = false;
await flushPromises();
expect(dialog.vm.visible).toBe(false);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().visible).toBe(
'false'
);
});
});
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`LocaleSwitcher > mount matches snapshot with expected values 1`] = `
"<div data-v-b3ea55c9=\\"\\" class=\\"p-dropdown p-component p-inputwrapper p-inputwrapper-filled mr-4\\"><span class=\\"p-dropdown-label p-inputtext p-dropdown-label-empty\\" tabindex=\\"0\\" role=\\"combobox\\" aria-haspopup=\\"listbox\\" aria-expanded=\\"false\\" aria-controls=\\"undefined_list\\" aria-disabled=\\"false\\">&nbsp;</span>
"<div data-v-b3ea55c9=\\"\\" class=\\"p-dropdown p-component p-inputwrapper p-inputwrapper-filled mr-4\\" data-pc-name=\\"dropdown\\" data-pc-section=\\"root\\"><span class=\\"p-dropdown-label p-inputtext p-dropdown-label-empty\\" tabindex=\\"0\\" role=\\"combobox\\" aria-haspopup=\\"listbox\\" aria-expanded=\\"false\\" aria-controls=\\"undefined_list\\" aria-disabled=\\"false\\" data-pc-section=\\"input\\">&nbsp;</span>
<!---->
<div class=\\"p-dropdown-trigger\\"><svg width=\\"14\\" height=\\"14\\" viewBox=\\"0 0 14 14\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"p-icon p-dropdown-trigger-icon\\" aria-hidden=\\"true\\">
<div class=\\"p-dropdown-trigger\\" data-pc-section=\\"trigger\\"><svg width=\\"14\\" height=\\"14\\" viewBox=\\"0 0 14 14\\" fill=\\"none\\" xmlns=\\"http://www.w3.org/2000/svg\\" class=\\"p-icon p-dropdown-trigger-icon\\" aria-hidden=\\"true\\" data-pc-section=\\"dropdownicon\\">
<path d=\\"M7.01744 10.398C6.91269 10.3985 6.8089 10.378 6.71215 10.3379C6.61541 10.2977 6.52766 10.2386 6.45405 10.1641L1.13907 4.84913C1.03306 4.69404 0.985221 4.5065 1.00399 4.31958C1.02276 4.13266 1.10693 3.95838 1.24166 3.82747C1.37639 3.69655 1.55301 3.61742 1.74039 3.60402C1.92777 3.59062 2.11386 3.64382 2.26584 3.75424L7.01744 8.47394L11.769 3.75424C11.9189 3.65709 12.097 3.61306 12.2748 3.62921C12.4527 3.64535 12.6199 3.72073 12.7498 3.84328C12.8797 3.96582 12.9647 4.12842 12.9912 4.30502C13.0177 4.48162 12.9841 4.662 12.8958 4.81724L7.58083 10.1322C7.50996 10.2125 7.42344 10.2775 7.32656 10.3232C7.22968 10.3689 7.12449 10.3944 7.01744 10.398Z\\" fill=\\"currentColor\\"></path>
</svg></div>
<!---->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
exports[`SkeletonCard > mount matches snapshot with expected values 1`] = `
"<div class=\\"border-round border-1 surface-border p-4 surface-card\\">
<div class=\\"flex mb-3\\">
<div style=\\"width: 4rem; height: 4rem;\\" class=\\"p-skeleton p-component p-skeleton-circle mr-2\\" aria-hidden=\\"true\\"></div>
<div class=\\"p-skeleton p-component p-skeleton-circle mr-2\\" style=\\"position: relative; width: 4rem; height: 4rem;\\" aria-hidden=\\"true\\" data-pc-name=\\"skeleton\\" data-pc-section=\\"root\\"></div>
<div>
<div style=\\"width: 10rem; height: 1rem;\\" class=\\"p-skeleton p-component mb-2\\" aria-hidden=\\"true\\"></div>
<div style=\\"width: 5rem; height: 1rem;\\" class=\\"p-skeleton p-component mb-2\\" aria-hidden=\\"true\\"></div>
<div class=\\"p-skeleton p-component mb-2\\" style=\\"position: relative; width: 10rem; height: 1rem;\\" aria-hidden=\\"true\\" data-pc-name=\\"skeleton\\" data-pc-section=\\"root\\"></div>
<div class=\\"p-skeleton p-component mb-2\\" style=\\"position: relative; width: 5rem; height: 1rem;\\" aria-hidden=\\"true\\" data-pc-name=\\"skeleton\\" data-pc-section=\\"root\\"></div>
</div>
</div>
<div style=\\"width: 100%; height: 150px;\\" class=\\"p-skeleton p-component\\" aria-hidden=\\"true\\"></div>
<div class=\\"p-skeleton p-component\\" style=\\"position: relative; width: 100%; height: 150px;\\" aria-hidden=\\"true\\" data-pc-name=\\"skeleton\\" data-pc-section=\\"root\\"></div>
<div class=\\"flex justify-content-end mt-3\\">
<div style=\\"width: 8rem; height: 2rem;\\" class=\\"p-skeleton p-component mr-3\\" aria-hidden=\\"true\\"></div>
<div style=\\"width: 8rem; height: 2rem;\\" class=\\"p-skeleton p-component\\" aria-hidden=\\"true\\"></div>
<div class=\\"p-skeleton p-component mr-3\\" style=\\"position: relative; width: 8rem; height: 2rem;\\" aria-hidden=\\"true\\" data-pc-name=\\"skeleton\\" data-pc-section=\\"root\\"></div>
<div class=\\"p-skeleton p-component\\" style=\\"position: relative; width: 8rem; height: 2rem;\\" aria-hidden=\\"true\\" data-pc-name=\\"skeleton\\" data-pc-section=\\"root\\"></div>
</div>
</div>"
`;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`SuperYou > mount matches snapshot with expected values 1`] = `
"<button class=\\"p-button p-component\\" type=\\"button\\" aria-label=\\"test test\\" title=\\"Custom API Call\\"><span class=\\"p-button-icon p-button-icon-left pi pi-user\\"></span><span class=\\"p-button-label\\">test test</span>
"<button class=\\"p-button p-component\\" type=\\"button\\" aria-label=\\"test test\\" data-pc-name=\\"button\\" data-pc-section=\\"root\\" title=\\"Custom API Call\\" data-pd-ripple=\\"true\\"><span class=\\"p-button-icon p-button-icon-left pi pi-user\\" data-pc-section=\\"icon\\"></span><span class=\\"p-button-label\\" data-pc-section=\\"label\\">test test</span>
<!---->
</button>
<!---->"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,17 @@ describe('AcceptInvitation', () => {
const wrapper = mountAcceptInvitation();

wrapper.getComponent({ name: 'Button' });
expect(wrapper.getComponent({ name: 'Dialog' }).vm.visible).toBe(false);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().visible).toBe(
'false'
);
});

test('dialog becomes visible on button click', async () => {
const wrapper = mountAcceptInvitation();

await wrapper.getComponent({ name: 'Button' }).trigger('click');
expect(wrapper.getComponent({ name: 'Dialog' }).vm.visible).toBe(true);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().visible).toBe(
'true'
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ describe('CreateContact', async () => {

wrapper.getComponent({ name: 'Button' });

expect(wrapper.getComponent({ name: 'Dialog' }).vm.visible).toBe(false);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().visible).toBe(
'false'
);
});

test('button click opens modal', async () => {
const wrapper = mountCreateContact();

wrapper.getComponent({ name: 'Button' }).trigger('click');
await flushPromises();
expect(wrapper.getComponent({ name: 'Dialog' }).vm.visible).toBe(true);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().visible).toBe(
'true'
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ describe('RegenerateInvitation', async () => {
const wrapper = mountRegenerateInvitation();

wrapper.getComponent({ name: 'Button' });
expect(wrapper.getComponent({ name: 'Dialog' }).vm.visible).toBe(false);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().visible).toBe(
'false'
);
});

test('sucessful form calls toast info and external function', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ describe('DidExchange', () => {
const wrapper = mountDidExchange();

wrapper.getComponent({ name: 'Button' });
expect(wrapper.getComponent({ name: 'Dialog' }).vm.visible).toBe(false);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().visible).toBe(
'false'
);
});

test('modal opens on button click', async () => {
const wrapper = mountDidExchange();

wrapper.getComponent({ name: 'Button' }).trigger('click');
await flushPromises();
expect(wrapper.getComponent({ name: 'Dialog' }).vm.visible).toBe(true);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().visible).toBe(
'true'
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ describe('EditContact', () => {
const wrapper = mountEditContact();

wrapper.getComponent({ name: 'Button' });
expect(wrapper.getComponent({ name: 'Dialog' }).vm.visible).toBe(false);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().visible).toBe(
'false'
);
});

test('modal becomes visible on button click', async () => {
const wrapper = mountEditContact();

await wrapper.getComponent({ name: 'Button' }).trigger('click');
expect(wrapper.getComponent({ name: 'Dialog' }).vm.visible).toBe(true);
expect(wrapper.getComponent({ name: 'Dialog' }).attributes().visible).toBe(
'true'
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ describe('MessageContact', () => {

wrapper.getComponent({ name: 'Button', props: { icon: 'pi pi-comments' } });
const sidebar = wrapper.getComponent({ name: 'Sidebar' });
expect(sidebar.vm.visible).toBe(false);
expect(sidebar.vm.position).toBe('right');
expect(sidebar.attributes().visible).toBe('false');
expect(sidebar.attributes().position).toBe('right');
});

test('sidebar opens on button click', async () => {
Expand All @@ -35,6 +35,6 @@ describe('MessageContact', () => {
.trigger('click');

const sidebar = wrapper.getComponent({ name: 'Sidebar' });
expect(sidebar.vm.visible).toBe(true);
expect(sidebar.attributes().visible).toBe('true');
});
});
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Header > mount matches snapshot with expected values 1`] = `
"<div data-v-243d8871=\\"\\" class=\\"p-toolbar p-component traction-header\\" role=\\"toolbar\\">
<div class=\\"p-toolbar-group-start p-toolbar-group-left\\">
"<div data-v-243d8871=\\"\\" class=\\"p-toolbar p-component traction-header\\" role=\\"toolbar\\" data-pc-name=\\"toolbar\\" data-pc-section=\\"root\\">
<div class=\\"p-toolbar-group-start p-toolbar-group-left\\" data-pc-section=\\"start\\">
<div data-v-243d8871=\\"\\" class=\\"hamburger\\" title=\\"layout.header.toggleSideMenu\\"><i data-v-243d8871=\\"\\" class=\\"pi pi-bars p-toolbar-separator mr-2\\"></i></div>
</div>
<div class=\\"p-toolbar-group-center\\"></div>
<div class=\\"p-toolbar-group-end p-toolbar-group-right\\">
<div class=\\"p-toolbar-group-center\\" data-pc-section=\\"center\\"></div>
<div class=\\"p-toolbar-group-end p-toolbar-group-right\\" data-pc-section=\\"end\\">
<locale-switcher-stub data-v-243d8871=\\"\\"></locale-switcher-stub>
<profile-button-stub data-v-243d8871=\\"\\"></profile-button-stub>
</div>
Expand Down
Loading

0 comments on commit 7ddb3bb

Please sign in to comment.