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

Merging latest changes develop #25

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6a5cc86
feat: [UIE-8194] - DBaaS major and minor upgrades - 4 (#11199)
corya-akamai Nov 6, 2024
eeae3a3
feat: [M3-8831] - New GPUv2 egress transfer display (#11209)
abailly-akamai Nov 6, 2024
e04981a
change: [M3-8806] - Disable unsupported images for distributed region…
hana-akamai Nov 6, 2024
bcdefc9
fix: [UIE-8246] - DBaaS provisioning 2 node clusters (#11218)
corya-akamai Nov 6, 2024
cee32ae
feat : [M3-8528] - Include Object Storage buckets in Support tickets'…
harsh-akamai Nov 7, 2024
661d3a3
Initial Changelog
jaalah Nov 7, 2024
0da3709
refactor: [M3-8646] – Migrate `Divider` to `ui` package (#11205)
harsh-akamai Nov 7, 2024
4d3157a
UIE-8247: Conditionally give the new docs as the link on database lan…
rodonnel-akamai Nov 7, 2024
129a9da
fix: [M3-8764] - Kubernetes UI issues (#11217)
bnussman-akamai Nov 7, 2024
ea8b449
upcoming: [DI-21811] - Post processing of missing timestamp data acro…
venkymano-akamai Nov 7, 2024
45e60bc
Update changelog
jaalah Nov 7, 2024
d4e59f1
refactor: [M3-8650] - Migrate Stack to `@linode/ui` package (#11228)
coliu-akamai Nov 7, 2024
5b05b76
refactor: [M3-8710] - Move `Notice` & `Tooltip` components to UI pack…
hkhalil-akamai Nov 7, 2024
0a2aa32
change: [M3-7337] - change Linode Details Summary VPC IPv4 Text to Co…
hasyed-akamai Nov 8, 2024
57eb19f
upcoming: [DI-21814] - ACLP UI - DBaaS instances order by label (#11226)
ankita-akamai Nov 8, 2024
e459252
UIE-8254: Add tooltip for ipv6 for new db clusters (#11231)
rodonnel-akamai Nov 8, 2024
9d9bc07
feat: [UIE-8193] - Usable Storage Tooltip for Create/Resize Database …
mpolotsk-akamai Nov 8, 2024
a95a557
Merge branch 'release-v1.132.0' of github.com:linode/manager into rel…
jaalah Nov 8, 2024
27a651c
feat: [UIE-8193] - Tooltip for Create/Resize Database table (#11223)
mpolotsk-akamai Nov 8, 2024
7b2b6af
DBaaS additions
jaalah Nov 8, 2024
49e8802
GPU egress transfer copy update (#11235)
abailly-akamai Nov 8, 2024
91b5c23
default behavior when creating new child clusters should match what e…
talmai Nov 8, 2024
f065afd
Update PULL_REQUEST_TEMPLATE.md (#11219)
jcallahan-akamai Nov 8, 2024
5fc6839
change: [M3-8860] - Update unit testing docs to prefer `userEvent` ov…
mjac0bs Nov 8, 2024
5847311
Update changelog
jaalah Nov 8, 2024
04e3620
Fix LKE create ACL tests (#11237)
jdamore-linode Nov 9, 2024
abbedaf
feat: [M3-8665] - add option to copy token in LKE details page. (#11179)
hasyed-akamai Nov 11, 2024
fe172fa
fix: sx styling for Textfield component (#11246)
coliu-akamai Nov 12, 2024
185ece4
fix: [M3-8894] - Linode Create crash when selected a Linode with a `t…
bnussman-akamai Nov 12, 2024
060af91
Merge pull request #11220 from linode/release-v1.132.0
hana-akamai Nov 12, 2024
6b4b139
Merge pull request #11249 from linode/staging
hana-akamai Nov 12, 2024
dd212ec
Merge branch 'master' into develop
hana-akamai Nov 12, 2024
3450d7c
change: [M3-8857] - Update PULL_REQUEST_TEMPLATE (Part 2) (#11236)
mjac0bs Nov 12, 2024
292ae6c
refactor: [M3-8900] - Move `RadioGroup` to `@linode/ui` package (#11254)
pmakode-akamai Nov 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
61 changes: 41 additions & 20 deletions docs/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
## Description πŸ“

Highlight the Pull Request's context and intentions.

## Changes πŸ”„
List any change relevant to the reviewer.

List any change(s) relevant to the reviewer.

- ...
- ...

## Target release date πŸ—“οΈ
Please specify a release date to guarantee timely review of this PR. If exact date is not known, please approximate and update it as needed.

Please specify a release date (and environment, if applicable) to guarantee timely review of this PR. If exact date is not known, please approximate and update it as needed.

## Preview πŸ“·

**Include a screenshot or screen recording of the change.**

:lock: Use the [Mask Sensitive Data](https://cloud.linode.com/profile/settings) setting for security.
Expand All @@ -23,38 +28,53 @@ Please specify a release date to guarantee timely review of this PR. If exact da
## How to test πŸ§ͺ

### Prerequisites

(How to setup test environment)

- ...
- ...

### Reproduction steps

(How to reproduce the issue, if applicable)
- ...
- ...

- [ ] ...
- [ ] ...

### Verification steps

(How to verify changes)
- ...
- ...

## As an Author I have considered πŸ€”
- [ ] ...
- [ ] ...

## As an Author, I have considered πŸ€”

*Check all that apply*
- πŸ‘€ Doing a self review
- ❔ Our [contribution guidelines](https://github.com/linode/manager/blob/develop/docs/CONTRIBUTING.md)
- 🀏 Splitting feature into small PRs
- βž• Adding a [changeset](https://github.com/linode/manager/blob/develop/docs/CONTRIBUTING.md#writing-a-changeset)
- πŸ§ͺ Providing/improving test coverage
- πŸ” Removing all sensitive information from the code and PR description
- 🚩 Using a feature flag to protect the release
- πŸ‘£ Providing comprehensive reproduction steps
- πŸ“‘ Providing or updating our documentation
- πŸ•› Scheduling a pair reviewing session
- πŸ“± Providing mobile support
- β™Ώ Providing accessibility support

- [ ] πŸ‘€ Doing a self review
- [ ] ❔ Our [contribution guidelines](https://github.com/linode/manager/blob/develop/docs/CONTRIBUTING.md)
- [ ] 🀏 Splitting feature into small PRs
- [ ] βž• Adding a [changeset](https://github.com/linode/manager/blob/develop/docs/CONTRIBUTING.md#writing-a-changeset)
- [ ] πŸ§ͺ Providing/Improving test coverage
- [ ] πŸ” Removing all sensitive information from the code and PR description
- [ ] 🚩 Using a feature flag to protect the release
- [ ] πŸ‘£ Providing comprehensive reproduction steps
- [ ] πŸ“‘ Providing or updating our documentation
- [ ] πŸ•› Scheduling a pair reviewing session
- [ ] πŸ“± Providing mobile support
- [ ] β™Ώ Providing accessibility support
<br/>

- [ ] I have read and considered all applicable items listed above.

## As an Author, before moving this PR from Draft to Open, I confirmed βœ…

- [ ] All unit tests are passing
- [ ] TypeScript compilation succeeded without errors
- [ ] Code passes all linting rules

---

## Commit message and pull request title format standards

> **Note**: Remove this section before opening the pull request
Expand All @@ -63,6 +83,7 @@ Please specify a release date to guarantee timely review of this PR. If exact da
`<commit type>: [JIRA-ticket-number] - <description>`

**Commit Types:**

- `feat`: New feature for the user (not a part of the code, or ci, ...).
- `fix`: Bugfix for the user (not a fix to build something, ...).
- `change`: Modifying an existing visual UI instance. Such as a component or a feature.
Expand Down
45 changes: 26 additions & 19 deletions docs/development-guide/08-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@ The unit tests for Cloud Manager are written in Typescript using the [Vitest](ht

To run tests, first build the **api-v4** package:

```
```shell
yarn install:all && yarn workspace @linode/api-v4 build
```

Then you can start the tests:

```
```shell
yarn test
```

Or you can run the tests in watch mode with:

```
```shell
yarn test:watch
```

To run a specific file or files in a directory:

```
```shell
yarn test myFile.test.tsx
yarn test src/some-folder
```

Vitest has built-in pattern matching, so you can also do things like run all tests whose filename contains "Linode" with:

```
```shell
yarn test linode
```

To run a test in debug mode, add a `debugger` breakpoint inside one of the test cases, then run:

```
```shell
yarn workspace linode-manager run test:debug
```

Expand All @@ -64,31 +64,25 @@ describe("My component", () => {
Handling events such as clicks is a little more involved:

```js
import { fireEvent } from "@testing-library/react";
import { userEvent } from '@testing-library/user-event';
import { renderWithTheme } from "src/utilities/testHelpers";
import Component from "./wherever";

const props = { onClick: vi.fn() };

describe("My component", () => {
it("should have some text", () => {
it("should have some text", async () => {
const { getByText } = renderWithTheme(<Component {...props} />);
const button = getByText("Submit");
fireEvent.click(button);
await userEvent.click(button);
expect(props.onClick).toHaveBeenCalled();
});
});
```

If, while using the Testing Library, your tests trigger a warning in the console from React ("Warning: An update to Component inside a test was not wrapped in act(...)"), first check out the library author's [blog post](https://kentcdodds.com/blog/fix-the-not-wrapped-in-act-warning) about this. Depending on your situation, you probably will have to `wait` for something in your test:

```js
import { fireEvent, wait } from '@testing-library/react';
We recommend using `userEvent` rather than `fireEvent` where possible. This is a [React Testing Library best practice](https://testing-library.com/docs/user-event/intro#differences-from-fireevent), because `userEvent` more accurately simulates user interactions in a browser and makes the test more reliable in catching unintended event handler behavior.

...
await wait(() => fireEvent.click(getByText('Delete')));
...
```
If, while using the Testing Library, your tests trigger a warning in the console from React ("Warning: An update to Component inside a test was not wrapped in act(...)"), first check out the library author's [blog post](https://kentcdodds.com/blog/fix-the-not-wrapped-in-act-warning) about this. Depending on your situation, you probably will have to use [`findBy`](https://testing-library.com/docs/dom-testing-library/api-async/#findby-queries) or [`waitFor`](https://testing-library.com/docs/dom-testing-library/api-async/) for something in your test to ensure asynchronous side-effects have completed.

### Mocking

Expand All @@ -108,7 +102,9 @@ vi.mock('@linode/api-v4/lib/kubernetes', async () => {

Some components, such as our ActionMenu, don't lend themselves well to unit testing (they often have complex DOM structures from MUI and it's hard to target). We have mocks for most of these components in a `__mocks__` directory adjacent to their respective components. To make use of these, just tell Vitest to use the mock:

```js
vi.mock('src/components/ActionMenu/ActionMenu');
```

Any `<ActionMenu>`s rendered by the test will be simplified versions that are easier to work with.

Expand Down Expand Up @@ -157,6 +153,7 @@ We use [Cypress](https://cypress.io) for end-to-end testing. Test files are foun
* Select a reasonable expiry time (avoid "Never") and make sure that every permission is set to "Read/Write".
3. Set the `MANAGER_OAUTH` environment variable in your `.env` file using your new personal access token.
* Example of `.env` addition:

```shell
# Manager OAuth token for Cypress tests:
# (The real token will be a 64-digit string of hexadecimals).
Expand All @@ -174,16 +171,19 @@ We use [Cypress](https://cypress.io) for end-to-end testing. Test files are foun
Cloud Manager UI tests can be configured using environment variables, which can be defined in `packages/manager/.env` or specified when running Cypress.

##### Cypress Environment Variables

These environment variables are used by Cypress out-of-the-box to override the default configuration. Cypress exposes many other options that can be configured with environment variables, but the items listed below are particularly relevant for Cloud Manager testing. More information can be found at [docs.cypress.io](https://docs.cypress.io/guides/guides/environment-variables).

| Environment Variable | Description | Example | Default |
|----------------------|--------------------------------------------|----------------------------|-------------------------|
| `CYPRESS_BASE_URL` | URL to Cloud Manager environment for tests | `https://cloud.linode.com` | `http://localhost:3000` |

##### Cloud Manager-specific Environment Variables

These environment variables are specific to Cloud Manager UI tests. They can be distinguished from out-of-the-box Cypress environment variables by their `CY_TEST_` prefix.

###### General

Environment variables related to the general operation of the Cloud Manager Cypress tests.

| Environment Variable | Description | Example | Default |
Expand All @@ -192,6 +192,7 @@ Environment variables related to the general operation of the Cloud Manager Cypr
| `CY_TEST_TAGS` | Query identifying tests that should run by specifying allowed and disallowed tags. | `method:e2e` | Unset; all tests run by default |

###### Overriding Behavior

These environment variables can be used to override some behaviors of Cloud Manager's UI tests. This can be useful when testing Cloud Manager for nonstandard or work-in-progress functionality.

| Environment Variable | Description | Example | Default |
Expand All @@ -200,6 +201,7 @@ These environment variables can be used to override some behaviors of Cloud Mana
| `CY_TEST_FEATURE_FLAGS` | JSON string containing feature flag data | `{}` | Unset; feature flag data is not overridden |

###### Run Splitting

These environment variables facilitate splitting the Cypress run between multiple runners without the use of any third party services. This can be useful for improving Cypress test performance in some circumstances. For additional performance gains, an optional test weights file can be specified using `CY_TEST_SPLIT_RUN_WEIGHTS` (see `CY_TEST_GENWEIGHTS` to generate test weights).

| Environment Variable | Description | Example | Default |
Expand All @@ -210,6 +212,7 @@ These environment variables facilitate splitting the Cypress run between multipl
| `CY_TEST_SPLIT_RUN_WEIGHTS` | Path to test weights file | `./weights.json` | Unset; disabled by default |

###### Development, Logging, and Reporting

Environment variables related to Cypress logging and reporting, as well as report generation.

| Environment Variable | Description | Example | Default |
Expand All @@ -222,6 +225,7 @@ Environment variables related to Cypress logging and reporting, as well as repor
| `CY_TEST_GENWEIGHTS` | Generate and output test weights to the given path | `./weights.json` | Unset; disabled by default |

###### Performance

Environment variables that can be used to improve test performance in some scenarios.

| Environment Variable | Description | Example | Default |
Expand All @@ -233,6 +237,7 @@ Environment variables that can be used to improve test performance in some scena

1. Look here for [Cypress Best Practices](https://docs.cypress.io/guides/references/best-practices)
2. Test Example:

```tsx
/* this test will not pass on cloud manager.
it is only intended to show correct test structure, syntax,
Expand Down Expand Up @@ -293,13 +298,15 @@ Environment variables that can be used to improve test performance in some scena
});
});
```

3. How to use intercepts:

```tsx
// stub response syntax:
cy.intercept('POST', β€˜/path’, {response}) or cy.intercept(β€˜/path’, (req) => { req.reply({response})}).as('something');
// edit and end response syntax:
// edit and end response syntax:
cy.intercept('GET', β€˜/path’, (req) => { req.send({edit: something})}).as('something');
// edit request syntax:
// edit request syntax:
cy.intercept('POST', β€˜/path’, (req) => { req.body.storyName = 'some name'; req.continue().as('something');

// use alias syntax:
Expand Down
5 changes: 0 additions & 5 deletions packages/api-v4/.changeset/pr-11152-added-1729713487291.md

This file was deleted.

This file was deleted.

5 changes: 5 additions & 0 deletions packages/api-v4/.changeset/pr-11178-added-1730961405650.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@linode/api-v4": Added
---

Extend support for Object Storage in Support tickets ([#11178](https://github.com/linode/manager/pull/11178))

This file was deleted.

19 changes: 19 additions & 0 deletions packages/api-v4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## [2024-11-12] - v0.130.0


### Added:

- DBaaS: Suspend and Resume backend calls ([#11152](https://github.com/linode/manager/pull/11152))

### Removed:

- DBaaS: Deprecated types including MongoDB and Redis ([#11218](https://github.com/linode/manager/pull/11218))

### Tech Stories:

- Remove `@types/node` dependency ([#11157](https://github.com/linode/manager/pull/11157))

### Upcoming Features:

- DBaaS: Modify update payload to include version, add patch API ([#11196](https://github.com/linode/manager/pull/11196))


## [2024-10-28] - v0.129.0

Expand Down
2 changes: 1 addition & 1 deletion packages/api-v4/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@linode/api-v4",
"version": "0.129.0",
"version": "0.130.0",
"homepage": "https://github.com/linode/manager/tree/develop/packages/api-v4",
"bugs": {
"url": "https://github.com/linode/manager/issues"
Expand Down
Loading