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

test(user-feedback): ui tests to display form, submit, cancel #4536

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

armcknight
Copy link
Member

@armcknight armcknight commented Nov 15, 2024

[[for https://github.com//issues/4271; #skip-changelog

This helps validate the functionality of the widget button and form. Looking into how I can also validate the contents of the data as they are captured into an envelope, but this at least is a start on ensuring basic UI correctness.

A couple tests are skipped and will be finished in #4544 that deal with error states after failing input validation

Base automatically changed from armcknight/feat(user-feedback)/form to main November 19, 2024 19:58
@armcknight armcknight marked this pull request as ready for review November 19, 2024 20:22
Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

CI is pretty much broken. I'm waiting it for it to be green so I can have another pass before I approve this.

}

func testSubmitFullyFilledForm() throws {
let widgetButton: XCUIElement = app.staticTexts["Report a Bug"]
Copy link
Member

Choose a reason for hiding this comment

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

m: Is there any reason we can't use accessibility identifiers to find the button? These usually don't change that often, and they also work when you add localization, so it makes the test less brittle.

Copy link
Member Author

Choose a reason for hiding this comment

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

fair

Comment on lines +47 to +56
func testSubmitWithNoFieldsFilled() throws {
throw XCTSkip("Needs error state implementation")

let widgetButton: XCUIElement = app.staticTexts["Report a Bug"]
widgetButton.tap()

app.staticTexts["Send Bug Report"].tap()

// TODO: need to implement some kind of error dialog and then assert for it
}
Copy link
Member

Choose a reason for hiding this comment

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

l: I would prefer not to have tests that don't run if possible. They are easily overlooked, start to rot and are never updated again.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's implemented in #4544


app.staticTexts["Send Bug Report"].tap()

// TODO: need to implement some kind of error dialog and then assert for it
Copy link
Member

Choose a reason for hiding this comment

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

m: What's stopping you from doing that in this PR?

Copy link
Member Author

@armcknight armcknight Nov 20, 2024

Choose a reason for hiding this comment

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

can't do it until validation and error states are implemented in #4544

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.

3 participants