Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(nextcloud): Remove test skip on spreed 16 #1843

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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