Skip to content
Open
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
53 changes: 53 additions & 0 deletions .github/workflows/lint-code-blocks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Lint code blocks

# Syntax-checks fenced code blocks in docs changed by this PR.
#
# Scoped to CHANGED FILES on purpose: the repo has pre-existing debt, and a
# repo-wide gate would block every PR on unrelated pages. This stops new
# breakage landing while the backlog is worked down. To sweep everything:
# node scripts/lint-code-blocks.js --all

on:
pull_request:
paths:
- 'docs/**/*.md'
- 'docs/**/*.mdx'
- 'scripts/lint-code-blocks.js'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: '20'

- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install PyYAML
run: pip install --quiet pyyaml

# ruby and bash are already present on ubuntu-latest

- name: Collect changed docs
id: changed
run: |
git diff --name-only --diff-filter=ACMR \
"origin/${{ github.base_ref }}" HEAD -- 'docs/**/*.md' 'docs/**/*.mdx' \
> changed.txt || true
echo "count=$(wc -l < changed.txt | tr -d ' ')" >> "$GITHUB_OUTPUT"
echo "Changed doc files:"; cat changed.txt

- name: Lint fenced code blocks
if: steps.changed.outputs.count != '0'
run: xargs -a changed.txt node scripts/lint-code-blocks.js

- name: Nothing to lint
if: steps.changed.outputs.count == '0'
run: echo "No documentation files changed."
4 changes: 2 additions & 2 deletions docs/smartui-appium-java-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,14 @@ export PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
<TabItem value='Windows' label='Windows - CMD'>

```bash
set PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
set PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
<TabItem value='PowerShell' label='PowerShell'>

```powershell
$env:PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
$env:PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
Expand Down
6 changes: 3 additions & 3 deletions docs/smartui-cypress-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ export PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
<TabItem value='Windows' label='Windows - CMD'>

```bash
set PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
set PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
<TabItem value='PowerShell' label='PowerShell'>

```powershell
$env:PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
$env:PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
Expand Down Expand Up @@ -586,7 +586,7 @@ cy.smartuiSnapshot('Page Loaded');
2. Check configuration file syntax
3. Try different port if default is in use:
```bash
npx smartui exec -P 5000 -- <command">
npx smartui exec -P 5000 -- <your-test-command>
```
4. Check file permissions for configuration and project files

Expand Down
4 changes: 2 additions & 2 deletions docs/smartui-k6-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ export LT_USERNAME="YOUR_USERNAME"
<TabItem value='Windows' label='Windows - CMD'>

```bash
set LT_USERNAME=YOUR_USERNAME"
set LT_USERNAME="YOUR_USERNAME"
```

</TabItem>
<TabItem value='PowerShell' label='PowerShell'>

```powershell
$env:LT_USERNAME=YOUR_USERNAME"
$env:LT_USERNAME="YOUR_USERNAME"
```

</TabItem>
Expand Down
2 changes: 1 addition & 1 deletion docs/smartui-playwright-java-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Page Loaded");
2. Check configuration file syntax
3. Try different port if default is in use:
```bash
npx smartui exec -P 5000 -- <command">
npx smartui exec -P 5000 -- <your-test-command>
```
4. Check file permissions for configuration and project files

Expand Down
8 changes: 4 additions & 4 deletions docs/smartui-playwright-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,21 @@ Setup your project token shown in the **SmartUI** app after creating your projec
<TabItem value='MacOS/Linux' label='MacOS/Linux' default>

```bash
export PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
export PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
<TabItem value='Windows' label='Windows - CMD'>

```bash
set PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
set PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
<TabItem value='PowerShell' label='PowerShell'>

```powershell
$env:PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
$env:PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
Expand Down Expand Up @@ -631,7 +631,7 @@ await smartuiSnapshot.smartuiSnapshot(page, Page Loaded");
2. Check configuration file syntax
3. Try different port if default is in use:
```bash
npx smartui exec -P 5000 -- <command">
npx smartui exec -P 5000 -- <your-test-command>
```
4. Check file permissions for configuration and project files

Expand Down
8 changes: 4 additions & 4 deletions docs/smartui-puppeteer-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,21 @@ Setup your project token shown in the **SmartUI** app after creating your projec
<TabItem value='MacOS/Linux' label='MacOS/Linux' default>

```bash
export PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
export PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
<TabItem value='Windows' label='Windows - CMD'>

```bash
set PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
set PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
<TabItem value='PowerShell' label='PowerShell'>

```powershell
$env:PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
$env:PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
Expand Down Expand Up @@ -636,7 +636,7 @@ await smartuiSnapshot(page, Page Loaded");
2. Check configuration file syntax
3. Try different port if default is in use:
```bash
npx smartui exec -P 5000 -- <command">
npx smartui exec -P 5000 -- <your-test-command>
```
4. Check file permissions for configuration and project files

Expand Down
4 changes: 2 additions & 2 deletions docs/smartui-selenium-java-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ set PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
<TabItem value='PowerShell' label='PowerShell'>

```powershell
$env:PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
$env:PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
Expand Down Expand Up @@ -658,7 +658,7 @@ SmartUISnapshot.smartuiSnapshot(driver, "Page Loaded");
2. Check configuration file syntax
3. Try different port if default is in use:
```bash
npx smartui exec -P 5000 -- <command">
npx smartui exec -P 5000 -- <your-test-command>
```
4. Check file permissions for configuration and project files

Expand Down
8 changes: 4 additions & 4 deletions docs/smartui-selenium-js-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,21 +107,21 @@ Setup your project token shown in the **SmartUI** app after creating your projec
<TabItem value='MacOS/Linux' label='MacOS/Linux' default>

```bash
export PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
export PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
<TabItem value='Windows' label='Windows - CMD'>

```bash
set PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
set PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
<TabItem value='PowerShell' label='PowerShell'>

```powershell
$env:PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
$env:PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
Expand Down Expand Up @@ -624,7 +624,7 @@ await smartuiSnapshot(driver, Page Loaded");
2. Check configuration file syntax
3. Try different port if default is in use:
```bash
npx smartui exec -P 5000 -- <command">
npx smartui exec -P 5000 -- <your-test-command>
```
4. Check file permissions for configuration and project files

Expand Down
8 changes: 4 additions & 4 deletions docs/smartui-selenium-ruby-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,21 +111,21 @@ Setup your project token shown in the **SmartUI** app after creating your projec
<TabItem value='MacOS/Linux' label='MacOS/Linux' default>

```bash
export PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
export PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
<TabItem value='Windows' label='Windows - CMD'>

```bash
set PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
set PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
<TabItem value='PowerShell' label='PowerShell'>

```powershell
$env:PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
$env:PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
Expand Down Expand Up @@ -613,7 +613,7 @@ LambdaTest::Selenium::Driver.smartui_snapshot(driver, Page Loaded")
2. Check configuration file syntax
3. Try different port if default is in use:
```bash
npx smartui exec -P 5000 -- <command">
npx smartui exec -P 5000 -- <your-test-command>
```
4. Check file permissions for configuration and project files

Expand Down
6 changes: 3 additions & 3 deletions docs/smartui-testcafe-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ export PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
<TabItem value='Windows' label='Windows - CMD'>

```bash
set PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
set PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
<TabItem value='PowerShell' label='PowerShell'>

```powershell
$env:PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
$env:PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
Expand Down Expand Up @@ -595,7 +595,7 @@ test('Take screenshot after page loads', async t ="> {
2. Check configuration file syntax
3. Try different port if default is in use:
```bash
npx smartui exec -P 5000 -- <command">
npx smartui exec -P 5000 -- <your-test-command>
```
4. Check file permissions for configuration and project files

Expand Down
6 changes: 3 additions & 3 deletions docs/smartui-wdio-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ export PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
<TabItem value='Windows' label='Windows - CMD'>

```bash
set PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
set PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
<TabItem value='PowerShell' label='PowerShell'>

```powershell
$env:PROJECT_TOKEN=123456#1234abcd-****-****-****-************"
$env:PROJECT_TOKEN="123456#1234abcd-****-****-****-************"
```

</TabItem>
Expand Down Expand Up @@ -568,7 +568,7 @@ await smartuiSnapshot(driver, 'Page Loaded');
2. Check configuration file syntax
3. Try different port if default is in use:
```bash
npx smartui exec -P 5000 -- <command">
npx smartui exec -P 5000 -- <your-test-command>
```
4. Check file permissions for configuration and project files

Expand Down
4 changes: 2 additions & 2 deletions docs/smartui-with-semaphore.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,13 @@ env_vars:
jobs:
- name: Run Tests
commands:
- npx smartui exec -- <command">
- npx smartui exec -- <your-test-command>
- name: Test Group 2
task:
jobs:
- name: Run Tests
commands:
- npx smartui exec -- <command">
- npx smartui exec -- <your-test-command>
```

3. Optimize test execution
Expand Down
Loading
Loading