Skip to content
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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Conversation

akshay1502
Copy link

Wrote a test case for 401 response.

@@ -1,3 +1,3 @@
const signupPageTitle = /Sign Up/;
Copy link

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"
Copy link

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 = {
Copy link

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.',
Copy link

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) => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New user sign up tests not working on 401 response
2 participants