Commit f6c2575e authored by Clément's avatar Clément

update: add simple e2e test example

parent a5873b98
Pipeline #6838 passed with stage
in 5 minutes and 12 seconds
{
"baseUrl": "http://0.0.0.0:3000"
}
\ No newline at end of file
"baseUrl": "http://0.0.0.0:3000",
"defaultCommandTimeout": 8000
}
describe('simple Startin’blox e2e test', function() {
this.beforeAll('visit', () => {
cy.visit('/examples/e2e/simple-startinblox-e2e-test.html')
})
it('check children count', () => {
cy.get('body > solid-display > div').children().should('have.length', 4)
})
it('check first children content', () => {
cy.get('body > solid-display > div > solid-display:first-child > div > solid-display-value:first-child')
.should('have.attr', 'name', 'firstName')
.should('have.text', 'Test')
})
})
......@@ -34,6 +34,11 @@ Run cypress test runner in interactive mode:
npm run cypress
```
To create test, first create html file in `examples/e2e` directory then create test file in `cypress/integration/e2e/`.
You may consider the files
[`cypress/integration/e2e/simple-startinblox-e2e-test.ts`](../cypress/integration/e2e/simple-startinblox-e2e-test.ts) and [`examples/e2e/simple-startinblox-e2e-test.html`](../examples/e2e/simple-startinblox-e2e-test.html) as example.
# Mixin API
## How it works
Here is a simplified schema of how the API works to create a component:
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Simple Startin’blox e2e test</title>
<script type="module" src="../../dist/index.js"></script>
</head>
<body>
<solid-display
data-src="../data/list/users.jsonld"
fields="firstName, lastName"
></solid-display>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment