kopia lustrzana https://gitlab.com/mysocialportal/relatica
Fix filter runner test
rodzic
ea1783d220
commit
799d877b20
|
@ -107,6 +107,7 @@ void main() {
|
|||
group('Test TimelineEntryFilter', () {
|
||||
test('Empty Filter', () {
|
||||
final filter = TimelineEntryFilter.create(
|
||||
enabled: true,
|
||||
action: TimelineEntryFilterAction.hide,
|
||||
name: 'filter',
|
||||
);
|
||||
|
@ -116,6 +117,7 @@ void main() {
|
|||
});
|
||||
test('Test Keyword Filter', () {
|
||||
final filter = TimelineEntryFilter.create(
|
||||
enabled: true,
|
||||
action: TimelineEntryFilterAction.hide,
|
||||
name: 'filter',
|
||||
keywords: ['hello', 'good'],
|
||||
|
@ -127,6 +129,7 @@ void main() {
|
|||
|
||||
test('Test Author Filter', () {
|
||||
final filter = TimelineEntryFilter.create(
|
||||
enabled: true,
|
||||
action: TimelineEntryFilterAction.hide,
|
||||
name: 'filter',
|
||||
authors: [Connection(id: '2')],
|
||||
|
@ -139,6 +142,7 @@ void main() {
|
|||
group('Test Domain Filter', () {
|
||||
test('Exact match', () {
|
||||
final filter = TimelineEntryFilter.create(
|
||||
enabled: true,
|
||||
action: TimelineEntryFilterAction.hide,
|
||||
name: 'filter',
|
||||
domains: ['trolltodon.social'],
|
||||
|
@ -150,6 +154,7 @@ void main() {
|
|||
|
||||
test('Start wildcard', () {
|
||||
final filter = TimelineEntryFilter.create(
|
||||
enabled: true,
|
||||
action: TimelineEntryFilterAction.hide,
|
||||
name: 'filter',
|
||||
domains: ['*odon.social'],
|
||||
|
@ -162,6 +167,7 @@ void main() {
|
|||
|
||||
test('Test Tag Filter', () {
|
||||
final filter = TimelineEntryFilter.create(
|
||||
enabled: true,
|
||||
action: TimelineEntryFilterAction.hide,
|
||||
name: 'filter',
|
||||
hashtags: ['latin', 'greet'],
|
||||
|
@ -173,6 +179,7 @@ void main() {
|
|||
|
||||
test('Test Author plus Keyword', () {
|
||||
final filter = TimelineEntryFilter.create(
|
||||
enabled: true,
|
||||
action: TimelineEntryFilterAction.hide,
|
||||
name: 'filter',
|
||||
authors: [Connection(id: '2')],
|
||||
|
@ -186,6 +193,7 @@ void main() {
|
|||
test('Test Author plus tag', () {
|
||||
final filter = TimelineEntryFilter.create(
|
||||
action: TimelineEntryFilterAction.hide,
|
||||
enabled: true,
|
||||
name: 'filter',
|
||||
authors: [Connection(id: '2')],
|
||||
hashtags: ['latin', 'greet'],
|
||||
|
@ -198,6 +206,7 @@ void main() {
|
|||
test('Test Keyword plus tag', () {
|
||||
final filter = TimelineEntryFilter.create(
|
||||
action: TimelineEntryFilterAction.hide,
|
||||
enabled: true,
|
||||
name: 'filter',
|
||||
keywords: ['chao'],
|
||||
hashtags: ['SENDOFF'],
|
||||
|
@ -210,6 +219,7 @@ void main() {
|
|||
test('Test all', () {
|
||||
final filter1 = TimelineEntryFilter.create(
|
||||
action: TimelineEntryFilterAction.hide,
|
||||
enabled: true,
|
||||
name: 'filter',
|
||||
authors: [Connection(id: '2'), Connection(id: '3')],
|
||||
keywords: ['chao'],
|
||||
|
@ -221,6 +231,7 @@ void main() {
|
|||
|
||||
final filter2 = TimelineEntryFilter.create(
|
||||
action: TimelineEntryFilterAction.hide,
|
||||
enabled: true,
|
||||
name: 'filter',
|
||||
authors: [Connection(id: '1'), Connection(id: '3')],
|
||||
keywords: ['chao'],
|
||||
|
@ -240,16 +251,19 @@ void main() {
|
|||
final filters = [
|
||||
TimelineEntryFilter.create(
|
||||
action: TimelineEntryFilterAction.warn,
|
||||
enabled: true,
|
||||
name: 'send-off-hide-filter',
|
||||
hashtags: ['SENDOFF'],
|
||||
),
|
||||
TimelineEntryFilter.create(
|
||||
action: TimelineEntryFilterAction.hide,
|
||||
enabled: true,
|
||||
name: 'author-3-hide',
|
||||
authors: [Connection(id: '3')],
|
||||
),
|
||||
TimelineEntryFilter.create(
|
||||
action: TimelineEntryFilterAction.hide,
|
||||
enabled: true,
|
||||
name: 'send-off-hide-filter',
|
||||
authors: [Connection(id: '1')],
|
||||
hashtags: ['SENDOFF'],
|
||||
|
|
Ładowanie…
Reference in New Issue