Skip to content

Commit

Permalink
Merge pull request #1843 from nextcloud/chore/nextcloud/remove-spreed…
Browse files Browse the repository at this point in the history
…-16-test-skip
  • Loading branch information
provokateurin authored Apr 1, 2024
2 parents 407e0af + 9adcd73 commit 7e26720
Showing 1 changed file with 47 additions and 52 deletions.
99 changes: 47 additions & 52 deletions packages/nextcloud/test/spreed_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import 'package:nextcloud/src/utils/date_time.dart';
import 'package:nextcloud_test/nextcloud_test.dart';
import 'package:test/test.dart';
import 'package:test_api/src/backend/invoker.dart';
import 'package:version/version.dart';

void main() {
presets(
Expand Down Expand Up @@ -176,64 +175,60 @@ void main() {
});
});

group(
'Avatar',
() {
test('Set emoji avatar', () async {
final room = await createTestRoom();
group('Avatar', () {
test('Set emoji avatar', () async {
final room = await createTestRoom();

final response = await client1.spreed.avatar.emojiAvatar(
emoji: '😀',
token: room.token,
);
expect(response.statusCode, 200);
expect(response.body.ocs.data.isCustomAvatar, true);
});
final response = await client1.spreed.avatar.emojiAvatar(
emoji: '😀',
token: room.token,
);
expect(response.statusCode, 200);
expect(response.body.ocs.data.isCustomAvatar, true);
});

test('Get avatar', () async {
final room = await createTestRoom();
await client1.spreed.avatar.emojiAvatar(
emoji: '😀',
token: room.token,
);
test('Get avatar', () async {
final room = await createTestRoom();
await client1.spreed.avatar.emojiAvatar(
emoji: '😀',
token: room.token,
);

final response = await client1.spreed.avatar.getAvatar(
token: room.token,
);
expect(response.statusCode, 200);
expect(response.body, isNotEmpty);
});
final response = await client1.spreed.avatar.getAvatar(
token: room.token,
);
expect(response.statusCode, 200);
expect(response.body, isNotEmpty);
});

test('Get avatar dark', () async {
final room = await createTestRoom();
await client1.spreed.avatar.emojiAvatar(
emoji: '😀',
token: room.token,
);
test('Get avatar dark', () async {
final room = await createTestRoom();
await client1.spreed.avatar.emojiAvatar(
emoji: '😀',
token: room.token,
);

final response = await client1.spreed.avatar.getAvatarDark(
token: room.token,
);
expect(response.statusCode, 200);
expect(response.body, isNotEmpty);
});
final response = await client1.spreed.avatar.getAvatarDark(
token: room.token,
);
expect(response.statusCode, 200);
expect(response.body, isNotEmpty);
});

test('Delete avatar', () async {
final room = await createTestRoom();
await client1.spreed.avatar.emojiAvatar(
emoji: '😀',
token: room.token,
);
test('Delete avatar', () async {
final room = await createTestRoom();
await client1.spreed.avatar.emojiAvatar(
emoji: '😀',
token: room.token,
);

final response = await client1.spreed.avatar.deleteAvatar(
token: room.token,
);
expect(response.statusCode, 200);
expect(response.body.ocs.data.isCustomAvatar, false);
});
},
skip: preset.version < Version(17, 0, 0),
);
final response = await client1.spreed.avatar.deleteAvatar(
token: room.token,
);
expect(response.statusCode, 200);
expect(response.body.ocs.data.isCustomAvatar, false);
});
});

group('Chat', () {
test('Send message', () async {
Expand Down

0 comments on commit 7e26720

Please sign in to comment.