Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/docs-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Docs UI Tests

on:
schedule:
- cron: '0 15 * * *' # Runs daily at 10:00 AM EST / 15:00 UTC
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Install dependencies
run: npm install

- name: Install Playwright browsers
run: npx playwright install --with-deps

- name: Set environment variables from GitHub Secrets
run: |
echo "ENV_APP_USERNAME=${{ secrets.ENV_APP_USERNAME }}" >> $GITHUB_ENV
echo "ENV_APP_PASSWORD=${{ secrets.ENV_APP_PASSWORD }}" >> $GITHUB_ENV

- name: Run Playwright tests
run: npx playwright test --trace on

- name: Send Slack notification on failure
if: failure()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo, action, workflow
env:
SLACK_WEBHOOK_URL: ${{ secrets.DOCS_TESTS_SLACK_WEBHOOK }}

- name: Cleanup app-auth.json
if: always()
run: rm -f ${{ github.workspace }}/app-auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
description: Dev Environments
keywords: Dev Environments, share, local, Compose
title: Overview of Dev Environments
linkTitle: Dev Environments (Beta)
linkTitle: Dev Environments
weight: 40
aliases:
- /desktop/dev-environments/
params:
sidebar:
badge:
color: blue
text: Beta
---

{{% include "dev-envs-changing.md" %}}
Expand Down
5 changes: 0 additions & 5 deletions content/manuals/desktop/features/usbip.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ keywords: usb, usbip, docker desktop, macos, windows, linux
toc_max: 3
aliases:
- /desktop/usbip/
params:
sidebar:
badge:
color: green
text: New
---

{{< summary-bar feature_name="USB/IP support" >}}
Expand Down
5 changes: 0 additions & 5 deletions content/manuals/desktop/features/vmm.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
---
title: Virtual Machine Manager for Docker Desktop on Mac
linkTitle: Virtual Machine Manager
params:
sidebar:
badge:
color: green
text: New
keywords: virtualization software, resource allocation, mac, docker desktop, vm monitoring, vm performance, apple silicon
description: Discover Docker Desktop for Mac's Virtual Machine Manager (VMM) options, including the new Docker VMM for Apple Silicon, offering enhanced performance and efficiency
weight: 110
Expand Down
7 changes: 6 additions & 1 deletion content/manuals/desktop/features/wasm.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
---
title: Wasm workloads (Beta)
title: Wasm workloads
weight: 20
description: How to run Wasm workloads with Docker Desktop
keywords: Docker, WebAssembly, wasm, containerd, engine
toc_max: 3
aliases:
- /desktop/wasm/
params:
sidebar:
badge:
color: blue
text: Beta
---

{{< summary-bar feature_name="Wasm workloads" >}}
Expand Down
6 changes: 6 additions & 0 deletions docs-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
.env
8 changes: 8 additions & 0 deletions docs-tests/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM mcr.microsoft.com/playwright:v1.49.1-jammy

WORKDIR /app
COPY . /app

RUN npm install

CMD ["npx", "playwright", "test", "--headed"]
112 changes: 112 additions & 0 deletions docs-tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions docs-tests/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "docs-tests",
"version": "1.0.0",
"main": "index.js",
"scripts": {},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
"@playwright/test": "^1.49.1",
"@types/node": "^22.10.2"
},
"dependencies": {
"dotenv": "^16.4.7"
}
}
9 changes: 9 additions & 0 deletions docs-tests/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from '@playwright/test';

export default defineConfig({
workers: 1,
globalSetup: 'tests/globalSetup.ts',
use: {
storageState: 'app-auth.json',
},
});
42 changes: 42 additions & 0 deletions docs-tests/tests/adminConsoleAddCompanyOwner.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// This test verifies https://docs.docker.com/admin/company/owners/#add-a-company-owner

import { test, expect } from "@playwright/test";
test.use({ storageState: "app-auth.json" });

test.beforeEach(async ({ page }) => {
await page.goto("https://app-stage.docker.com/");
await page.waitForLoadState("networkidle");

// Accept cookies if visible
const acceptCookies = page.getByRole("button", {
name: "Accept All Cookies",
});
if (await acceptCookies.isVisible({ timeout: 5000 }).catch(() => false)) {
await acceptCookies.click();
await expect(acceptCookies).toBeHidden();
}
});

test("adminConsoleAddCompanyOwner", async ({ page }) => {
// Select Admin Console and choose company
await page.getByTestId("dashboard-card-admin").click();
await page.getByRole("menuitem", { name: "sarahscompany Company" }).click();

// Select Company owners
await page.getByRole("menuitem", { name: "Company owners" }).click();

// Select Add owner and search for owner by Docker ID
await page.getByRole("button", { name: "Add owner" }).click();
await page.getByLabel("Search by Docker ID").click();
await page.getByLabel("Search by Docker ID").fill("sarahstestaccount");

// Verify Add company owner button exists
await expect(
page.getByRole("button", { name: "Add company owner" })
).toBeVisible();
});

test.afterEach(async ({ page }) => {
await page.goto("https://app-stage.docker.com/");
await page.waitForLoadState("networkidle");
});
44 changes: 44 additions & 0 deletions docs-tests/tests/adminConsoleAddDBCMinutes.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// This test verifies https://docs.docker.com/subscription/scale/#add-docker-build-cloud-minutes

import { test, expect } from "@playwright/test";
test.use({ storageState: "app-auth.json" });

test.beforeEach(async ({ page }) => {
await page.goto("https://app-stage.docker.com/");
await page.waitForLoadState("networkidle");

// Accept cookies if visible
const acceptCookies = page.getByRole("button", {
name: "Accept All Cookies",
});
if (await acceptCookies.isVisible({ timeout: 5000 }).catch(() => false)) {
await acceptCookies.click();
await expect(acceptCookies).toBeHidden();
}
});

test("adminConsoleAddDBCMinutes", async ({ page }) => {
// Select Billing and choose organization
await page.getByTestId("dashboard-card-billing-account-center").click();
await page
.getByRole("menuitem", { name: "docs dat Docker Business" })
.click();

// Select View build minutes
await page.getByRole("link", { name: "View build minutes" }).click();

// Skip DBC pop-up
await page.getByRole("button", { name: "Skip" }).click();

// Select Purchase addiitonal minutes and choose amount
await page.getByRole("link", { name: "Purchase additional minutes" }).click();
await page.getByLabel("build minutes | $50 $40").check();

// Select Continue to payment
await page.getByRole("button", { name: "Continue to payment" }).click();
});

test.afterEach(async ({ page }) => {
await page.goto("https://app-stage.docker.com/");
await page.waitForLoadState("networkidle");
});
39 changes: 39 additions & 0 deletions docs-tests/tests/adminConsoleAddOrganizationsToCompany.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// This test verifies https://docs.docker.com/admin/company/organizations/#add-organizations-to-a-company

import { test, expect } from "@playwright/test";
test.use({ storageState: "app-auth.json" });

test.beforeEach(async ({ page }) => {
await page.goto("https://app-stage.docker.com/");
await page.waitForLoadState("networkidle");

// Accept cookies if visible
const acceptCookies = page.getByRole("button", {
name: "Accept All Cookies",
});
if (await acceptCookies.isVisible({ timeout: 5000 }).catch(() => false)) {
await acceptCookies.click();
await expect(acceptCookies).toBeHidden();
}
});

test("adminConsoleAddOrganizationsToCompany", async ({ page }) => {
// Select Admin Console and choose company
await page.getByTestId("dashboard-card-admin").click();
await page.getByRole("menuitem", { name: "sarahscompany Company" }).click();

// Select Add organization
await page.getByRole("button", { name: "Add organization" }).click();

// Choose organization to add from menu
await page.getByLabel("Open", { exact: true }).click();
await page.getByTestId("add-sarahdat-to-co-menu-item").click();

// Verify Submit button present
await expect(page.getByTestId("add-org-submit-button")).toBeVisible();
});

test.afterEach(async ({ page }) => {
await page.goto("https://app-stage.docker.com/");
await page.waitForLoadState("networkidle");
});
Loading
Loading