-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/SCCapstone/I_Spy_A-Eye
- Loading branch information
Showing
10 changed files
with
869 additions
and
60 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,3 @@ | ||
// Jest Firebase mocking; error fix for Google Closure library | ||
window.addEventListener = jest.fn() | ||
window.attachEvent = jest.fn() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,43 @@ | ||
describe('Example', () => { | ||
beforeAll(async () => { | ||
await device.launchApp(); | ||
}); | ||
|
||
beforeEach(async () => { // Reload React Native between tests for fresh state, and also login/reach search screen | ||
await device.reloadReactNative(); | ||
await element(by.id('Test_SignInSkip')).longPress(); | ||
}); | ||
|
||
// Successfully load the filtering submenu and respective touchable opacity | ||
it('should load the filter submenu when the filter button is pressed', async () => { | ||
await element(by.id('Test_FilterButton')).longPress(); | ||
await expect(element(by.id('Test_FilterCountryButton'))).toBeVisible() | ||
await expect(element(by.id('Test_FilterInStockButton'))).toBeVisible(); | ||
await expect(element(by.id('Test_FilterOnSaleButton'))).toBeVisible(); | ||
await expect(element(by.id('Test_FilterByFavoritedButton'))).toBeVisible(); | ||
}); | ||
|
||
// Successfully exit the menu after tapping outside of its area | ||
it('should remove the filter submenu after tapping outside it', async () => { | ||
await element(by.id('Test_FilterButton')).longPress(); | ||
await element(by.id('Test_FilterSubmenuOpacity')).longPress(); | ||
await expect(element(by.id('Test_FilterSubmenuModal'))).not.toBeVisible(); | ||
}); | ||
|
||
// Successfully load the country submenu | ||
it('should load the country filter submenu when the country filter button is pressed', async () => { | ||
await element(by.id('Test_FilterButton')).longPress(); | ||
await element(by.id('Test_FilterCountryButton')).longPress(); | ||
await expect(element(by.id('Test_FilterCountrySubmenu'))).toExist(); | ||
}); | ||
|
||
// Successfully exit the country submenu after tapping outside of its area to reach the original filter submenu | ||
it('should remove the filter submenu after tapping outside it', async () => { | ||
await element(by.id('Test_FilterButton')).longPress(); | ||
await element(by.id('Test_FilterCountryButton')).longPress(); | ||
await element(by.id('Test_FilterCountrySubmenuOpacity')).longPress(); | ||
await expect(element(by.id('Test_FilterCountrySubmenuModal'))).not.toExist(); | ||
await expect(element(by.id('Test_FilterCountryButton'))).toExist(); | ||
}); | ||
|
||
}); |
Oops, something went wrong.