test: run tests on Mastodon v4 ()

This commit is contained in:
Nolan Lawson 2022-12-02 15:09:58 -08:00 committed by GitHub
parent 30b00667f2
commit 6d6eb59f41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 756 additions and 52 deletions

View file

@ -4,7 +4,7 @@ on:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:12.2
@ -28,7 +28,7 @@ jobs:
node-version: '14'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.3'
ruby-version: '3.0.4'
- name: Cache Mastodon bundler
uses: actions/cache@v3
with:

View file

@ -4,7 +4,7 @@ on:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:12.2
@ -28,7 +28,7 @@ jobs:
node-version: '14'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.3'
ruby-version: '3.0.4'
- name: Cache Mastodon bundler
uses: actions/cache@v3
with:

View file

@ -19,9 +19,9 @@ BIND=0.0.0.0
`
export const GIT_URL = 'https://github.com/tootsuite/mastodon.git'
export const GIT_TAG = 'v3.5.3'
export const GIT_TAG = 'v4.0.2'
export const RUBY_VERSION = '3.0.3'
export const RUBY_VERSION = '3.0.4'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
export const mastodonDir = path.join(__dirname, '../mastodon')

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -37,10 +37,10 @@ test('External links, hashtags, and mentions have correct attributes', async t =
.expect(nthAnchor(3).getAttribute('href')).eql('/tags/tag')
.expect(nthAnchor(3).hasAttribute('rel')).notOk()
.expect(nthAnchor(3).hasAttribute('target')).notOk()
.expect(nthAnchor(4).getAttribute('href')).eql('/tags/anotherTag')
.expect(nthAnchor(4).getAttribute('href')).eql('/tags/anothertag')
.expect(nthAnchor(4).hasAttribute('rel')).notOk()
.expect(nthAnchor(4).hasAttribute('target')).notOk()
.expect(nthAnchor(5).getAttribute('href')).eql('/tags/yetAnotherTag')
.expect(nthAnchor(5).getAttribute('href')).eql('/tags/yetanothertag')
.expect(nthAnchor(5).hasAttribute('rel')).notOk()
.expect(nthAnchor(5).hasAttribute('target')).notOk()
.expect(nthAnchor(6).getAttribute('href')).eql('http://example.com')

View file

@ -38,7 +38,8 @@ const addFilter = async (t, phrase, tweak) => {
.expect(modalDialog.exists).notOk()
}
test('Can filter basic words', async t => {
// TODO: test broken by Mastodon v4 bug https://github.com/mastodon/mastodon/issues/21965
test.skip('Can filter basic words', async t => {
await postAs('admin', 'do not filter me!')
await postAs('admin', 'filterMeOut okay!')
await postAs('admin', 'filterMeOutTooEvenThoughItIsOneBigWord!')