Skip to content

Commit 064b579

Browse files
committed
chore: fix GraphQLWithUserPoolIntegrationTests
1 parent de4a7bb commit 064b579

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

AmplifyPlugins/API/Tests/APIHostApp/AWSAPIPluginGraphQLUserPoolTests/GraphQLWithUserPoolIntegrationTests.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class GraphQLWithUserPoolIntegrationTests: XCTestCase {
1818

1919
let username = "integTest\(UUID().uuidString)"
2020
let password = "P123@\(UUID().uuidString)"
21+
let email = UUID().uuidString + "@" + UUID().uuidString + ".com"
2122

2223
override func setUp() {
2324
do {
@@ -357,6 +358,7 @@ class GraphQLWithUserPoolIntegrationTests: XCTestCase {
357358
func testOnCreateSubscriptionUnauthorized() async throws {
358359
Amplify.Logging.logLevel = .verbose
359360
let connectingInvoked = expectation(description: "Connecting invoked")
361+
connectingInvoked.isInverted = true
360362
let connectedInvoked = expectation(description: "Connection established")
361363
connectedInvoked.isInverted = true
362364
let completedInvoked = expectation(description: "Completed invoked")
@@ -586,7 +588,9 @@ class GraphQLWithUserPoolIntegrationTests: XCTestCase {
586588
}
587589

588590
func signUp() async throws {
589-
let signUpResult = try await Amplify.Auth.signUp(username: username, password: password)
591+
let userAttributes = [AuthUserAttribute(.email, value: email)]
592+
let options = AuthSignUpRequest.Options(userAttributes: userAttributes)
593+
let signUpResult = try await Amplify.Auth.signUp(username: username, password: password, options: options)
590594
guard signUpResult.isSignUpComplete else {
591595
XCTFail("Sign up successful but not complete")
592596
return

0 commit comments

Comments
 (0)