Skip to content

Commit 25aea55

Browse files
committed
Fix journal title and tests
1 parent b6ec36d commit 25aea55

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ export class FurAffinityClient {
10031003
beta: {
10041004
id: pickStaticValue(ensureIdIsNumber(id)),
10051005
self_link: pickStaticValue(path),
1006-
title: ".content .section-header h2.journal-title",
1006+
title: "#c-journalTitleTop__subject h3",
10071007
user_name: `userpage-nav-header > userpage-nav-user-details ${SELECTOR_USER} span.js-displayName`,
10081008
user_url: pickLink(
10091009
`userpage-nav-header > userpage-nav-avatar > ${SELECTOR_USER}.current`
@@ -1016,7 +1016,7 @@ export class FurAffinityClient {
10161016
selector: ".content .journal-item div.journal-content",
10171017
how: "html",
10181018
},
1019-
when: this.pickWhenFromSpan(".content .section-header span.popup_date"),
1019+
when: this.pickWhenFromSpan("#c-journalTitleTop__date span.popup_date"),
10201020
comments: this.getCommentsObj("#comments-journal", "beta"),
10211021
},
10221022
});

tests/submission.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe("submission", () => {
2727
);
2828
const normalizedHtml = actual.body_html.replace(/\s+/g, " ");
2929
expect(normalizedHtml).toEqual(
30-
`This is a submission for integration testing <a class="auto_link named_url external" href="https://github.com/cheeplusplus/fa.js" rel="nofollow ugc noreferrer noopener">fa.js</a><br> <br> This account and art belongs to <a href="/user/andrewneo" class="iconusername"><img src="//a.furaffinity.net/${liveThumbDateStr}/andrewneo.gif" align="middle" title="andrewneo" alt="andrewneo">&nbsp;andrewneo</a>, the artist of the work is <a href="/user/tinderhoof" class="iconusername"><img src="//a.furaffinity.net/${liveThumbDateStr}/tinderhoof.gif" align="middle" title="tinderhoof" alt="tinderhoof">&nbsp;tinderhoof</a>. <a class="auto_link named_url" href="https://www.furaffinity.net/view/23617101/">Original upload is here</a>`,
30+
`This is a submission for integration testing <a class="auto_link external" href="https://github.com/cheeplusplus/fa.js" rel="nofollow ugc noreferrer noopener">fa.js</a><br> <br> This account and art belongs to <a href="/user/andrewneo" class="iconusername"><img src="//a.furaffinity.net/${liveThumbDateStr}/andrewneo.gif" align="middle" title="andrewneo" alt="andrewneo">&nbsp;andrewneo</a>, the artist of the work is <a href="/user/tinderhoof" class="iconusername"><img src="//a.furaffinity.net/${liveThumbDateStr}/tinderhoof.gif" align="middle" title="tinderhoof" alt="tinderhoof">&nbsp;tinderhoof</a>. <a class="auto_link " href="https://www.furaffinity.net/view/23617101/">Original upload is here</a>`,
3131
);
3232
// 2024-10-26T22:36:00
3333
expect(actual.when).toBeWithinOneMinuteOf(getDateFromEpoch(1730007360000));
@@ -66,7 +66,7 @@ describe("submission", () => {
6666
user_url: "/user/andrewneo/",
6767
user_thumb_url: "https://a.furaffinity.net/1563504911/andrewneo.gif",
6868
body_text: "This is a second top level comment with some bbcode",
69-
body_html: `This is a second top level comment <strong class="bbcode bbcode_b">with some bbcode</strong>`,
69+
body_html: `This is a second top level comment <b class="bbcode bbcode_b">with some bbcode</b>`,
7070
// 2024-10-26T22:41:08
7171
when: getDateFromEpoch(1730007668000),
7272
},
@@ -108,7 +108,7 @@ describe("submission", () => {
108108
);
109109
const normalizedHtml = actual.body_html.replace(/\s+/g, " ");
110110
expect(normalizedHtml).toEqual(
111-
`This is a "story" for integration testing <a class="auto_link named_url external" href="https://github.com/cheeplusplus/fa.js" rel="nofollow ugc noreferrer noopener">fa.js</a><br> <br> This account belongs to <a href="/user/andrewneo" class="iconusername"><img src="//a.furaffinity.net/${liveThumbDateStr}/andrewneo.gif" align="middle" title="andrewneo" alt="andrewneo">&nbsp;andrewneo</a>, this writing was written by hand this time! &gt;:C`,
111+
`This is a "story" for integration testing <a class="auto_link external" href="https://github.com/cheeplusplus/fa.js" rel="nofollow ugc noreferrer noopener">fa.js</a><br> <br> This account belongs to <a href="/user/andrewneo" class="iconusername"><img src="//a.furaffinity.net/${liveThumbDateStr}/andrewneo.gif" align="middle" title="andrewneo" alt="andrewneo">&nbsp;andrewneo</a>, this writing was written by hand this time! &gt;:C`,
112112
);
113113
// 2024-10-26T22:45:00
114114
expect(actual.when).toBeWithinOneMinuteOf(getDateFromEpoch(1730007900000));
@@ -140,7 +140,7 @@ describe("submission", () => {
140140
);
141141
const normalizedHtml = actual.body_html.replace(/\s+/g, " ");
142142
expect(normalizedHtml).toEqual(
143-
`This is audio for integration testing <a class="auto_link named_url external" href="https://github.com/cheeplusplus/fa.js" rel="nofollow ugc noreferrer noopener">fa.js</a><br> <br> This account belongs to <a href="/user/andrewneo" class="iconusername"><img src="//a.furaffinity.net/${liveThumbDateStr}/andrewneo.gif" align="middle" title="andrewneo" alt="andrewneo">&nbsp;andrewneo</a>, this recording was recorded by Kauko.`,
143+
`This is audio for integration testing <a class="auto_link external" href="https://github.com/cheeplusplus/fa.js" rel="nofollow ugc noreferrer noopener">fa.js</a><br> <br> This account belongs to <a href="/user/andrewneo" class="iconusername"><img src="//a.furaffinity.net/${liveThumbDateStr}/andrewneo.gif" align="middle" title="andrewneo" alt="andrewneo">&nbsp;andrewneo</a>, this recording was recorded by Kauko.`,
144144
);
145145
// 2024-10-26T22:54:00
146146
expect(actual.when).toBeWithinOneMinuteOf(getDateFromEpoch(1730008440000));

tests/user.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe("user", () => {
3030
);
3131
expect(normalize(actual.header_html)).toEqual(
3232
expect.stringContaining(
33-
`This is a read-only test account for <a class="auto_link named_url external" href="https://github.com/cheeplusplus/fa.js" rel="nofollow ugc noreferrer noopener">FA.js</a><br> <br> Maintained by <a href="/user/andrewneo" class="iconusername"><img src="//a.furaffinity.net/${liveThumbDateStr}/andrewneo.gif" align="middle" title="andrewneo" alt="andrewneo">&nbsp;andrewneo</a>`,
33+
`This is a read-only test account for <a class="auto_link external" href="https://github.com/cheeplusplus/fa.js" rel="nofollow ugc noreferrer noopener">FA.js</a><br> <br> Maintained by <a href="/user/andrewneo" class="iconusername"><img src="//a.furaffinity.net/${liveThumbDateStr}/andrewneo.gif" align="middle" title="andrewneo" alt="andrewneo">&nbsp;andrewneo</a>`,
3434
),
3535
);
3636
// these aren't parsed so just make sure we're in the right place

0 commit comments

Comments
 (0)