| // Copyright 2021 The Chromium OS Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| package familylink |
| |
| import ( |
| "context" |
| "time" |
| |
| "chromiumos/tast/local/chrome/familylink" |
| "chromiumos/tast/testing" |
| ) |
| |
| func init() { |
| testing.AddTest(&testing.Test{ |
| Func: AddPersonFlow, |
| Desc: "Checks that you can add a Unicorn user through the Add Person flow", |
| Contacts: []string{ |
| "tobyhuang@chromium.org", |
| "cros-families-eng+test@google.com", |
| "chromeos-sw-engprod@google.com", |
| }, |
| Attr: []string{"group:mainline", "informational"}, |
| SoftwareDeps: []string{"chrome"}, |
| Timeout: 5 * time.Minute, |
| Fixture: "familyLinkUnicornLoginNonOwner", |
| }) |
| } |
| |
| func AddPersonFlow(ctx context.Context, s *testing.State) { |
| cr := s.FixtValue().(*familylink.FixtData).Chrome |
| tconn := s.FixtValue().(*familylink.FixtData).TestConn |
| |
| if cr == nil { |
| s.Fatal("Failed to start Chrome") |
| } |
| if tconn == nil { |
| s.Fatal("Failed to create test API connection") |
| } |
| } |