Skip to content

Commit b062b59

Browse files
committedMar 6, 2024
test(sdk): remove need for hard-codes documentID
1 parent 7d37bef commit b062b59

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed
 

‎packages/sdk/src/index.e2e.test.ts

+8-5
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,20 @@ describe('deleteDocument', () => {
155155
});
156156

157157
describe("getDocument", () => {
158-
it("should get publicly shared diagram", async() => {
158+
it("should get diagram", async() => {
159+
const newDocument = await client.createDocument(testProjectId);
160+
161+
documentsToDelete.add(newDocument.documentID);
162+
159163
const latestDocument = await client.getDocument({
160-
// owned by alois@mermaidchart.com
161-
documentID: '8bce727b-69b7-4f6e-a434-d578e2b363ff',
164+
documentID: newDocument.documentID,
165+
// major and minor are optional
162166
});
163167

164168
expect(latestDocument).toStrictEqual(documentMatcher);
165169

166170
const earliestDocument = await client.getDocument({
167-
// owned by alois@mermaidchart.com
168-
documentID: '8bce727b-69b7-4f6e-a434-d578e2b363ff',
171+
documentID: newDocument.documentID,
169172
major: 0,
170173
minor: 1,
171174
});

0 commit comments

Comments
 (0)
Failed to load comments.