-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix * add e2e test (cherry picked from commit 3ef4f44) Co-authored-by: Lennart <[email protected]>
- Loading branch information
Showing
4 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
e2e-tests/development-runtime/cypress/integration/functionality/yaml.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
describe(`webpack-loader: yaml`, () => { | ||
beforeEach(() => { | ||
cy.visit(`/webpack-loader/yaml/`).waitForRouteChange() | ||
}) | ||
|
||
it(`outputs the YAML file as JSON`, () => { | ||
cy.getTestElement(`webpack-loader-yaml`) | ||
.invoke(`text`) | ||
.should(`eq`, `[{"name":"Paul"},{"name":"Leto II"},{"name":"Ghanima"},{"name":"Alia"}]`) | ||
}) | ||
}) |
16 changes: 16 additions & 0 deletions
16
e2e-tests/development-runtime/src/pages/webpack-loader/yaml.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import * as React from "react" | ||
import Layout from "../../components/layout" | ||
|
||
import inputYaml from "../../test-files/input.yaml" | ||
|
||
const YamlPage = () => ( | ||
<Layout> | ||
<pre> | ||
<code data-testid="webpack-loader-yaml"> | ||
{JSON.stringify(inputYaml, null, 0)} | ||
</code> | ||
</pre> | ||
</Layout> | ||
) | ||
|
||
export default YamlPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- name: Paul | ||
- name: Leto II | ||
- name: Ghanima | ||
- name: Alia |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters