Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix yarn issue #181

Open
wants to merge 12 commits into
base: QA-613-add-docusaurus-docs-project
Choose a base branch
from
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
27 changes: 27 additions & 0 deletions .github/workflows/docs-test-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Documentation build

on:
pull_request:

permissions:
contents: read

jobs:
build:
name: Build docusaurus docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- name: Install dependencies
working-directory: ./packages/testing-docs
run: yarn install --frozen-lockfile
- name: Build website
working-directory: ./packages/testing-docs
run: yarn build

39 changes: 39 additions & 0 deletions .github/workflows/docs-test-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
- '[0-9]+.*'

permissions:
contents: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: matter-labs/block-explorer
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.BE_TEST_DOCS_DEPLOY_KEY }}
- name: Deploy to GitHub Pages
working-directory: ./packages/testing-docs
env:
USE_SSH: true
run: |
git config --global user.email "[email protected]"
git config --global user.name "gh-actions"
yarn install --frozen-lockfile
yarn deploy
2 changes: 2 additions & 0 deletions .github/workflows/validate-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
- name: Install dependencies
run: |
npm ci
npm install -g yarn
cd ./packages/testing-docs && yarn

- name: Lint
run: |
Expand Down
40,529 changes: 25,471 additions & 15,058 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions packages/testing-docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
45 changes: 45 additions & 0 deletions packages/testing-docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

### Creating new test cases and expanding test documents

TO BE UPDATED
3 changes: 3 additions & 0 deletions packages/testing-docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
12 changes: 12 additions & 0 deletions packages/testing-docs/blog/2019-05-28-first-blog-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
slug: first-blog-post
title: First Blog Post
authors:
name: Gao Wei
title: Docusaurus Core Team
url: https://github.com/wgao19
image_url: https://github.com/wgao19.png
tags: [hola, docusaurus]
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
44 changes: 44 additions & 0 deletions packages/testing-docs/blog/2019-05-29-long-blog-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
slug: long-blog-post
title: Long Blog Post
authors: endi
tags: [hello, docusaurus]
---

This is the summary of a very long blog post,

Use a `<!--` `truncate` `-->` comment to limit blog post size in the list view.

<!--truncate-->

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
20 changes: 20 additions & 0 deletions packages/testing-docs/blog/2021-08-01-mdx-blog-post.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
slug: mdx-blog-post
title: MDX Blog Post
authors: [slorber]
tags: [docusaurus]
---

Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).

:::tip

Use the power of React to create interactive blog posts.

```js
<button onClick={() => alert('button clicked!')}>Click me!</button>
```

<button onClick={() => alert('button clicked!')}>Click me!</button>

:::
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions packages/testing-docs/blog/2021-08-26-welcome/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
slug: welcome
title: Welcome
authors: [slorber, yangshun]
tags: [facebook, hello, docusaurus]
---

[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).

Simply add Markdown files (or folders) to the `blog` directory.

Regular blog authors can be added to `authors.yml`.

The blog post date can be extracted from filenames, such as:

- `2019-05-30-welcome.md`
- `2019-05-30-welcome/index.md`

A blog post folder can be convenient to co-locate blog post images:

![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg)

The blog supports tags as well!

**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
16 changes: 16 additions & 0 deletions packages/testing-docs/blog/2024-01-11-greetings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
slug: updates
title: Updates 11/01
authors:
- name: Artem Melnytskyi
title: Senior QA Engineer
url: https://github.com/amelnytskyi
image_url: https://github.com/amelnytskyi.png
tags: [updates]
---

This is the place where you can find all the latest updates.

Feel free to play around and check our latest changes.

Updates 11/01 - POC created with an example of Block Explorer test cases migrated to **[Docusaurus open-source solution](https://docusaurus.new)**.
17 changes: 17 additions & 0 deletions packages/testing-docs/blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
endi:
name: Endilie Yacop Sucipto
title: Maintainer of Docusaurus
url: https://github.com/endiliey
image_url: https://github.com/endiliey.png

yangshun:
name: Yangshun Tay
title: Front End Engineer @ Facebook
url: https://github.com/yangshun
image_url: https://github.com/yangshun.png

slorber:
name: Sébastien Lorber
title: Docusaurus maintainer
url: https://sebastienlorber.com
image_url: https://github.com/slorber.png
29 changes: 29 additions & 0 deletions packages/testing-docs/docs/hello.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
sidebar_label: 'id807 Account page - Pages - Artifacts (Empty state)'
sidebar_position: 4
tags: [Artifacts, Account, Balances, Empty state, Manual, Regression]
---

# id807 Account page - Pages - Artifacts (Empty state)

## Preconditions
1. Open page of [empty account (Mainnet)](https://staging-scan-v2.zksync.dev/address/0xe9f4149276e8a4f8db89e0e3bb78fd853f01e87d)

## Scenario
1. Account info table
- Address
- Committed nonce - 0
- Verified nonce - 0
2. Balances table
- Title
- This account doesn’t have any balances
- Text
- We can’t find any balances related to this account.
3. Latest Transactions
- Title
- This account doesn’t have any transactions
- Text
- We can’t find any transaction related to this account. It’s your chance to be the first

![logo](/img/id807EmptyAccount.png)

22 changes: 22 additions & 0 deletions packages/testing-docs/docs/id259-Account-Pages-Navigation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
sidebar_label: 'id259 Account page - Pages - Navigation'
sidebar_position: 4
tags: [Navigation, Account, Full test]
---

# id259 Account page - Pages - Navigation

## Preconditions
1. Test solution address/parameter (open URL below for test):
- [Mainnet](https://goerli.explorer.zksync.io/address/0x851df0eDcc4109C7E620d0AAdFDB99348821EB79)

## Scenario
1. Links navigates user:
- [Tx Hash](https://goerli.explorer.zksync.io/tx/0x629465e041109e49f67835501371219c17a60f721c460eead0acbbc8c72509eb) → to Transaction
- [L2 From hash](https://goerli.etherscan.io/address/0x851df0eDcc4109C7E620d0AAdFDB99348821EB79) → to Account (internal link)
- [L2 To hash](https://goerli.etherscan.io/address/0x851df0eDcc4109C7E620d0AAdFDB99348821EB79) → to Account (internal link)
- [Fee](https://goerli.explorer.zksync.io/address/0x000000000000000000000000000000000000800A) → to Contract page
- [Value](https://goerli.explorer.zksync.io/address/0x000000000000000000000000000000000000800A) → Contract page

![logo](/img/id259AccountNavigation.png)

47 changes: 47 additions & 0 deletions packages/testing-docs/docs/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
sidebar_position: 1
---

# Tutorial Intro

Let's discover **Docusaurus in less than 5 minutes**.

## Getting Started

Get started by **creating a new site**.

Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.

### What you'll need

- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.

## Generate a new site

Generate a new Docusaurus site using the **classic template**.

The classic template will automatically be added to your project after you run the command:

```bash
npm init docusaurus@latest my-website classic
```

You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.

The command also installs all necessary dependencies you need to run Docusaurus.

## Start your site

Run the development server:

```bash
cd my-website
npm run start
```

The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.

The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.

Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
8 changes: 8 additions & 0 deletions packages/testing-docs/docs/tutorial-basics/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Tutorial - Basics",
"position": 2,
"link": {
"type": "generated-index",
"description": "5 minutes to learn the most important Docusaurus concepts."
}
}
Loading
Loading