test: run tests on Mastodon v4 (#2256)

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

View File

@ -4,7 +4,7 @@ on:
branches: [ master ] branches: [ master ]
jobs: jobs:
test: test:
runs-on: ubuntu-18.04 runs-on: ubuntu-20.04
services: services:
postgres: postgres:
image: postgres:12.2 image: postgres:12.2
@ -28,7 +28,7 @@ jobs:
node-version: '14' node-version: '14'
- uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@v1
with: with:
ruby-version: '3.0.3' ruby-version: '3.0.4'
- name: Cache Mastodon bundler - name: Cache Mastodon bundler
uses: actions/cache@v3 uses: actions/cache@v3
with: 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_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) const __dirname = path.dirname(new URL(import.meta.url).pathname)
export const mastodonDir = path.join(__dirname, '../mastodon') 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).getAttribute('href')).eql('/tags/tag')
.expect(nthAnchor(3).hasAttribute('rel')).notOk() .expect(nthAnchor(3).hasAttribute('rel')).notOk()
.expect(nthAnchor(3).hasAttribute('target')).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('rel')).notOk()
.expect(nthAnchor(4).hasAttribute('target')).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('rel')).notOk()
.expect(nthAnchor(5).hasAttribute('target')).notOk() .expect(nthAnchor(5).hasAttribute('target')).notOk()
.expect(nthAnchor(6).getAttribute('href')).eql('http://example.com') .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() .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', 'do not filter me!')
await postAs('admin', 'filterMeOut okay!') await postAs('admin', 'filterMeOut okay!')
await postAs('admin', 'filterMeOutTooEvenThoughItIsOneBigWord!') await postAs('admin', 'filterMeOutTooEvenThoughItIsOneBigWord!')