From 7ac8754fa5794edfed68c0df07499af6ae832b07 Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Mon, 24 Jul 2023 11:49:06 -0400 Subject: [PATCH 1/8] chore: fix screenshots for new ui --- build/testing/ui.go | 4 ++-- ui/screenshot/{create-contraint.js => create-constraint.js} | 0 ui/screenshot/create-rule.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename ui/screenshot/{create-contraint.js => create-constraint.js} (100%) diff --git a/build/testing/ui.go b/build/testing/ui.go index 6ad53887c8..49f4e6a251 100644 --- a/build/testing/ui.go +++ b/build/testing/ui.go @@ -82,11 +82,11 @@ func Screenshots(ctx context.Context, client *dagger.Client, flipt *dagger.Conta var ( g errgroup.Group - containers = make(chan *dagger.Container, 0) + containers = make(chan *dagger.Container) ) go func() { - g.Wait() + _ = g.Wait() close(containers) }() diff --git a/ui/screenshot/create-contraint.js b/ui/screenshot/create-constraint.js similarity index 100% rename from ui/screenshot/create-contraint.js rename to ui/screenshot/create-constraint.js diff --git a/ui/screenshot/create-rule.js b/ui/screenshot/create-rule.js index c3150b657d..4731b2999d 100644 --- a/ui/screenshot/create-rule.js +++ b/ui/screenshot/create-rule.js @@ -7,6 +7,6 @@ const { capture } = require('../screenshot.js'); await page.getByRole('button', { name: 'New Rule' }).click(); await page.locator('#segmentKey-select-button').click(); await page.getByText('all-users').click(); - await page.getByLabel('Multi-Variant').check(); + await page.getByLabel('Multi-Variate').check(); }); })(); From e2bd61afbbef6844ef174cf2b58bb6c5e9f8402d Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Mon, 24 Jul 2023 15:09:43 -0400 Subject: [PATCH 2/8] chore: mv screenshots to subdir --- build/generate/screenshots.go | 133 ++++++++++++++++++ build/magefile.go | 3 +- ui/screenshot.js | 6 +- .../create-constraint.js | 4 +- .../{ => getting_started}/create-flag.js | 4 +- .../{ => getting_started}/create-rule.js | 4 +- .../{ => getting_started}/create-segment.js | 4 +- .../{ => getting_started}/create-variant.js | 4 +- .../fixtures/create_constraint.yml | 0 .../fixtures/create_rule.yml | 0 .../fixtures/create_variant.yml | 0 11 files changed, 148 insertions(+), 14 deletions(-) create mode 100644 build/generate/screenshots.go rename ui/screenshot/{ => getting_started}/create-constraint.js (79%) rename ui/screenshot/{ => getting_started}/create-flag.js (71%) rename ui/screenshot/{ => getting_started}/create-rule.js (76%) rename ui/screenshot/{ => getting_started}/create-segment.js (68%) rename ui/screenshot/{ => getting_started}/create-variant.js (77%) rename ui/screenshot/{ => getting_started}/fixtures/create_constraint.yml (100%) rename ui/screenshot/{ => getting_started}/fixtures/create_rule.yml (100%) rename ui/screenshot/{ => getting_started}/fixtures/create_variant.yml (100%) diff --git a/build/generate/screenshots.go b/build/generate/screenshots.go new file mode 100644 index 0000000000..95d6d6cd19 --- /dev/null +++ b/build/generate/screenshots.go @@ -0,0 +1,133 @@ +package generate + +import ( + "context" + "crypto/sha256" + "fmt" + "os" + "path" + "time" + + "dagger.io/dagger" + "golang.org/x/sync/errgroup" +) + +func Screenshots(ctx context.Context, client *dagger.Client, flipt *dagger.Container) error { + src := client.Host().Directory("./ui/", dagger.HostDirectoryOpts{ + Include: []string{ + "./package.json", + "./package-lock.json", + "./playwright.config.ts", + "/screenshots/", + }, + }) + + contents, err := src.File("package-lock.json").Contents(ctx) + if err != nil { + return err + } + + cache := client.CacheVolume(fmt.Sprintf("node-modules-screenshot-%x", sha256.Sum256([]byte(contents)))) + + ui, err := client.Container().From("node:18-bullseye"). + WithMountedDirectory("/src", src).WithWorkdir("/src"). + WithMountedCache("/src/node_modules", cache). + WithExec([]string{"npm", "install"}). + WithExec([]string{"npx", "playwright", "install", "chromium", "--with-deps"}). + Sync(ctx) + if err != nil { + return err + } + + src = client.Host().Directory("./ui/", dagger.HostDirectoryOpts{ + Exclude: []string{ + "./dist/", + "./node_modules/", + }, + }) + + // remount entire directory with module cache + ui, err = ui.WithMountedDirectory("/src", src). + WithMountedCache("/src/node_modules", cache). + WithExec([]string{"npm", "install"}). + Sync(ctx) + if err != nil { + return err + } + + dirs := []string{ + "getting_started", + } + + for _, dir := range dirs { + var ( + g errgroup.Group + containers = make(chan *dagger.Container) + ) + + dir := dir + entries, err := ui.Directory("screenshot/" + dir).Entries(ctx) + if err != nil { + return err + } + + go func() { + _ = g.Wait() + close(containers) + }() + + for _, entry := range entries { + entry := entry + g.Go(func() error { + test, err := buildUI(ctx, ui, flipt) + if err != nil { + return err + } + + if ext := path.Ext(entry); ext != ".js" { + return nil + } + + c, err := test.WithExec([]string{"node", path.Join("screenshot", dir, entry)}).Sync(ctx) + if err != nil { + return err + } + + containers <- c + fmt.Printf("Generating screenshot for %s/%s\n", dir, entry) + + return err + }) + } + + for c := range containers { + if _, err := c.Directory("screenshots"). + Export(ctx, "screenshots"); err != nil { + return err + } + } + } + + return err +} + +func buildUI(ctx context.Context, ui, flipt *dagger.Container) (_ *dagger.Container, err error) { + flipt, err = flipt.Sync(ctx) + if err != nil { + return nil, err + } + + ui, err = ui.Sync(ctx) + if err != nil { + return nil, err + } + + return ui. + WithServiceBinding("flipt", flipt. + WithEnvVariable("CI", os.Getenv("CI")). + WithEnvVariable("FLIPT_AUTHENTICATION_METHODS_TOKEN_ENABLED", "true"). + WithEnvVariable("UNIQUE", time.Now().String()). + WithExec(nil)). + WithFile("/usr/bin/flipt", flipt.File("/flipt")). + WithEnvVariable("FLIPT_ADDRESS", "http://flipt:8080"), nil +} diff --git a/build/magefile.go b/build/magefile.go index dc6dfdeed9..0fa6c60abe 100644 --- a/build/magefile.go +++ b/build/magefile.go @@ -13,6 +13,7 @@ import ( "dagger.io/dagger" "github.com/magefile/mage/mg" "github.com/magefile/mage/sh" + "go.flipt.io/flipt/build/generate" "go.flipt.io/flipt/build/hack" "go.flipt.io/flipt/build/internal" "go.flipt.io/flipt/build/internal/publish" @@ -160,7 +161,7 @@ type Generate mg.Namespace func (g Generate) Screenshots(ctx context.Context) error { return daggerBuild(ctx, func(client *dagger.Client, req internal.FliptRequest, base, flipt *dagger.Container) error { - return testing.Screenshots(ctx, client, flipt) + return generate.Screenshots(ctx, client, flipt) }) } diff --git a/ui/screenshot.js b/ui/screenshot.js index bf14644b09..6b47a7d503 100644 --- a/ui/screenshot.js +++ b/ui/screenshot.js @@ -10,9 +10,9 @@ const screenshot = async (page, name) => { const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay)); -const capture = async function (name, fn) { +const capture = async function (folder, name, fn) { try { - const path = `${__dirname}/screenshot/fixtures/${name}.yml`; + const path = `${__dirname}/screenshot/${folder}/fixtures/${name}.yml`; if (fs.existsSync(path)) { exec( `flipt import --address=${fliptAddr} ${path}`, @@ -45,7 +45,7 @@ const capture = async function (name, fn) { await page.goto(fliptAddr); await fn(page); await sleep(2000); - await screenshot(page, `${name}.png`); + await screenshot(page, `${folder}/${name}.png`); await context.close(); await browser.close(); diff --git a/ui/screenshot/create-constraint.js b/ui/screenshot/getting_started/create-constraint.js similarity index 79% rename from ui/screenshot/create-constraint.js rename to ui/screenshot/getting_started/create-constraint.js index 89ea7d3945..b90c25437f 100644 --- a/ui/screenshot/create-constraint.js +++ b/ui/screenshot/getting_started/create-constraint.js @@ -1,7 +1,7 @@ -const { capture } = require('../screenshot.js'); +const { capture } = require('../../screenshot.js'); (async () => { - await capture('create_constraint', async (page) => { + await capture('getting_started', 'create_constraint', async (page) => { await page.getByRole('link', { name: 'Segments' }).click(); await page.getByRole('link', { name: 'all-users' }).click(); await page.getByRole('button', { name: 'New Constraint' }).click(); diff --git a/ui/screenshot/create-flag.js b/ui/screenshot/getting_started/create-flag.js similarity index 71% rename from ui/screenshot/create-flag.js rename to ui/screenshot/getting_started/create-flag.js index 68e6eafee0..44fbe66176 100644 --- a/ui/screenshot/create-flag.js +++ b/ui/screenshot/getting_started/create-flag.js @@ -1,7 +1,7 @@ -const { capture } = require('../screenshot.js'); +const { capture } = require('../../screenshot.js'); (async () => { - await capture('create_flag', async (page) => { + await capture('getting_started', 'create_flag', async (page) => { await page.getByRole('button', { name: 'New Flag' }).click(); await page.getByLabel('Name').fill('New Login'); await page.getByLabel('Key').fill('new-login'); diff --git a/ui/screenshot/create-rule.js b/ui/screenshot/getting_started/create-rule.js similarity index 76% rename from ui/screenshot/create-rule.js rename to ui/screenshot/getting_started/create-rule.js index 4731b2999d..c232162cb3 100644 --- a/ui/screenshot/create-rule.js +++ b/ui/screenshot/getting_started/create-rule.js @@ -1,7 +1,7 @@ -const { capture } = require('../screenshot.js'); +const { capture } = require('../../screenshot.js'); (async () => { - await capture('create_rule', async (page) => { + await capture('getting_started', 'create_rule', async (page) => { await page.getByRole('link', { name: 'new-login' }).click(); await page.getByRole('link', { name: 'Evaluation' }).click(); await page.getByRole('button', { name: 'New Rule' }).click(); diff --git a/ui/screenshot/create-segment.js b/ui/screenshot/getting_started/create-segment.js similarity index 68% rename from ui/screenshot/create-segment.js rename to ui/screenshot/getting_started/create-segment.js index f411018069..35a80a04a2 100644 --- a/ui/screenshot/create-segment.js +++ b/ui/screenshot/getting_started/create-segment.js @@ -1,7 +1,7 @@ -const { capture } = require('../screenshot.js'); +const { capture } = require('../../screenshot.js'); (async () => { - await capture('create_segment', async (page) => { + await capture('getting_started', 'create_segment', async (page) => { await page.getByRole('link', { name: 'Segments' }).click(); await page.getByRole('button', { name: 'New Segment' }).click(); await page.getByLabel('Name').fill('All Users'); diff --git a/ui/screenshot/create-variant.js b/ui/screenshot/getting_started/create-variant.js similarity index 77% rename from ui/screenshot/create-variant.js rename to ui/screenshot/getting_started/create-variant.js index 4d45ae2614..13837fd19e 100644 --- a/ui/screenshot/create-variant.js +++ b/ui/screenshot/getting_started/create-variant.js @@ -1,7 +1,7 @@ -const { capture } = require('../screenshot.js'); +const { capture } = require('../../screenshot.js'); (async () => { - await capture('create_variant', async (page) => { + await capture('getting_started', 'create_variant', async (page) => { await page.getByRole('link', { name: 'new-login' }).click(); await page.getByRole('button', { name: 'New Variant' }).click(); await page diff --git a/ui/screenshot/fixtures/create_constraint.yml b/ui/screenshot/getting_started/fixtures/create_constraint.yml similarity index 100% rename from ui/screenshot/fixtures/create_constraint.yml rename to ui/screenshot/getting_started/fixtures/create_constraint.yml diff --git a/ui/screenshot/fixtures/create_rule.yml b/ui/screenshot/getting_started/fixtures/create_rule.yml similarity index 100% rename from ui/screenshot/fixtures/create_rule.yml rename to ui/screenshot/getting_started/fixtures/create_rule.yml diff --git a/ui/screenshot/fixtures/create_variant.yml b/ui/screenshot/getting_started/fixtures/create_variant.yml similarity index 100% rename from ui/screenshot/fixtures/create_variant.yml rename to ui/screenshot/getting_started/fixtures/create_variant.yml From 2dd79fe6bddadfa1c8b1ad40385d25bfb16c511f Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Mon, 24 Jul 2023 17:16:30 -0400 Subject: [PATCH 3/8] feat(wip): concepts docs --- build/generate/screenshots.go | 5 ++- ui/package-lock.json | 44 +++++-------------- ui/package.json | 4 +- ui/screenshot.js | 12 +++-- ui/screenshot/concepts/fixtures/flags.yml | 12 +++++ .../concepts/fixtures/namespaces_default.yml | 5 +++ .../fixtures/namespaces_production.yml | 1 + ui/screenshot/concepts/fixtures/variants.yml | 17 +++++++ ui/screenshot/concepts/flags.js | 5 +++ ui/screenshot/concepts/flags_boolean.js | 10 +++++ ui/screenshot/concepts/namespaces_default.js | 5 +++ .../concepts/namespaces_production.js | 13 ++++++ ui/screenshot/concepts/settings_namespaces.js | 14 ++++++ ui/screenshot/concepts/variants.js | 11 +++++ ui/tests/rollouts.spec.ts | 1 - 15 files changed, 116 insertions(+), 43 deletions(-) create mode 100644 ui/screenshot/concepts/fixtures/flags.yml create mode 100644 ui/screenshot/concepts/fixtures/namespaces_default.yml create mode 100644 ui/screenshot/concepts/fixtures/namespaces_production.yml create mode 100644 ui/screenshot/concepts/fixtures/variants.yml create mode 100644 ui/screenshot/concepts/flags.js create mode 100644 ui/screenshot/concepts/flags_boolean.js create mode 100644 ui/screenshot/concepts/namespaces_default.js create mode 100644 ui/screenshot/concepts/namespaces_production.js create mode 100644 ui/screenshot/concepts/settings_namespaces.js create mode 100644 ui/screenshot/concepts/variants.js diff --git a/build/generate/screenshots.go b/build/generate/screenshots.go index 95d6d6cd19..81c23c5913 100644 --- a/build/generate/screenshots.go +++ b/build/generate/screenshots.go @@ -4,6 +4,7 @@ import ( "context" "crypto/sha256" "fmt" + "log" "os" "path" "time" @@ -56,7 +57,7 @@ func Screenshots(ctx context.Context, client *dagger.Client, flipt *dagger.Conta } dirs := []string{ - "getting_started", + "getting_started", "concepts", } for _, dir := range dirs { @@ -94,7 +95,7 @@ func Screenshots(ctx context.Context, client *dagger.Client, flipt *dagger.Conta } containers <- c - fmt.Printf("Generating screenshot for %s/%s\n", dir, entry) + log.Printf("Generating screenshot for %s/%s\n", dir, entry) return err }) diff --git a/ui/package-lock.json b/ui/package-lock.json index eba3a899fd..c27a2003eb 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -27,6 +27,7 @@ "lodash": "^4.17.21", "moment": "^2.29.4", "nightwind": "^1.1.13", + "playwright": "^1.36.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-helmet": "^6.1.0", @@ -72,7 +73,6 @@ "eslint-plugin-react-hooks": "^4.6.0", "jest": "^29.6.1", "package-changed": "^3.0.0", - "playwright": "^1.36.0", "postcss": "^8.4.27", "prettier": "^2.8.8", "prettier-plugin-organize-imports": "^3.2.3", @@ -10581,13 +10581,12 @@ } }, "node_modules/playwright": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.36.0.tgz", - "integrity": "sha512-ODVOTp5WoRMxDJY3liMmC+wVNicc0cQB17gASvQ+zLBggVK9a2x3gdT5mbl7av+zomvtdirWOqqfD+O6qIrFgw==", - "dev": true, + "version": "1.36.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.36.1.tgz", + "integrity": "sha512-2ZqHpD0U0COKR8bqR3W5IkyIAAM0mT9FgGJB9xWCI1qAUkqLxJskA1ueeQOTH2Qfz3+oxdwwf2EzdOX+RkZmmQ==", "hasInstallScript": true, "dependencies": { - "playwright-core": "1.36.0" + "playwright-core": "1.36.1" }, "bin": { "playwright": "cli.js" @@ -10600,19 +10599,6 @@ "version": "1.36.1", "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.36.1.tgz", "integrity": "sha512-7+tmPuMcEW4xeCL9cp9KxmYpQYHKkyjwoXRnoeTowaeNat8PoBMk/HwCYhqkH2fRkshfKEOiVus/IhID2Pg8kg==", - "dev": true, - "bin": { - "playwright-core": "cli.js" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/playwright/node_modules/playwright-core": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.36.0.tgz", - "integrity": "sha512-7RTr8P6YJPAqB+8j5ATGHqD6LvLLM39sYVNsslh78g8QeLcBs5750c6+msjrHUwwGt+kEbczBj1XB22WMwn+WA==", - "dev": true, "bin": { "playwright-core": "cli.js" }, @@ -20285,27 +20271,17 @@ } }, "playwright": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.36.0.tgz", - "integrity": "sha512-ODVOTp5WoRMxDJY3liMmC+wVNicc0cQB17gASvQ+zLBggVK9a2x3gdT5mbl7av+zomvtdirWOqqfD+O6qIrFgw==", - "dev": true, + "version": "1.36.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.36.1.tgz", + "integrity": "sha512-2ZqHpD0U0COKR8bqR3W5IkyIAAM0mT9FgGJB9xWCI1qAUkqLxJskA1ueeQOTH2Qfz3+oxdwwf2EzdOX+RkZmmQ==", "requires": { - "playwright-core": "1.36.0" - }, - "dependencies": { - "playwright-core": { - "version": "1.36.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.36.0.tgz", - "integrity": "sha512-7RTr8P6YJPAqB+8j5ATGHqD6LvLLM39sYVNsslh78g8QeLcBs5750c6+msjrHUwwGt+kEbczBj1XB22WMwn+WA==", - "dev": true - } + "playwright-core": "1.36.1" } }, "playwright-core": { "version": "1.36.1", "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.36.1.tgz", - "integrity": "sha512-7+tmPuMcEW4xeCL9cp9KxmYpQYHKkyjwoXRnoeTowaeNat8PoBMk/HwCYhqkH2fRkshfKEOiVus/IhID2Pg8kg==", - "dev": true + "integrity": "sha512-7+tmPuMcEW4xeCL9cp9KxmYpQYHKkyjwoXRnoeTowaeNat8PoBMk/HwCYhqkH2fRkshfKEOiVus/IhID2Pg8kg==" }, "postcss": { "version": "8.4.27", diff --git a/ui/package.json b/ui/package.json index 29c6586e78..d12828e0fb 100644 --- a/ui/package.json +++ b/ui/package.json @@ -31,6 +31,7 @@ "lodash": "^4.17.21", "moment": "^2.29.4", "nightwind": "^1.1.13", + "playwright": "^1.36.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-helmet": "^6.1.0", @@ -76,13 +77,12 @@ "eslint-plugin-react-hooks": "^4.6.0", "jest": "^29.6.1", "package-changed": "^3.0.0", - "playwright": "^1.36.0", "postcss": "^8.4.27", "prettier": "^2.8.8", "prettier-plugin-organize-imports": "^3.2.3", "prettier-plugin-tailwindcss": "^0.4.1", - "tailwindcss-bg-patterns": "^0.2.0", "tailwindcss": "^3.3.3", + "tailwindcss-bg-patterns": "^0.2.0", "ts-jest": "^29.1.1", "ts-node": "^10.9.1", "typescript": "^4.9.5", diff --git a/ui/screenshot.js b/ui/screenshot.js index 6b47a7d503..ab76135540 100644 --- a/ui/screenshot.js +++ b/ui/screenshot.js @@ -10,12 +10,16 @@ const screenshot = async (page, name) => { const sleep = (delay) => new Promise((resolve) => setTimeout(resolve, delay)); -const capture = async function (folder, name, fn) { +const capture = async function (folder, name, fn, opts = {}) { + if (!opts.namespace) { + opts.namespace = 'default'; + } + try { const path = `${__dirname}/screenshot/${folder}/fixtures/${name}.yml`; if (fs.existsSync(path)) { exec( - `flipt import --address=${fliptAddr} ${path}`, + `flipt import --create-namespace --namespace=${opts.namespace} --address=${fliptAddr} ${path}`, (error, stdout, stderr) => { if (error) { console.error(`error: ${error.message}`); @@ -44,11 +48,11 @@ const capture = async function (folder, name, fn) { await page.goto(fliptAddr); await fn(page); - await sleep(2000); + await sleep(3000); await screenshot(page, `${folder}/${name}.png`); await context.close(); await browser.close(); }; -module.exports = { capture }; +module.exports = { capture, sleep, screenshot }; diff --git a/ui/screenshot/concepts/fixtures/flags.yml b/ui/screenshot/concepts/fixtures/flags.yml new file mode 100644 index 0000000000..7a1654242d --- /dev/null +++ b/ui/screenshot/concepts/fixtures/flags.yml @@ -0,0 +1,12 @@ +namespace: default +flags: + - key: new-contact-page + name: New Contact Page + description: Show users the new contact page + type: BOOLEAN_FLAG_TYPE + enabled: true + - key: colorscheme + name: Color Scheme + description: The color scheme for the site + type: VARIANT_FLAG_TYPE + enabled: true diff --git a/ui/screenshot/concepts/fixtures/namespaces_default.yml b/ui/screenshot/concepts/fixtures/namespaces_default.yml new file mode 100644 index 0000000000..dee583c877 --- /dev/null +++ b/ui/screenshot/concepts/fixtures/namespaces_default.yml @@ -0,0 +1,5 @@ +namespace: default +flags: + - key: new-login + name: New Login + description: Enables the new login page for users diff --git a/ui/screenshot/concepts/fixtures/namespaces_production.yml b/ui/screenshot/concepts/fixtures/namespaces_production.yml new file mode 100644 index 0000000000..600bcc0406 --- /dev/null +++ b/ui/screenshot/concepts/fixtures/namespaces_production.yml @@ -0,0 +1 @@ +namespace: production diff --git a/ui/screenshot/concepts/fixtures/variants.yml b/ui/screenshot/concepts/fixtures/variants.yml new file mode 100644 index 0000000000..173c0c9d13 --- /dev/null +++ b/ui/screenshot/concepts/fixtures/variants.yml @@ -0,0 +1,17 @@ +namespace: default +flags: + - key: colorscheme + name: Color Scheme + description: The color scheme for the site + type: VARIANT_FLAG_TYPE + enabled: true + variants: + - key: dark + name: Dark + description: A dark color scheme + - key: light + name: Light + description: A light color scheme + - key: auto + name: Auto + description: A color scheme based on the user's preferences diff --git a/ui/screenshot/concepts/flags.js b/ui/screenshot/concepts/flags.js new file mode 100644 index 0000000000..8dd5797348 --- /dev/null +++ b/ui/screenshot/concepts/flags.js @@ -0,0 +1,5 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('concepts', 'flags', async (page) => {}); +})(); diff --git a/ui/screenshot/concepts/flags_boolean.js b/ui/screenshot/concepts/flags_boolean.js new file mode 100644 index 0000000000..4716814109 --- /dev/null +++ b/ui/screenshot/concepts/flags_boolean.js @@ -0,0 +1,10 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('concepts', 'flags_boolean', async (page) => { + await page.getByRole('button', { name: 'New Flag' }).click(); + await page.getByLabel('Name').fill('New Contact Page'); + await page.getByLabel('Boolean').check(); + await page.getByRole('button', { name: 'Create' }).click(); + }); +})(); diff --git a/ui/screenshot/concepts/namespaces_default.js b/ui/screenshot/concepts/namespaces_default.js new file mode 100644 index 0000000000..9d84113ec1 --- /dev/null +++ b/ui/screenshot/concepts/namespaces_default.js @@ -0,0 +1,5 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('concepts', 'namespaces_default', async (page) => {}); +})(); diff --git a/ui/screenshot/concepts/namespaces_production.js b/ui/screenshot/concepts/namespaces_production.js new file mode 100644 index 0000000000..c21dff0ff4 --- /dev/null +++ b/ui/screenshot/concepts/namespaces_production.js @@ -0,0 +1,13 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture( + 'concepts', + 'namespaces_production', + async (page) => { + await page.getByRole('button', { name: 'Default' }).click(); + await page.getByText('production').click(); + }, + { namespace: 'production' } + ); +})(); diff --git a/ui/screenshot/concepts/settings_namespaces.js b/ui/screenshot/concepts/settings_namespaces.js new file mode 100644 index 0000000000..f45f595711 --- /dev/null +++ b/ui/screenshot/concepts/settings_namespaces.js @@ -0,0 +1,14 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('concepts', 'settings_namespaces', async (page) => { + await page.getByRole('link', { name: 'Settings' }).click(); + await page.getByRole('link', { name: 'Namespaces' }).click(); + await page.getByRole('button', { name: 'New Namespace' }).click(); + await page.getByLabel('Name', { exact: true }).fill('Production'); + await page.getByLabel('Description').fill('Production Environment'); + await page.getByRole('button', { name: 'Create' }).click(); + await page.getByRole('link', { name: 'Settings' }).click(); + await page.getByRole('link', { name: 'Namespaces' }).click(); + }); +})(); diff --git a/ui/screenshot/concepts/variants.js b/ui/screenshot/concepts/variants.js new file mode 100644 index 0000000000..d80e4f62ee --- /dev/null +++ b/ui/screenshot/concepts/variants.js @@ -0,0 +1,11 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('concepts', 'variants', async (page) => { + await page.getByRole('link', { name: 'colorscheme' }).click(); + await page.evaluate(() => + // scroll to bottom of page to show all variants + window.scrollTo(0, document.documentElement.scrollHeight) + ); + }); +})(); diff --git a/ui/tests/rollouts.spec.ts b/ui/tests/rollouts.spec.ts index 4e514559ad..39fcadc9fd 100644 --- a/ui/tests/rollouts.spec.ts +++ b/ui/tests/rollouts.spec.ts @@ -12,7 +12,6 @@ test.describe('Rollouts', () => { await page.getByLabel('Boolean').check(); await page.getByRole('button', { name: 'Create' }).click(); await expect(page.getByText('Successfully created flag')).toBeVisible(); - await page.getByText('Evaluation').click(); await expect( page.getByRole('heading', { name: 'Default Rollout' }) ).toBeVisible(); From 46b845feb9423242e9332c65e1b079c26ecbcab5 Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Tue, 25 Jul 2023 07:52:07 -0400 Subject: [PATCH 4/8] chore: rm old screenshots func --- build/testing/ui.go | 95 --------------------------------------------- 1 file changed, 95 deletions(-) diff --git a/build/testing/ui.go b/build/testing/ui.go index 49f4e6a251..86bbf3c7c4 100644 --- a/build/testing/ui.go +++ b/build/testing/ui.go @@ -2,14 +2,10 @@ package testing import ( "context" - "crypto/sha256" - "fmt" "os" - "path" "time" "dagger.io/dagger" - "golang.org/x/sync/errgroup" ) func UI(ctx context.Context, client *dagger.Client, ui, flipt *dagger.Container) error { @@ -32,97 +28,6 @@ func UI(ctx context.Context, client *dagger.Client, ui, flipt *dagger.Container) return nil } -func Screenshots(ctx context.Context, client *dagger.Client, flipt *dagger.Container) error { - src := client.Host().Directory("./ui/", dagger.HostDirectoryOpts{ - Include: []string{ - "./package.json", - "./package-lock.json", - "./playwright.config.ts", - "/screenshots/", - }, - }) - - contents, err := src.File("package-lock.json").Contents(ctx) - if err != nil { - return err - } - - cache := client.CacheVolume(fmt.Sprintf("node-modules-screenshot-%x", sha256.Sum256([]byte(contents)))) - - ui, err := client.Container().From("node:18-bullseye"). - WithMountedDirectory("/src", src).WithWorkdir("/src"). - WithMountedCache("/src/node_modules", cache). - WithExec([]string{"npm", "install"}). - WithExec([]string{"npx", "playwright", "install", "chromium", "--with-deps"}). - Sync(ctx) - if err != nil { - return err - } - - src = client.Host().Directory("./ui/", dagger.HostDirectoryOpts{ - Exclude: []string{ - "./dist/", - "./node_modules/", - }, - }) - - // remount entire directory with module cache - ui, err = ui.WithMountedDirectory("/src", src). - WithMountedCache("/src/node_modules", cache). - WithExec([]string{"npm", "install"}). - Sync(ctx) - if err != nil { - return err - } - - entries, err := ui.Directory("screenshot").Entries(ctx) - if err != nil { - return err - } - - var ( - g errgroup.Group - containers = make(chan *dagger.Container) - ) - - go func() { - _ = g.Wait() - close(containers) - }() - - for _, entry := range entries { - entry := entry - g.Go(func() error { - test, err := buildUI(ctx, ui, flipt) - if err != nil { - return err - } - - if ext := path.Ext(entry); ext != ".js" { - return nil - } - - c, err := test.WithExec([]string{"node", path.Join("screenshot", entry)}).Sync(ctx) - if err != nil { - return err - } - - containers <- c - - return err - }) - } - - for c := range containers { - if _, err := c.Directory("screenshots"). - Export(ctx, "screenshots"); err != nil { - return err - } - } - - return g.Wait() -} - func buildUI(ctx context.Context, ui, flipt *dagger.Container) (_ *dagger.Container, err error) { flipt, err = flipt.Sync(ctx) if err != nil { From 100cd4991577b0eadf77d805e258e96462b10a0c Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Tue, 25 Jul 2023 11:11:48 -0400 Subject: [PATCH 5/8] chore: finish most of the screenshots --- build/generate/screenshots.go | 7 +-- go.work.sum | 54 +++++++++++++++++++ ui/screenshot.js | 3 +- ui/screenshot/concepts/constraints.js | 12 +++++ ui/screenshot/concepts/constraints_types.js | 12 +++++ ui/screenshot/concepts/distributions.js | 8 +++ ui/screenshot/concepts/evaluation.js | 12 +++++ .../concepts/fixtures/constraints.yml | 9 ++++ .../concepts/fixtures/constraints_types.yml | 5 ++ .../concepts/fixtures/distributions.yml | 25 +++++++++ .../concepts/fixtures/evaluation.yml | 25 +++++++++ ui/screenshot/concepts/fixtures/rules.yml | 19 +++++++ ui/screenshot/concepts/fixtures/segments.yml | 5 ++ ui/screenshot/concepts/rules.js | 8 +++ ui/screenshot/concepts/segments.js | 7 +++ ui/screenshot/extra/darkmode.js | 10 ++++ ui/screenshot/extra/fixtures/darkmode.yml | 25 +++++++++ 17 files changed, 242 insertions(+), 4 deletions(-) create mode 100644 ui/screenshot/concepts/constraints.js create mode 100644 ui/screenshot/concepts/constraints_types.js create mode 100644 ui/screenshot/concepts/distributions.js create mode 100644 ui/screenshot/concepts/evaluation.js create mode 100644 ui/screenshot/concepts/fixtures/constraints.yml create mode 100644 ui/screenshot/concepts/fixtures/constraints_types.yml create mode 100644 ui/screenshot/concepts/fixtures/distributions.yml create mode 100644 ui/screenshot/concepts/fixtures/evaluation.yml create mode 100644 ui/screenshot/concepts/fixtures/rules.yml create mode 100644 ui/screenshot/concepts/fixtures/segments.yml create mode 100644 ui/screenshot/concepts/rules.js create mode 100644 ui/screenshot/concepts/segments.js create mode 100644 ui/screenshot/extra/darkmode.js create mode 100644 ui/screenshot/extra/fixtures/darkmode.yml diff --git a/build/generate/screenshots.go b/build/generate/screenshots.go index 81c23c5913..8e3fc3ec6e 100644 --- a/build/generate/screenshots.go +++ b/build/generate/screenshots.go @@ -57,19 +57,20 @@ func Screenshots(ctx context.Context, client *dagger.Client, flipt *dagger.Conta } dirs := []string{ - "getting_started", "concepts", + "getting_started", "concepts", "configuration", "extra", } for _, dir := range dirs { var ( g errgroup.Group containers = make(chan *dagger.Container) + dir = dir ) - dir := dir entries, err := ui.Directory("screenshot/" + dir).Entries(ctx) if err != nil { - return err + // skip if directory does not exist + continue } go func() { diff --git a/go.work.sum b/go.work.sum index 300be0adc7..e7163761f0 100644 --- a/go.work.sum +++ b/go.work.sum @@ -410,10 +410,12 @@ contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EU dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= gioui.org v0.0.0-20210308172011-57750fc8a0a6 h1:K72hopUosKG3ntOPNG4OzzbuhxGuVf06fa2la1/H/Ho= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/gqlgen v0.17.2 h1:yczvlwMsfcVu/JtejqfrLwXuSP0yZFhmcss3caEvHw8= github.com/99designs/gqlgen v0.17.31 h1:VncSQ82VxieHkea8tz11p7h/zSbvHSxSDZfywqWt158= github.com/99designs/gqlgen v0.17.31/go.mod h1:i4rEatMrzzu6RXaHydq1nmEPZkb3bKQsnxNRHS4DQB4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= +github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8 h1:V8krnnfGj4pV65YLUm3C0/8bl7V5Nry2Pwvy3ru/wLc= github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg= github.com/Azure/azure-pipeline-go v0.2.3 h1:7U9HBg1JFK3jHl5qmo4CTZKFTVgMwdFHMVtCdfBE21U= @@ -422,14 +424,17 @@ github.com/Azure/azure-sdk-for-go v16.2.1+incompatible h1:KnPIugL51v3N3WwvaSmZbx github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0 h1:Ut0ZGdOwJDw0npYEg+TLlPls3Pq6JiZaP2/aGKir7Zw= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0/go.mod h1:bhXu1AjYL+wutSL/kpSq6s7733q2Rb0yuot9Zgfqa/0= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2 h1:+5VZ72z0Qan5Bog5C+ZkgSqUbeVUd9wgtHOrIKuc5b8= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1 h1:QSdcrd/UFJv6Bp/CfoVf2SrENpFn9P6Yh8yb+xNhYMM= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1/go.mod h1:eZ4g6GUvXiGulfIbbhh1Xr4XwUYaYaWMqzGD/284wCA= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0 h1:u/LLAOFgsMv7HmNL4Qufg58y+qElGOt5qv0z1mURkRY= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0/go.mod h1:2e8rMJtl2+2j+HXbTBwnyGpm5Nou7KhvSfxOq8JpTag= github.com/Azure/azure-storage-blob-go v0.14.0 h1:1BCg74AmVdYwO3dlKwtFU1V0wU2PZdREkXvAmZJRUlM= github.com/Azure/azure-storage-blob-go v0.14.0/go.mod h1:SMqIBi+SuiQH32bvyjngEewEeXoPfKMgWlBDaYf6fck= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= @@ -470,7 +475,11 @@ github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HR github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM= github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw= +github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= +github.com/apache/arrow/go/v10 v10.0.1/go.mod h1:YvhnlEePVnBS4+0z3fhPfUy7W1Ikj0Ih0vcRo/gZ1M0= +github.com/apache/arrow/go/v11 v11.0.0/go.mod h1:Eg5OsL5H+e299f7u5ssuXsuHQVEGC4xei5aX110hRiI= +github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= @@ -478,8 +487,10 @@ github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/aws/aws-sdk-go v1.34.0/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go-v2/config v1.15.5/go.mod h1:ZijHHh0xd/A+ZY53az0qzC5tT46kt4JVCePf2NX9Lk4= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.4/go.mod h1:u/s5/Z+ohUQOPXl00m2yJVyioWDECsbpXTQlaqSlufc= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.33/go.mod h1:84XgODVR8uRhmOnUkKGUZKqIMxmjmLOR8Uyp7G/TPwc= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.11/go.mod h1:0MR+sS1b/yxsfAPvAESrw8NfwUoxMinDyw6EYR9BS2U= github.com/aws/aws-sdk-go-v2/service/sso v1.11.4/go.mod h1:cPDwJwsP4Kff9mldCXAmddjJL6JGQqtA3Mzer2zyr88= github.com/aws/aws-sdk-go-v2/service/sts v1.16.4/go.mod h1:lfSYenAXtavyX2A1LsViglqlG9eEFYxNryTZS5rn3QE= @@ -520,6 +531,8 @@ github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cristalhq/acmd v0.8.1/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= github.com/cznic/mathutil v0.0.0-20180504122225-ca4c9f2c1369/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= +github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/dhui/dktest v0.3.16/go.mod h1:gYaA3LRmM8Z4vJl2MA0THIigJoZrwOansEOsp+kqxp0= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= github.com/docker/cli v23.0.0-rc.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= @@ -527,6 +540,7 @@ github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNk github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/eapache/go-resiliency v1.3.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= @@ -543,6 +557,7 @@ github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsouza/fake-gcs-server v1.17.0/go.mod h1:D1rTE4YCyHFNa99oyJJ5HyclvN/0uQR+pM/VdlL83bw= +github.com/gabriel-vasile/mimetype v1.4.1/go.mod h1:05Vi0w3Y9c/lNvJOdmIwvrrAhX3rYhfQQCaf9VJcv7M= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f/go.mod h1:8LHG1a3SRW71ettAD/jW13h8c6AqjVSeL11RAdgaqpo= @@ -551,11 +566,15 @@ github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5/go.mod h1:3NAwwmD4uY/yggRxoEjk/S00MIV3A+H7rrE3i87eYxM= github.com/gobuffalo/here v0.6.0/go.mod h1:wAG085dHOYqUpf+Ap+WOdrPTp5IYcDAs/x7PLa8Y5fM= +github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gocql/gocql v0.0.0-20210515062232-b7ef815b4556/go.mod h1:DL0ekTmBSTdlNF25Orwt/JMzqIq3EJ4MVa/J/uK64OY= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-github/v39 v39.2.0/go.mod h1:C1s8C5aCC9L+JXIYpJM5GYytdX52vC1bLvHEF1IhBrE= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= @@ -572,9 +591,11 @@ github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/ github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hanwen/go-fuse/v2 v2.1.1-0.20220112183258-f57e95bda82d/go.mod h1:B1nGE/6RBFyBRC1RRnf23UpwCdyJ31eukw34oAKukAc= github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= +github.com/hashicorp/consul/sdk v0.13.1/go.mod h1:SW/mM4LbKfqmMvcFu8v+eiQQ7oitXEFeiBe9StxERb0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -591,12 +612,20 @@ github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdv github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.3/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= github.com/in-toto/in-toto-golang v0.5.0/go.mod h1:/Rq0IZHLV7Ku5gielPT4wPHJfH1GdHMCq8+WPxw8/BE= github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ= +github.com/jackc/pgconn v1.14.0/go.mod h1:9mBNlny0UvkgJdCDvdVHYSjI+8tD2rnKK69Wz8ti++E= +github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds= +github.com/jackc/pgproto3/v2 v2.3.2/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= +github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgx/v4 v4.18.1/go.mod h1:FydWkUyadDmdNH/mHnGob881GawxeEm7TcMCzkb+qQE= +github.com/jackc/pgx/v5 v5.3.1/go.mod h1:t3JDKnCBlYIc0ewLF0Q7B8MXmoIaBOZj/ic7iHozM/8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= @@ -611,18 +640,25 @@ github.com/k0kubun/pp v2.3.0+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3t github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= +github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/ktrysmt/go-bitbucket v0.6.4/go.mod h1:9u0v3hsd2rqCHRIpbir1oP7F58uo5dq19sBYvuMoyQ4= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lyft/protoc-gen-star/v2 v2.0.1/go.mod h1:RcCdONR2ScXaYnQC5tUzxzlpA3WVYF7/opLeUgcQs/o= github.com/markbates/pkger v0.15.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= +github.com/matryer/moq v0.2.7/go.mod h1:kITsx543GOENm48TUAQyJ9+SAvFSr7iGQXPoth/VUBk= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= +github.com/microsoft/go-mssqldb v1.0.0/go.mod h1:+4wZTUnz/SV6nffv+RRRB/ss8jPng5Sho2SmM1l2ts4= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= +github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3/go.mod h1:RagcQ7I8IeTMnF8JTXieKnO4Z6JCsikNEzj0DwauVzE= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= @@ -637,6 +673,7 @@ github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGp github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs= github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mutecomm/go-sqlcipher/v4 v4.4.0/go.mod h1:PyN04SaWalavxRGH9E8ZftG6Ju7rsPrGmQRjrEaVpiY= github.com/nakagami/firebirdsql v0.0.0-20190310045651-3c02a58cfed8/go.mod h1:86wM1zFnC6/uDBfZGNwB65O+pR2OFi5q/YQaEUid1qA= github.com/neo4j/neo4j-go-driver v1.8.1-0.20200803113522-b626aa943eba/go.mod h1:ncO5VaFWh0Nrt+4KT4mOZboaczBZcLuHrG+/sUeP8gI= @@ -675,6 +712,7 @@ github.com/secure-systems-lab/go-securesystemslib v0.4.0/go.mod h1:FGBZgq2tXWICs github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002/go.mod h1:/yeG0My1xr/u+HZrFQ1tOQQQQrOawfyMUH13ai5brBc= github.com/shibumi/go-pathspec v1.3.0/go.mod h1:Xutfslp817l2I1cZvgcfeMQJG5QnU2lh5tVaaMCl3jE= github.com/shirou/gopsutil/v3 v3.23.1/go.mod h1:NN6mnm5/0k8jw4cBfCnJtr5L7ErOTg18tMNpgFkn0hA= +github.com/snowflakedb/gosnowflake v1.6.19/go.mod h1:FM1+PWUdwB9udFDsXdfD58NONC0m+MlOSmQRvimobSM= github.com/spdx/tools-golang v0.3.1-0.20230104082527-d6f58551be3f/go.mod h1:VHzvNsKAfAGqs4ZvwRL+7a0dNsL20s7lGui4K9C0xQM= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= @@ -687,6 +725,7 @@ github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6 github.com/tonistiigi/vt100 v0.0.0-20210615222946-8066bb97264f/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/urfave/cli v1.22.4/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli/v2 v2.25.5/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= github.com/vbatts/tar-split v0.11.2/go.mod h1:vV3ZuO2yWSVsz+pfFzDG/upWH1JhjOiEaWq6kXyQ3VI= @@ -694,18 +733,23 @@ github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5/go.mod h1:tw github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/xanzy/go-gitlab v0.15.0/go.mod h1:8zdQa/ri1dfn8eS3Ir1SyfvOKlw7WBJ8DVThkpGiXrs= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xhit/go-str2duration v1.2.0/go.mod h1:3cPSlfZlUHVlneIVfePFWcJZsuwf+P1v2SRTV4cUmp4= github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= +github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yhat/scrape v0.0.0-20161128144610-24b7890b0945/go.mod h1:4vRFPPNYllgCacoj+0FoKOjTW68rUhEfqPLiEJaK2w8= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= gitlab.com/nyarla/go-crypt v0.0.0-20160106005555-d9a5dc2b789b/go.mod h1:T3BPAOm2cqquPa0MKWeNkmOM5RQsRhkrwMWonFMN7fE= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= go.etcd.io/etcd/client/v2 v2.305.7/go.mod h1:GQGT5Z3TBuAQGvgPfhR7VPySu/SudxmEkRq9BgzFU6s= go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= +go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.29.0/go.mod h1:vHItvsnJtp7ES++nFLLFBzUWny7fJQSvTlxFcqQGUr4= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= @@ -769,6 +813,7 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gotest.tools/gotestsum v1.10.0/go.mod h1:6JHCiN6TEjA7Kaz23q1bH0e2Dc3YJjDUZ0DmctFZf+w= k8s.io/api v0.22.5/go.mod h1:mEhXyLaSD1qTOf40rRiKXkc+2iCem09rWLlFwhCEiAs= k8s.io/apimachinery v0.22.5/go.mod h1:xziclGKwuuJ2RM5/rSFQSYAj0zdbci3DH8kj+WvyN0U= k8s.io/apiserver v0.22.5/go.mod h1:s2WbtgZAkTKt679sYtSudEQrTGWUSQAPe6MupLnlmaQ= @@ -777,15 +822,24 @@ k8s.io/component-base v0.22.5/go.mod h1:VK3I+TjuF9eaa+Ln67dKxhGar5ynVbwnGrUiNF4M k8s.io/cri-api v0.25.0/go.mod h1:J1rAyQkSJ2Q6I+aBMOVgg2/cbbebso6FNa0UagiR0kc= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= modernc.org/b v1.0.0/go.mod h1:uZWcZfRj1BpYzfN9JTerzlNUnnPsV9O2ZA8JsRcubNg= +modernc.org/cc/v3 v3.36.3/go.mod h1:NFUHyPn4ekoC/JHeZFfZurN6ixxawE1BnVonP/oahEI= +modernc.org/ccgo/v3 v3.16.9/go.mod h1:zNMzC9A9xeNUepy6KuZBbugn3c0Mc9TeiJO4lgvkJDo= modernc.org/db v1.0.0/go.mod h1:kYD/cO29L/29RM0hXYl4i3+Q5VojL31kTUVpVJDw0s8= modernc.org/file v1.0.0/go.mod h1:uqEokAEn1u6e+J45e54dsEA/pw4o7zLrA2GwyntZzjw= modernc.org/fileutil v1.0.0/go.mod h1:JHsWpkrk/CnVV1H/eGlFf85BEpfkrp56ro8nojIq9Q8= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/internal v1.0.0/go.mod h1:VUD/+JAkhCpvkUitlEOnhpVxCgsBI90oTzSCRcqQVSM= +modernc.org/libc v1.17.1/go.mod h1:FZ23b+8LjxZs7XtFMbSzL/EhPxNbfZbErxEHc7cbD9s= modernc.org/lldb v1.0.0/go.mod h1:jcRvJGWfCGodDZz8BPwiKMJxGJngQ/5DrRapkQnLob8= +modernc.org/mathutil v1.5.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/memory v1.2.1/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU= +modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/ql v1.0.0/go.mod h1:xGVyrLIatPcO2C1JvI/Co8c0sr6y91HKFNy4pt9JXEY= modernc.org/sortutil v1.1.0/go.mod h1:ZyL98OQHJgH9IEfN71VsamvJgrtRX9Dj2gX+vH86L1k= +modernc.org/sqlite v1.18.1/go.mod h1:6ho+Gow7oX5V+OiOQ6Tr4xeqbx13UZ6t+Fw9IRUG4d4= +modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= modernc.org/zappy v1.0.0/go.mod h1:hHe+oGahLVII/aTTyWK/b53VDHMAGCBYYeZ9sn83HC4= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= diff --git a/ui/screenshot.js b/ui/screenshot.js index ab76135540..54f9840a68 100644 --- a/ui/screenshot.js +++ b/ui/screenshot.js @@ -42,7 +42,8 @@ const capture = async function (folder, name, fn, opts = {}) { const browser = await chromium.launch({ headless: true }); const context = await browser.newContext({ - viewport: { width: 1440, height: 900 } + viewport: { width: 1440, height: 900 }, + deviceScaleFactor: 3, }); const page = await context.newPage(); diff --git a/ui/screenshot/concepts/constraints.js b/ui/screenshot/concepts/constraints.js new file mode 100644 index 0000000000..107813711d --- /dev/null +++ b/ui/screenshot/concepts/constraints.js @@ -0,0 +1,12 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('concepts', 'constraints', async (page) => { + await page.getByRole('link', { name: 'Segments' }).click(); + await page.getByRole('link', { name: 'new-users' }).click(); + await page.evaluate(() => + // scroll to bottom of page to show all constraints + window.scrollTo(0, document.documentElement.scrollHeight) + ); + }); +})(); diff --git a/ui/screenshot/concepts/constraints_types.js b/ui/screenshot/concepts/constraints_types.js new file mode 100644 index 0000000000..f0a3dcffb0 --- /dev/null +++ b/ui/screenshot/concepts/constraints_types.js @@ -0,0 +1,12 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('concepts', 'constraints_types', async (page) => { + await page.getByRole('link', { name: 'Segments' }).click(); + await page.getByRole('link', { name: 'lunch-party' }).click(); + await page.getByRole('button', { name: 'New Constraint' }).click(); + await page.getByLabel('Property').fill('sale_date'); + await page.getByLabel('Type').selectOption('DATETIME_COMPARISON_TYPE'); + await page.getByLabel('Operator').selectOption('gt'); + }); +})(); diff --git a/ui/screenshot/concepts/distributions.js b/ui/screenshot/concepts/distributions.js new file mode 100644 index 0000000000..1c55dcf2ac --- /dev/null +++ b/ui/screenshot/concepts/distributions.js @@ -0,0 +1,8 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('concepts', 'distributions', async (page) => { + await page.getByRole('link', { name: 'colorscheme' }).click(); + await page.getByRole('link', { name: 'Evaluation' }).click(); + }); +})(); diff --git a/ui/screenshot/concepts/evaluation.js b/ui/screenshot/concepts/evaluation.js new file mode 100644 index 0000000000..dc11e076fe --- /dev/null +++ b/ui/screenshot/concepts/evaluation.js @@ -0,0 +1,12 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('concepts', 'evaluation', async (page) => { + await page.getByRole('link', { name: 'Console' }).click(); + await page.locator('#flagKey-select-button').click(); + await page.getByRole('option', { name: 'colorscheme Color Scheme' }).click(); + await page.getByPlaceholder('{}').click(); + await page.getByPlaceholder('{}').fill('{\n\t"finished_onboarding":"false"\n}'); + await page.getByRole('button', { name: 'Evaluate', exact: true }).click(); + }); +})(); diff --git a/ui/screenshot/concepts/fixtures/constraints.yml b/ui/screenshot/concepts/fixtures/constraints.yml new file mode 100644 index 0000000000..257ecaca7b --- /dev/null +++ b/ui/screenshot/concepts/fixtures/constraints.yml @@ -0,0 +1,9 @@ +namespace: default +segments: + - key: new-users + name: New Users + description: Users who haven't finished onboarding + constraints: + - property: finished_onboarding + type: BOOLEAN_COMPARISON_TYPE + operator: false diff --git a/ui/screenshot/concepts/fixtures/constraints_types.yml b/ui/screenshot/concepts/fixtures/constraints_types.yml new file mode 100644 index 0000000000..7438bdd6ac --- /dev/null +++ b/ui/screenshot/concepts/fixtures/constraints_types.yml @@ -0,0 +1,5 @@ +namespace: default +segments: + - key: lunch-party + name: Lunch Party + description: Lunch party? It should be launch party! diff --git a/ui/screenshot/concepts/fixtures/distributions.yml b/ui/screenshot/concepts/fixtures/distributions.yml new file mode 100644 index 0000000000..560846d478 --- /dev/null +++ b/ui/screenshot/concepts/fixtures/distributions.yml @@ -0,0 +1,25 @@ +namespace: default +flags: + - key: colorscheme + name: Color Scheme + description: The color scheme for the site + type: VARIANT_FLAG_TYPE + enabled: true + variants: + - key: dark + - key: light + - key: auto + rules: + - segment: new-users + rank: 1 + distributions: + - variant: dark + rollout: 10 + - variant: light + rollout: 30 + - variant: auto + rollout: 60 +segments: + - key: new-users + name: New Users + match_type: ALL_MATCH_TYPE diff --git a/ui/screenshot/concepts/fixtures/evaluation.yml b/ui/screenshot/concepts/fixtures/evaluation.yml new file mode 100644 index 0000000000..560846d478 --- /dev/null +++ b/ui/screenshot/concepts/fixtures/evaluation.yml @@ -0,0 +1,25 @@ +namespace: default +flags: + - key: colorscheme + name: Color Scheme + description: The color scheme for the site + type: VARIANT_FLAG_TYPE + enabled: true + variants: + - key: dark + - key: light + - key: auto + rules: + - segment: new-users + rank: 1 + distributions: + - variant: dark + rollout: 10 + - variant: light + rollout: 30 + - variant: auto + rollout: 60 +segments: + - key: new-users + name: New Users + match_type: ALL_MATCH_TYPE diff --git a/ui/screenshot/concepts/fixtures/rules.yml b/ui/screenshot/concepts/fixtures/rules.yml new file mode 100644 index 0000000000..4809b5574f --- /dev/null +++ b/ui/screenshot/concepts/fixtures/rules.yml @@ -0,0 +1,19 @@ +namespace: default +flags: + - key: colorscheme + name: Color Scheme + description: The color scheme for the site + type: VARIANT_FLAG_TYPE + enabled: true + variants: + - key: dark + rules: + - segment: new-users + rank: 1 + distributions: + - variant: dark + rollout: 100 +segments: + - key: new-users + name: New Users + match_type: ALL_MATCH_TYPE diff --git a/ui/screenshot/concepts/fixtures/segments.yml b/ui/screenshot/concepts/fixtures/segments.yml new file mode 100644 index 0000000000..6f01485eaa --- /dev/null +++ b/ui/screenshot/concepts/fixtures/segments.yml @@ -0,0 +1,5 @@ +namespace: default +segments: + - key: new-users + name: New Users + description: Users who haven't finished onboarding diff --git a/ui/screenshot/concepts/rules.js b/ui/screenshot/concepts/rules.js new file mode 100644 index 0000000000..43fb498588 --- /dev/null +++ b/ui/screenshot/concepts/rules.js @@ -0,0 +1,8 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('concepts', 'rules', async (page) => { + await page.getByRole('link', { name: 'colorscheme' }).click(); + await page.getByRole('link', { name: 'Evaluation' }).click(); + }); +})(); diff --git a/ui/screenshot/concepts/segments.js b/ui/screenshot/concepts/segments.js new file mode 100644 index 0000000000..8f01d4ffa1 --- /dev/null +++ b/ui/screenshot/concepts/segments.js @@ -0,0 +1,7 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('concepts', 'segments', async (page) => { + await page.getByRole('link', { name: 'Segments' }).click(); + }); +})(); diff --git a/ui/screenshot/extra/darkmode.js b/ui/screenshot/extra/darkmode.js new file mode 100644 index 0000000000..05a156e14b --- /dev/null +++ b/ui/screenshot/extra/darkmode.js @@ -0,0 +1,10 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('extra', 'darkmode', async (page) => { + await page.getByRole('link', { name: 'Settings' }).click(); + await page.getByLabel('Theme').selectOption('dark'); + await page.getByLabel('UTC TimezoneDisplay dates and times in UTC timezone').click(); + await page.getByRole('link', { name: 'Flags' }).click(); + }); +})(); diff --git a/ui/screenshot/extra/fixtures/darkmode.yml b/ui/screenshot/extra/fixtures/darkmode.yml new file mode 100644 index 0000000000..560846d478 --- /dev/null +++ b/ui/screenshot/extra/fixtures/darkmode.yml @@ -0,0 +1,25 @@ +namespace: default +flags: + - key: colorscheme + name: Color Scheme + description: The color scheme for the site + type: VARIANT_FLAG_TYPE + enabled: true + variants: + - key: dark + - key: light + - key: auto + rules: + - segment: new-users + rank: 1 + distributions: + - variant: dark + rollout: 10 + - variant: light + rollout: 30 + - variant: auto + rollout: 60 +segments: + - key: new-users + name: New Users + match_type: ALL_MATCH_TYPE From 4e400edc467cd714a05fb7291437b88405171429 Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Tue, 25 Jul 2023 11:26:24 -0400 Subject: [PATCH 6/8] chore: add rollouts --- ui/screenshot/concepts/fixtures/rollouts.yml | 11 +++++++++++ ui/screenshot/concepts/rollouts.js | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 ui/screenshot/concepts/fixtures/rollouts.yml create mode 100644 ui/screenshot/concepts/rollouts.js diff --git a/ui/screenshot/concepts/fixtures/rollouts.yml b/ui/screenshot/concepts/fixtures/rollouts.yml new file mode 100644 index 0000000000..2472954815 --- /dev/null +++ b/ui/screenshot/concepts/fixtures/rollouts.yml @@ -0,0 +1,11 @@ +namespace: default +flags: + - key: new-contact-page + name: New Contact Page + description: Show users the new contact page + type: BOOLEAN_FLAG_TYPE + enabled: true + rollouts: + - threshold: + percentage: 50 + value: true diff --git a/ui/screenshot/concepts/rollouts.js b/ui/screenshot/concepts/rollouts.js new file mode 100644 index 0000000000..7516babd60 --- /dev/null +++ b/ui/screenshot/concepts/rollouts.js @@ -0,0 +1,11 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('concepts', 'rollouts', async (page) => { + await page.getByRole('link', { name: 'new-contact-page' }).click(); + await page.evaluate(() => + // scroll to bottom of page to show all rollouts + window.scrollTo(0, document.documentElement.scrollHeight) + ); + }); +})(); From fa13a4fae984be5c58a325c1dcd18a6306463059 Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Tue, 25 Jul 2023 11:46:54 -0400 Subject: [PATCH 7/8] chore: add readonly screenshot --- ui/screenshot/extra/fixtures/readonly.yml | 25 +++++++++++++++++++++++ ui/screenshot/extra/readonly.js | 16 +++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 ui/screenshot/extra/fixtures/readonly.yml create mode 100644 ui/screenshot/extra/readonly.js diff --git a/ui/screenshot/extra/fixtures/readonly.yml b/ui/screenshot/extra/fixtures/readonly.yml new file mode 100644 index 0000000000..560846d478 --- /dev/null +++ b/ui/screenshot/extra/fixtures/readonly.yml @@ -0,0 +1,25 @@ +namespace: default +flags: + - key: colorscheme + name: Color Scheme + description: The color scheme for the site + type: VARIANT_FLAG_TYPE + enabled: true + variants: + - key: dark + - key: light + - key: auto + rules: + - segment: new-users + rank: 1 + distributions: + - variant: dark + rollout: 10 + - variant: light + rollout: 30 + - variant: auto + rollout: 60 +segments: + - key: new-users + name: New Users + match_type: ALL_MATCH_TYPE diff --git a/ui/screenshot/extra/readonly.js b/ui/screenshot/extra/readonly.js new file mode 100644 index 0000000000..3259b14d9f --- /dev/null +++ b/ui/screenshot/extra/readonly.js @@ -0,0 +1,16 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('extra', 'readonly', async (page) => { + await page.route(/\/meta\/config/, async (route) => { + const response = await route.fetch(); + const json = await response.json(); + json.storage = { type: 'git' }; + // Fulfill using the original response, while patching the + // response body with our changes to mock git storage for read only mode + await route.fulfill({ response, json }); + }); + + await page.getByRole('link', { name: 'Flags' }).click(); + }); +})(); From c6b074b09e3beca81f2889586566853461ffd6d7 Mon Sep 17 00:00:00 2001 From: Mark Phelps <209477+markphelps@users.noreply.github.com> Date: Tue, 25 Jul 2023 12:14:12 -0400 Subject: [PATCH 8/8] chore: add missing eval console screen --- .../getting_started/evaluation_console.js | 11 ++++++++++ .../fixtures/evaluation_console.yml | 20 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 ui/screenshot/getting_started/evaluation_console.js create mode 100644 ui/screenshot/getting_started/fixtures/evaluation_console.yml diff --git a/ui/screenshot/getting_started/evaluation_console.js b/ui/screenshot/getting_started/evaluation_console.js new file mode 100644 index 0000000000..70bdbe6358 --- /dev/null +++ b/ui/screenshot/getting_started/evaluation_console.js @@ -0,0 +1,11 @@ +const { capture } = require('../../screenshot.js'); + +(async () => { + await capture('getting_started', 'evaluation_console', async (page) => { + await page.getByRole('link', { name: 'Console' }).click(); + await page.locator('#flagKey-select-button').click(); + await page.getByRole('option', { name: 'new-login New Login' }).click(); + await page.getByPlaceholder('{}').click(); + await page.getByRole('button', { name: 'Evaluate', exact: true }).click(); + }); +})(); diff --git a/ui/screenshot/getting_started/fixtures/evaluation_console.yml b/ui/screenshot/getting_started/fixtures/evaluation_console.yml new file mode 100644 index 0000000000..dc56aacc31 --- /dev/null +++ b/ui/screenshot/getting_started/fixtures/evaluation_console.yml @@ -0,0 +1,20 @@ +namespace: default +flags: + - key: new-login + name: New Login + description: Enables the new login page for users + enabled: true + variants: + - key: big-blue-login-button + - key: big-red-login-button + rules: + - segment: all-users + rank: 1 + distributions: + - variant: big-blue-login-button + rollout: 50 + - variant: big-red-login-button + rollout: 50 +segments: + - key: all-users + name: All Users