Skip to content
This repository was archived by the owner on Jan 26, 2021. It is now read-only.

test: UI tests for Login and Sign Up screens #99

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

Conversation

yugantarjain
Copy link
Contributor

Description

This PR includes UI tests for login and sign up screen.

Fixes #10

Type of Change:

  • Code
  • Quality Assurance
  • Outreach
  • Documentation

Code/Quality Assurance Only

  • New feature (non-breaking change which adds functionality pre-approved by mentors)

How Has This Been Tested?

Tested on Xcode using XCTest.

Checklist:

  • My PR follows the style guidelines of this project
  • I have performed a self-review of my own code or materials
  • I have commented my code or provided relevant documentation, particularly in hard-to-understand areas
  • Any dependent changes have been merged

Code/Quality Assurance Only

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been published in downstream modules

Conflicts:
	mentorship ios.xcodeproj/project.pbxproj
Conflicts:
	mentorship ios.xcodeproj/project.pbxproj
@@ -882,7 +890,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "yugantar.mentorship-ios";
PRODUCT_BUNDLE_IDENTIFIER = "yugantarjain.mentorship-ios";
Copy link
Contributor

Choose a reason for hiding this comment

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

org.anitab.mentorship

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

annabauza
annabauza previously approved these changes Jul 19, 2020
}

override func tearDownWithError() throws {
// Put teardown code here. This method is called after the invocation of each test method in the class.
Copy link
Contributor

Choose a reason for hiding this comment

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

XCUIApplication should be terminated here in teardown.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also in the other.. one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay

Conflicts:
	mentorship ios.xcodeproj/project.pbxproj
@yugantarjain
Copy link
Contributor Author

@ApheleiaS Done.

@ApheleiaS
Copy link
Contributor

Approved the changes here @yugantarjain. You will need to resolve conflicts :)

@yugantarjain yugantarjain added the Status: On Hold Issue or PR needs more info, a discussion, a review or approval from a Maintainer/Code Owner. label Jul 24, 2020
func testSignUpButtonWithFilledFields() {
// MARK: - Filled fields. But tnc unchecked.
// Text fields should be hittable. Check Name field for this purpose.
XCTAssert(app.scrollViews.otherElements.textFields["Name"].isHittable)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another inconsistency found.
Commenting out line 64 (XCTAssert(app.scrollViews.otherElements.textFields["Name"].isHittable) fails the test. Ideally, it shouldn't.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it on popup screen?

Copy link
Contributor Author

@yugantarjain yugantarjain Jul 26, 2020

Choose a reason for hiding this comment

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

It is on sign up screen (modal screen). However, unlike the dismiss x button test, this involves a single screen only.

@yugantarjain
Copy link
Contributor Author

@anitab-org/mentorship-ios-maintainers should we close this PR?

@ZhanatM
Copy link

ZhanatM commented Oct 23, 2020

Don't think to write tests in page object design pattern? separate and store ui elements in separate pages/screen, and in tests itself there are just test steps and assertions. If you are interested I can open pull request with these ui tests in structured way to make tests maintainable, reusable and readable

@yugantarjain
Copy link
Contributor Author

yugantarjain commented Oct 26, 2020

Don't think to write tests in page object design pattern? separate and store ui elements in separate pages/screen, and in tests itself there are just test steps and assertions. If you are interested I can open pull request with these ui tests in structured way to make tests maintainable, reusable and readable

Hi @ZhanatM, sure! Just create a new issue and I'll assign it to you. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Status: On Hold Issue or PR needs more info, a discussion, a review or approval from a Maintainer/Code Owner.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create UI tests for user registration screens
5 participants