-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: skip picker tests on new arch.
- Loading branch information
Showing
4 changed files
with
76 additions
and
54 deletions.
There are no files selected for viewing
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
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,58 +1,60 @@ | ||
const { describeForCopilotEnv } = require('../utils/custom-describes'); | ||
const { describeForCopilotEnv, describeNewArchNotSupported } = require('../utils/custom-describes'); | ||
const { default: jestExpect } = require('expect'); | ||
|
||
describeForCopilotEnv('DatePicker', () => { | ||
beforeEach(async () => { | ||
await copilot.perform( | ||
'Restart the React Native state', | ||
'Navigate to the DatePicker screen' | ||
); | ||
}); | ||
|
||
describe('DatePicker Tests', () => { | ||
|
||
// Note: when writing "Date (UTC):" instead of "Date (UTC): " copilot failed the test | ||
it('correct date and time', async () => { | ||
describeNewArchNotSupported('DatePicker', () => { | ||
describeForCopilotEnv('Copilot', () => { | ||
beforeEach(async () => { | ||
await copilot.perform( | ||
'Verify there is element with the text "Date (UTC): "', | ||
'Verify the element value of current date UTC July 1st 2023', | ||
'Verify there is element with the text "Time (UTC): "', | ||
'Verify there is element with the text "Time Local: "', | ||
'Verify "Time Local: " value is 7:30 pm' | ||
'Restart the React Native state', | ||
'Navigate to the DatePicker screen' | ||
); | ||
}); | ||
|
||
it('compact date picker', async () => { | ||
await copilot.perform( | ||
'Verify there is an element with the text "Compact Date Picker"', | ||
'Verify there is an element with today`s date at the bottom of the screen', | ||
'Set the date picker to September 9th, 2023' | ||
); | ||
}); | ||
describe('DatePicker Tests', () => { | ||
|
||
it('inline date picker', async () => { | ||
await copilot.perform( | ||
'Verify there is an element with the text "Compact Date Picker"', | ||
'Tap the element with the text "Compact Date Picker"', | ||
'Verify there is an element with the text "Inline Date Picker"', | ||
'Verify there is an element with today`s date at the bottom of the screen', | ||
'Set the date picker to September 9th, 2023' | ||
); | ||
}); | ||
// Note: when writing "Date (UTC):" instead of "Date (UTC): " copilot failed the test | ||
it('correct date and time', async () => { | ||
await copilot.perform( | ||
'Verify there is element with the text "Date (UTC): "', | ||
'Verify the element value of current date UTC July 1st 2023', | ||
'Verify there is element with the text "Time (UTC): "', | ||
'Verify there is element with the text "Time Local: "', | ||
'Verify "Time Local: " value is 7:30 pm' | ||
); | ||
}); | ||
|
||
it('switch to spinner date picker', async () => { | ||
await copilot.perform( | ||
'Verify there is an element with the text "Compact Date Picker"', | ||
'Tap the element with the text "Compact Date Picker"', | ||
'Verify there is an element with the text "Inline Date Picker"', | ||
'Tap the element with the text "Inline Date Picker"', | ||
'Verify that there is slider element at the bottom of the screen', | ||
'Set the date picker to September 9th, 2023' | ||
); | ||
it('compact date picker', async () => { | ||
await copilot.perform( | ||
'Verify there is an element with the text "Compact Date Picker"', | ||
'Verify there is an element with today`s date at the bottom of the screen', | ||
'Set the date picker to September 9th, 2023' | ||
); | ||
}); | ||
|
||
it('inline date picker', async () => { | ||
await copilot.perform( | ||
'Verify there is an element with the text "Compact Date Picker"', | ||
'Tap the element with the text "Compact Date Picker"', | ||
'Verify there is an element with the text "Inline Date Picker"', | ||
'Verify there is an element with today`s date at the bottom of the screen', | ||
'Set the date picker to September 9th, 2023' | ||
); | ||
}); | ||
|
||
it('switch to spinner date picker', async () => { | ||
await copilot.perform( | ||
'Verify there is an element with the text "Compact Date Picker"', | ||
'Tap the element with the text "Compact Date Picker"', | ||
'Verify there is an element with the text "Inline Date Picker"', | ||
'Tap the element with the text "Inline Date Picker"', | ||
'Verify that there is slider element at the bottom of the screen', | ||
'Set the date picker to September 9th, 2023' | ||
); | ||
|
||
await jestExpect(async () => | ||
await copilot.perform('Set the date picker`s first column to 10th, so the date will be September 10th, 2023') | ||
).rejects.toThrowError(); | ||
await jestExpect(async () => | ||
await copilot.perform('Set the date picker`s first column to 10th, so the date will be September 10th, 2023') | ||
).rejects.toThrowError(); | ||
}); | ||
}); | ||
}); | ||
}); |
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