From 59ad093b2d00f73ee0d77596756954792deeb48e Mon Sep 17 00:00:00 2001 From: crisnicandrei <62384997+crisnicandrei@users.noreply.github.com> Date: Wed, 24 Jul 2024 19:22:30 +0300 Subject: [PATCH 1/9] PER-9566-glam-invited-as-archive-member - Created the new glam component which will be used to show the pending archives. - Added the text to it - Refactored the onboarding component to include the new glam component based on the isGlam variable from local storage - Created the new glam component which will be used to show the pending archive with the accept button. --- .../glam-pending-archives.component.html | 14 ++++++ .../glam-pending-archives.component.scss | 24 ++++++++++ .../glam-pending-archives.component.spec.ts | 23 +++++++++ .../glam-pending-archives.component.ts | 18 +++++++ .../pending-archive.component.html | 1 + .../pending-archive.component.scss | 0 .../pending-archive.component.spec.ts | 23 +++++++++ .../pending-archive.component.ts | 13 +++++ .../onboarding/onboarding.component.html | 47 ++++++++++++------- src/app/onboarding/onboarding.module.ts | 2 + 10 files changed, 147 insertions(+), 18 deletions(-) create mode 100644 src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.html create mode 100644 src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.scss create mode 100644 src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.spec.ts create mode 100644 src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.ts create mode 100644 src/app/onboarding/components/glam/pending-archive/pending-archive.component.html create mode 100644 src/app/onboarding/components/glam/pending-archive/pending-archive.component.scss create mode 100644 src/app/onboarding/components/glam/pending-archive/pending-archive.component.spec.ts create mode 100644 src/app/onboarding/components/glam/pending-archive/pending-archive.component.ts diff --git a/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.html b/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.html new file mode 100644 index 000000000..97564e6f4 --- /dev/null +++ b/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.html @@ -0,0 +1,14 @@ +
+ Hello {{ accountName }}. Welcome to Permanent! +
++ You’ve been invited to collaborate on an archive as an archive member. A + Permanent archive is the collection of digital materials about an + individual, family or group, or organizational entity. Get started by + accepting an invitation, or by creating a new archive of your own. +
+pending-archive works!
diff --git a/src/app/onboarding/components/glam/pending-archive/pending-archive.component.scss b/src/app/onboarding/components/glam/pending-archive/pending-archive.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src/app/onboarding/components/glam/pending-archive/pending-archive.component.spec.ts b/src/app/onboarding/components/glam/pending-archive/pending-archive.component.spec.ts new file mode 100644 index 000000000..ba8d9fe00 --- /dev/null +++ b/src/app/onboarding/components/glam/pending-archive/pending-archive.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { PendingArchiveComponent } from './pending-archive.component'; + +describe('PendingArchiveComponent', () => { + let component: PendingArchiveComponent; + let fixture: ComponentFixturepending-archive works!
+ ++ The {{ archive.fullName }} Archive +
+Invited as {{ roles[archive.accessRole] }}
+
diff --git a/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.scss b/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.scss
index 71aa5367b..5d86258da 100644
--- a/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.scss
+++ b/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.scss
@@ -1,3 +1,4 @@
+/* @format */
@import 'variables';
@import 'fonts';
diff --git a/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.spec.ts b/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.spec.ts
index 96c2686c7..40880c8b7 100644
--- a/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.spec.ts
+++ b/src/app/onboarding/components/glam-pending-archives/glam-pending-archives.component.spec.ts
@@ -1,23 +1,82 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
-
+/* @format */
+import { Shallow } from 'shallow-render';
import { GlamPendingArchivesComponent } from './glam-pending-archives.component';
+import { OnboardingModule } from '../../onboarding.module';
+import { AccountService } from '@shared/services/account/account.service';
+import { ArchiveVO } from '@models/index';
+
+const mockAccountService = {
+ getAccount: () => {
+ return {
+ fullName: 'John Doe',
+ };
+ },
+};
describe('GlamPendingArchivesComponent', () => {
- let component: GlamPendingArchivesComponent;
- let fixture: ComponentFixture
- The {{ archive.fullName }} Archive + The {{ archive?.fullName }} Archive
Invited as {{ roles[archive.accessRole] }}