-
Notifications
You must be signed in to change notification settings - Fork 12
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
Signup fix #14
base: develop
Are you sure you want to change the base?
Signup fix #14
Conversation
@@ -1,3 +1,3 @@ | |||
const signupPageTitle = /Sign Up/; |
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 follow the UPPERCASE
for the const name and separated by the _
@@ -12,6 +12,6 @@ | |||
"jest": "^27.1.0" | |||
}, | |||
"scripts": { | |||
"test": "jest" | |||
"test": "jest sign-up" |
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.
The settings in the package.json
should be targeted to a folder-test
rather than just one file.
describe("New user navigates in the page", () => { | ||
test("New user sees a sign up page", async () => { | ||
describe('New user navigates in the page', () => { | ||
// const response = { |
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.
remove commented code
await page.waitForSelector('button#js-oauth-authorize-btn'); | ||
} catch (err) { | ||
console.log( | ||
'The test user credentials are wrong or your test account is already has RDS as an OAuth application.', |
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.
remove console.log
const pageTitle = await page.title(); | ||
expect(pageTitle).toMatch(signupPageTitle); | ||
}); | ||
//For mocking github api -->> | ||
// page.on('request', (request) => { |
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.
remove commented code
Wrote a test case for 401 response.