This repository has been archived by the owner on Jul 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename repositories to store, switch from test_driver to integration_…
…test, add some widget tests
- Loading branch information
Showing
98 changed files
with
773 additions
and
501 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
import 'package:integration_test/integration_test.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
import 'groups/login.dart' as login; | ||
import 'groups/logout.dart' as logout; | ||
import 'groups/chat/chat.dart' as chat; | ||
import 'groups/edit_filters.dart' as edit_filters; | ||
import 'groups/edit_profile.dart' as edit_profile; | ||
import 'groups/login.dart' as login; | ||
import 'groups/registration.dart' as registration; | ||
import 'groups/most_popular.dart' as most_popular; | ||
import 'groups/search_users.dart' as search_users; | ||
import 'groups/swiping.dart' as swiping; | ||
import 'groups/delete_account.dart' as delete_account; | ||
|
||
void main() { | ||
group('Login', login.main); | ||
group('Registration', registration.main); | ||
group('Logout', logout.main); | ||
group('Login', login.main); | ||
group('Swiping page', swiping.main); | ||
group('Most popular page', most_popular.main); | ||
group('Search for users', search_users.main); | ||
group('Edit profile', edit_profile.main); | ||
group('Edit filters', edit_filters.main); | ||
group('Chats', chat.main); | ||
group('Delete account', delete_account.main); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import 'package:flutter_driver/flutter_driver.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
import '../utils/constants.dart'; | ||
|
||
void main() { | ||
FlutterDriver driver; | ||
|
||
setUpAll(() async { | ||
driver = await FlutterDriver.connect(); | ||
}); | ||
|
||
tearDownAll(() { | ||
if (driver != null) driver.close(); | ||
}); | ||
|
||
test('Delete account', () async { | ||
await driver.tap(find.byValueKey('meTab')); | ||
await driver.tap(find.byValueKey('settingsBtn')); | ||
await driver.scrollIntoView(find.byValueKey('deleteAccountBtn')); | ||
await driver.tap(find.byValueKey('deleteAccountBtn')); | ||
await driver.tap(find.byValueKey('confirmPasswordField')); | ||
await driver.enterText(USER_PASSWORD); | ||
await driver.tap(find.byValueKey('confirmDeleteAccountBtn')); | ||
await driver.waitFor(find.byType('WelcomePage')); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import 'package:flutter_driver/flutter_driver.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
FlutterDriver driver; | ||
|
||
setUpAll(() async { | ||
driver = await FlutterDriver.connect(); | ||
}); | ||
|
||
tearDownAll(() async { | ||
if (driver != null) { | ||
await driver.close(); | ||
} | ||
}); | ||
|
||
test('filters are displayed correctly', () async { | ||
await driver.tap(find.byValueKey('meTab')); | ||
await driver.tap(find.text('Settings')); | ||
await driver.scrollIntoView(find.text('Filters')); | ||
await driver.tap(find.text('Filters')); | ||
await driver.waitFor(find.descendant( | ||
of: find.byValueKey('Height'), | ||
matching: find.text('1, 300'), | ||
)); | ||
await driver.waitFor(find.descendant( | ||
of: find.byValueKey('Personality'), | ||
matching: find.text('2, 4'), | ||
)); | ||
}); | ||
|
||
test('change height filter', () async { | ||
await driver.tap(find.byValueKey('Height')); | ||
await driver.waitFor(find.byType('RangeSliderFilterPage')); | ||
// TODO FIXME dont know how to drag the slider | ||
await driver.tap(find.byType('MyBackButton')); | ||
}); | ||
|
||
test('change pets filter', () async { | ||
await driver.tap(find.byValueKey('Pets')); | ||
await driver.waitFor(find.byType('TextListFilterPage')); | ||
await driver.tap(find.text('No filter')); | ||
await driver.tap(find.text('Cannot contain any of ...')); | ||
await driver.tap(find.text('Add new')); | ||
await driver.enterText('Cat'); | ||
// TODO FIXME dont know how to press enter | ||
await driver.tap(find.byType('MyBackButton')); | ||
}); | ||
|
||
test('change star sign filter', () async { | ||
await driver.tap(find.byValueKey('Star sign')); | ||
await driver.waitFor(find.byType('CheckboxFilterPage')); | ||
await driver.tap(find.text('Aries')); | ||
await driver.tap(find.text('Cancer')); | ||
await driver.tap(find.byType('MyBackButton')); | ||
await driver.waitFor(find.text('Aries, Cancer')); | ||
}); | ||
|
||
test('reset star sign', () async { | ||
await driver.tap(find.byValueKey('Star sign')); | ||
await driver.waitFor(find.byType('CheckboxFilterPage')); | ||
await driver.tap(find.text('Aries')); | ||
await driver.tap(find.text('Cancer')); | ||
await driver.tap(find.byType('MyBackButton')); | ||
await driver.waitForAbsent(find.text('Aries, Cancer')); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import 'package:flutter_driver/flutter_driver.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
FlutterDriver driver; | ||
|
||
setUpAll(() async { | ||
driver = await FlutterDriver.connect(); | ||
// should be at home page | ||
await driver.waitFor(find.byType('HomePage')); | ||
await driver.tap(find.byValueKey('meTab')); | ||
await driver.tap(find.text('Profile')); | ||
await driver.waitFor(find.byType('EditProfilePage')); | ||
}); | ||
|
||
tearDownAll(() async { | ||
if (driver != null) await driver.close(); | ||
}); | ||
|
||
test('Change about', () async { | ||
await driver.tap(find.byValueKey('editAboutMeBtn')); | ||
await driver.enterText('This is my about (edited)'); | ||
await driver.tap(find.byValueKey('updateAboutMeBtn')); | ||
final text = await driver.getText(find.byValueKey('aboutMeField')); | ||
expect(text, 'This is my about (edited)'); | ||
// reset | ||
await driver.tap(find.byValueKey('aboutMeField')); | ||
await driver.enterText('This is my about'); | ||
await driver.tap(find.byValueKey('updateAboutMeBtn')); | ||
}); | ||
|
||
test('Add extra media', () async { | ||
await driver.tap(find.byValueKey('extraMediaEditTile0')); | ||
await driver.tap(find.text('Image')); | ||
await driver.tap(find.text('Camera')); | ||
await driver.tap(find.byValueKey('extraMediaEditTile5')); | ||
await driver.tap(find.text('Video')); | ||
await driver.tap(find.text('Camera')); | ||
}); | ||
|
||
test('Replace extra media', () async { | ||
await driver.tap(find.byValueKey('extraMediaEditTile0')); | ||
await driver.waitFor(find.byType('EditExtraMediaPage')); | ||
await driver.tap(find.byValueKey('menu')); | ||
await driver.tap(find.text('Replace with video')); // video | ||
await driver.tap(find.byType('MyBackButton')); | ||
}); | ||
|
||
test('Delete extra media', () async { | ||
await driver.tap(find.byValueKey('extraMediaEditTile0')); | ||
await driver.waitFor(find.byType('EditExtraMediaPage')); | ||
await driver.tap(find.byValueKey('menu')); | ||
await driver.tap(find.byValueKey('deleteBtn')); | ||
await driver.waitFor(find.byType('EditProfilePage')); | ||
}); | ||
|
||
test('Change all personal info', () async { | ||
await driver.scrollIntoView(find.byType('PersonalInfoList')); | ||
await driver.tap(find.byValueKey('School')); | ||
await driver.tap(find.byValueKey('Height')); | ||
}); | ||
|
||
test('Edit interests (includes interestbrowser)', () async { | ||
await driver.scrollIntoView(find.byValueKey('editInterestsBtn')); | ||
await driver.tap(find.byValueKey('editInterestsBtn')); | ||
// at interestseditpage (browser) | ||
await driver.tap(find.text('Animals')); | ||
await driver.tap(find.text('Bird Watching')); | ||
// TODO | ||
}); | ||
|
||
test('Preview profile', () async { | ||
await driver.tap(find.byValueKey('previewProfileBtn')); | ||
await driver.waitFor(find.byType('MainProfilePage')); | ||
await driver.waitFor(find.text('test, 15')); | ||
await driver.waitForAbsent(find.byValueKey('chatWithUserBtn')); | ||
await driver.tap(find.byType('MyBackButton')); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import 'package:flutter_driver/flutter_driver.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
import '../utils/auth.dart'; | ||
|
||
void main() { | ||
FlutterDriver driver; | ||
|
||
setUpAll(() async { | ||
driver = await FlutterDriver.connect(); | ||
}); | ||
|
||
tearDownAll(() async { | ||
if (driver != null) await driver.close(); | ||
}); | ||
|
||
test('Logs out correctly', () async { | ||
await logoutWith(driver); | ||
}); | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
Oops, something went wrong.