Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shadrach-tayo committed Nov 7, 2024
1 parent 82c3e06 commit 4f39c55
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions desci-server/test/integration/Attestation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ describe('Attestations Service', async () => {

// add to community entry
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: reproducibilityAttestation.id,
attestationVersion: reproducibilityAttestationVersion.id,
Expand All @@ -375,6 +376,7 @@ describe('Attestations Service', async () => {
versions = await attestationService.getAttestationVersions(openDataAttestation.id);
openDataAttestationVersion = versions[versions.length - 1];
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: openDataAttestation.id,
attestationVersion: openDataAttestationVersion.id,
Expand Down Expand Up @@ -476,6 +478,7 @@ describe('Attestations Service', async () => {

// add to community entry
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: reproducibilityAttestation.id,
attestationVersion: reproducibilityAttestationVersion.id,
Expand All @@ -484,6 +487,7 @@ describe('Attestations Service', async () => {
versions = await attestationService.getAttestationVersions(openDataAttestation.id);
openDataAttestationVersion = versions[versions.length - 1];
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: openDataAttestation.id,
attestationVersion: openDataAttestationVersion.id,
Expand Down Expand Up @@ -579,6 +583,7 @@ describe('Attestations Service', async () => {

// add to community entry
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: reproducibilityAttestation.id,
attestationVersion: reproducibilityAttestationVersion.id,
Expand All @@ -587,6 +592,7 @@ describe('Attestations Service', async () => {
versions = await attestationService.getAttestationVersions(openDataAttestation.id);
openDataAttestationVersion = versions[versions.length - 1];
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: openDataAttestation.id,
attestationVersion: openDataAttestationVersion.id,
Expand Down Expand Up @@ -700,6 +706,7 @@ describe('Attestations Service', async () => {

// add to community entry list
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: reproducibilityAttestation.id,
attestationVersion: attestationVersion.id,
Expand Down Expand Up @@ -983,6 +990,7 @@ describe('Attestations Service', async () => {

// add to community entry
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: reproducibilityAttestation.id,
attestationVersion: reproducibilityAttestationVersion.id,
Expand All @@ -991,6 +999,7 @@ describe('Attestations Service', async () => {
versions = await attestationService.getAttestationVersions(openDataAttestation.id);
openDataAttestationVersion = versions[versions.length - 1];
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: openDataAttestation.id,
attestationVersion: openDataAttestationVersion.id,
Expand Down Expand Up @@ -1129,6 +1138,7 @@ describe('Attestations Service', async () => {

// add to community entry
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: reproducibilityAttestation.id,
attestationVersion: reproducibilityAttestationVersion.id,
Expand All @@ -1137,6 +1147,7 @@ describe('Attestations Service', async () => {
versions = await attestationService.getAttestationVersions(openDataAttestation.id);
openDataAttestationVersion = versions[versions.length - 1];
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: openDataAttestation.id,
attestationVersion: openDataAttestationVersion.id,
Expand Down Expand Up @@ -1269,6 +1280,7 @@ describe('Attestations Service', async () => {

// add to community entry
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: reproducibilityAttestation.id,
attestationVersion: reproducibilityAttestationVersion.id,
Expand All @@ -1277,13 +1289,15 @@ describe('Attestations Service', async () => {
versions = await attestationService.getAttestationVersions(openDataAttestation.id);
openDataAttestationVersion = versions[versions.length - 1];
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: openDataAttestation.id,
attestationVersion: openDataAttestationVersion.id,
});

// add to local community entry
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: localCommunity.id,
attestationId: LocalReproducibilityAttestation.id,
attestationVersion: localReproducibilityAttestationVersion.id,
Expand Down Expand Up @@ -1571,6 +1585,7 @@ describe('Attestations Service', async () => {
reproducibilityAttestationVersion = versions[versions.length - 1];
// add to community entry
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: reproducibilityAttestation.id,
attestationVersion: reproducibilityAttestationVersion.id,
Expand All @@ -1579,6 +1594,7 @@ describe('Attestations Service', async () => {
versions = await attestationService.getAttestationVersions(openDataAttestation.id);
openDataAttestationVersion = versions[versions.length - 1];
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: openDataAttestation.id,
attestationVersion: openDataAttestationVersion.id,
Expand Down Expand Up @@ -1955,6 +1971,7 @@ describe('Attestations Service', async () => {

// add to community entry
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: reproducibilityAttestation.id,
attestationVersion: reproducibilityAttestationVersion.id,
Expand All @@ -1963,6 +1980,7 @@ describe('Attestations Service', async () => {
versions = await attestationService.getAttestationVersions(openDataAttestation.id);
openDataAttestationVersion = versions[versions.length - 1];
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: desciCommunity.id,
attestationId: openDataAttestation.id,
attestationVersion: openDataAttestationVersion.id,
Expand Down
3 changes: 3 additions & 0 deletions desci-server/test/integration/community.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ describe('Desci Communities', () => {
const versions = await attestationService.getAttestationVersions(attestation.id);
version = versions[versions.length - 1];
selectedAttestation = await attestationService.addCommunityEntryAttestation({
required: true,
communityId: daoCommunity.id,
attestationId: attestation.id,
attestationVersion: version.id,
Expand All @@ -298,6 +299,7 @@ describe('Desci Communities', () => {
const versions2 = await attestationService.getAttestationVersions(attestation2.id);
selectedVersion = versions2[versions2.length - 1];
selectedAttestation2 = await attestationService.addCommunityEntryAttestation({
required: true,
communityId: daoCommunity.id,
attestationId: attestation2.id,
attestationVersion: selectedVersion.id,
Expand All @@ -316,6 +318,7 @@ describe('Desci Communities', () => {
try {
assert(daoCommunity);
await attestationService.addCommunityEntryAttestation({
required: true,
communityId: daoCommunity.id,
attestationId: attestation.id,
attestationVersion: version.id,
Expand Down

0 comments on commit 4f39c55

Please sign in to comment.