The Photos flow now initializes the fan-out picker with both Photos products checked, so there is no single-integration name/namespace form. Assert the checked presets, the scope count, and the preset-identity settings copy instead.
Unified · Split
| @@ -29,14 +29,39 @@ scenario( · 28 unmodified lines | |||
| 29 | await page.getByRole("heading", { name: "Add Google integration" }).waitFor(); | 29 | await page.getByRole("heading", { name: "Add Google integration" }).waitFor(); |
| 30 | }); | 30 | }); |
| 31 | 31 | ||
| 32 | await step("The Photos preset defaults to the focused namespace and products", async () => { | 32 | await step("The Photos preset pre-checks both Photos products for fan-out", async () => { |
| 33 | await page.locator('input[value="Google Photos"]').waitFor(); | 33 | // The focused flow initializes the multi-select picker with exactly |
| 34 | await page.locator('input[value="google_photos"]').waitFor(); | 34 | // the two Photos presets checked; each is added as its own |
| 35 | await page.getByText("Google Photos Library").first().waitFor(); | 35 | // integration on submit. |
| 36 | await page.getByText("Google Photos Picker").first().waitFor(); | 36 | const library = page.getByRole("checkbox", { name: /Google Photos Library/ }); |
| 37 | await page.getByText("2 Google APIs").waitFor(); | 37 | const picker = page.getByRole("checkbox", { name: /Google Photos Picker/ }); |
| 38 | await library.waitFor(); | ||
| 39 | await picker.waitFor(); | ||
| 40 | expect(await library.isChecked()).toBe(true); | ||
| 41 | expect(await picker.isChecked()).toBe(true); | ||
| 42 | // Other products stay unchecked: the flow is Photos-scoped, not the | ||
| 43 | // featured default selection. | ||
| 44 | expect(await page.getByRole("checkbox", { name: /Google Calendar/ }).isChecked()).toBe( | ||
| 45 | false, | ||
| 46 | ); | ||
| 47 | // The scope preview counts exactly the two checked Photos products. | ||
| 48 | await page.getByRole("button", { name: /^View scopes 2$/ }).waitFor(); | ||
| 49 | }); | ||
| 50 | |||
| 51 | await step("Multi-select keeps preset identities: no name/namespace form", async () => { | ||
| 52 | // With two products checked there is no single-integration identity | ||
| 53 | // form; the settings section spells out that presets keep their own | ||
| 54 | // names and namespaces. | ||
| 55 | await page.getByText("Google product settings").waitFor(); | ||
| 56 | await page.getByText("Selected products keep their preset names and namespaces.").waitFor(); | ||
| 57 | expect(await page.locator('input[value="Google Photos"]').count()).toBe(0); | ||
| 58 | expect(await page.locator('input[value="google_photos"]').count()).toBe(0); | ||
| 38 | expect(await page.locator('input[value="Google"]').count()).toBe(0); | 59 | expect(await page.locator('input[value="Google"]').count()).toBe(0); |
| 39 | expect(await page.locator('input[value="google"]').count()).toBe(0); | 60 | expect(await page.locator('input[value="google"]').count()).toBe(0); |
| 61 | // The submit button is armed for the checked selection. | ||
| 62 | const connect = page.getByRole("button", { name: "Connect Google" }); | ||
| 63 | await connect.waitFor(); | ||
| 64 | expect(await connect.isEnabled()).toBe(true); | ||
| 40 | }); | 65 | }); |
| 41 | }); | 66 | }); |
| 42 | }), | 67 | }), |