-
Notifications
You must be signed in to change notification settings - Fork 148
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
Tests for task requests #407
Conversation
Use variables for colors Use constants for messages Extract constants into a separate file
Use console.error in catch statement Avoid unexpected error due to undefined value
50e05c8
to
3611358
Compare
Deploying with Cloudflare Pages
|
3611358
to
1cc8238
Compare
a791e7a
to
3ae2c4f
Compare
describe('When the user is super user', () => { | ||
it('should display the task requests card', async () => { | ||
const url = await page.evaluate(() => API_BASE_URL); | ||
console.log(url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove console.log
const title = await taskCards[0].evaluate( | ||
(el) => el.children[0].textContent, | ||
); | ||
const purpose = await taskCards[0].evaluate( | ||
(el) => el.children[1].textContent, | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: By accessing children in this way, later if the HTML structure changes then the test will fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can I rewrite the code @prakashchoudhary07
describe('When the user is super user', () => { | ||
it('should display the task requests card', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should have been a test, to check if user is not super user
No description provided.