Adds e2e symptom data input tests and necessary testIDs to the existing components
This commit is contained in:
@@ -57,81 +57,4 @@ describe('Home Navigation', () => {
|
||||
await isOnPage('nfp settings', 'settings')
|
||||
await device.pressBack()
|
||||
})
|
||||
|
||||
it('should navigate to today cycle day page and all its symptoms', async () => {
|
||||
await element(by.text('add data for today')).tap()
|
||||
await expect(
|
||||
element(by.id('cycleDayTitleDate').and(by.text('today')))
|
||||
).toBeVisible()
|
||||
|
||||
await element(by.id('drip-icon-bleeding')).tap()
|
||||
await expect(
|
||||
element(by.id('symptomViewTitleName').and(by.text('bleeding')))
|
||||
).toBeVisible()
|
||||
await device.pressBack()
|
||||
|
||||
await element(by.id('drip-icon-temperature')).tap()
|
||||
await expect(
|
||||
element(by.id('symptomViewTitleName').and(by.text('temperature')))
|
||||
).toBeVisible()
|
||||
// first back press removes the focus from the field and the input keyboard
|
||||
await device.pressBack()
|
||||
// second back press goes back to the cycle day view
|
||||
await device.pressBack()
|
||||
|
||||
await element(by.id('drip-icon-mucus')).tap()
|
||||
await expect(
|
||||
element(by.id('symptomViewTitleName').and(by.text('cervical mucus')))
|
||||
).toBeVisible()
|
||||
await device.pressBack()
|
||||
|
||||
await element(by.id('drip-icon-cervix')).tap()
|
||||
await expect(
|
||||
element(by.id('symptomViewTitleName').and(by.text('cervix')))
|
||||
).toBeVisible()
|
||||
await device.pressBack()
|
||||
|
||||
await element(by.id('drip-icon-desire')).tap()
|
||||
await expect(
|
||||
element(by.id('symptomViewTitleName').and(by.text('desire')))
|
||||
).toBeVisible()
|
||||
await device.pressBack()
|
||||
|
||||
await element(by.id('drip-icon-sex')).tap()
|
||||
await expect(
|
||||
element(by.id('symptomViewTitleName').and(by.text('sex')))
|
||||
).toBeVisible()
|
||||
await device.pressBack()
|
||||
|
||||
await element(by.id('drip-icon-pain')).tap()
|
||||
await expect(
|
||||
element(by.id('symptomViewTitleName').and(by.text('pain')))
|
||||
).toBeVisible()
|
||||
await device.pressBack()
|
||||
|
||||
await element(by.id('drip-icon-mood')).tap()
|
||||
await expect(
|
||||
element(by.id('symptomViewTitleName').and(by.text('mood')))
|
||||
).toBeVisible()
|
||||
await device.pressBack()
|
||||
|
||||
await element(by.id('drip-icon-note')).tap()
|
||||
await expect(
|
||||
element(by.id('symptomViewTitleName').and(by.text('note')))
|
||||
).toBeVisible()
|
||||
await element(by.id('symptomInfoButton')).tap()
|
||||
await expect(element(by.id('symptomInfoPopup'))).toBeVisible()
|
||||
|
||||
// first back press removes the focus from the field and the input keyboard
|
||||
await device.pressBack()
|
||||
// second back press goes back to the cycle day view
|
||||
await device.pressBack()
|
||||
|
||||
await expect(
|
||||
element(by.id('cycleDayTitleDate').and(by.text('today')))
|
||||
).toBeVisible()
|
||||
|
||||
// waiting for a feedback on what should happen on pressing back
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user