@@ -74,6 +74,20 @@ describe(!!config.workspaceSlug, "Project API Tests", () => {
7474 expect ( foundProject ?. name ) . toBe ( "Updated Test Project" ) ;
7575 } ) ;
7676
77+ it ( "should archive and unarchive a project" , async ( ) => {
78+ await client . projects . archive ( workspaceSlug , project . id ) ;
79+
80+ const archivedProject = await client . projects . retrieve ( workspaceSlug , project . id ) ;
81+ expect ( archivedProject ) . toBeDefined ( ) ;
82+ expect ( archivedProject . archived_at ) . toBeTruthy ( ) ;
83+
84+ await client . projects . unArchive ( workspaceSlug , project . id ) ;
85+
86+ const unarchivedProject = await client . projects . retrieve ( workspaceSlug , project . id ) ;
87+ expect ( unarchivedProject ) . toBeDefined ( ) ;
88+ expect ( unarchivedProject . archived_at ) . toBeFalsy ( ) ;
89+ } ) ;
90+
7791 it ( "should get project members" , async ( ) => {
7892 const members = await client . projects . getMembers ( workspaceSlug , project . id ) ;
7993
@@ -99,17 +113,17 @@ describe(!!config.workspaceSlug, "Project API Tests", () => {
99113 const originalFeatures = await client . projects . retrieveFeatures ( workspaceSlug , project . id ) ;
100114
101115 const updatedFeatures = await client . projects . updateFeatures ( workspaceSlug , project . id , {
102- epics : ! originalFeatures . epics ,
116+ pages : ! originalFeatures . pages ,
103117 modules : ! originalFeatures . modules ,
104118 } ) ;
105119
106120 expect ( updatedFeatures ) . toBeDefined ( ) ;
107- expect ( updatedFeatures . epics ) . toBe ( ! originalFeatures . epics ) ;
121+ expect ( updatedFeatures . pages ) . toBe ( ! originalFeatures . pages ) ;
108122 expect ( updatedFeatures . modules ) . toBe ( ! originalFeatures . modules ) ;
109123
110124 // Restore original values
111125 await client . projects . updateFeatures ( workspaceSlug , project . id , {
112- epics : originalFeatures . epics ,
126+ pages : originalFeatures . pages ,
113127 modules : originalFeatures . modules ,
114128 } ) ;
115129 } ) ;
0 commit comments