diff --git a/.github/workflows/ci-push.yml b/.github/workflows/ci-push.yml index 52c098e..54971cf 100644 --- a/.github/workflows/ci-push.yml +++ b/.github/workflows/ci-push.yml @@ -111,7 +111,7 @@ jobs: chmod 600 ~/.ssh/id_rsa echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config git remote add gitlab "git@gitlab.wikimedia.org:sd/mwn.git" - git push gitlab master --force-with-lease + git push gitlab master --force git push gitlab --tags rm -rf ~/.ssh env: diff --git a/src/page.ts b/src/page.ts index 366b50f..9c3b3f2 100644 --- a/src/page.ts +++ b/src/page.ts @@ -211,7 +211,6 @@ export default function (bot: Mwn): MwnPageStatic { prop: 'wikitext', }) .then((data) => { - this.data.text = data.parse.wikitext; return data.parse.wikitext; }); } diff --git a/tests/page.test.js b/tests/page.test.js index 83f2064..1050ed4 100644 --- a/tests/page.test.js +++ b/tests/page.test.js @@ -37,11 +37,18 @@ describe('Page', async function () { expect(talkpage.getSubjectPage()).to.be.instanceOf(bot.Page); }); + it('text', function () { + return page.text().then((text) => { + expect(text).to.be.a('string'); + }); + }); + it('categories', function () { return page.categories().then((cats) => { expect(cats).to.be.instanceOf(Array); expect(cats.length).to.be.gte(1); // check it on testwiki, could change - expect(cats[0]).to.be.a('string'); + expect(cats[0].category).to.be.a('string'); + expect(cats[0].sortkey).to.be.a('string'); }); }); @@ -90,7 +97,7 @@ describe('Page', async function () { return page.links().then((links) => { expect(links).to.be.instanceOf(Array); expect(links.length).to.be.gte(1); - expect(links[0]).to.be.a('string'); + expect(links[0].title).to.be.a('string'); }); });