appId: org.wikipedia
---
- tapOn: "Saved"
- tapOn: "Default list for your saved articles"
- assertVisible: "Sun"
- assertVisible: "Star in the Solar System"
- back
maestro test run-test.yml
Authentication
Signup
Navigates to signup
Generates credentials using javascript
Fills input fields with generated credentials
Login
Navigates to login
Fetches a test user from a test api using javascript
function username() {
const date = new Date().getTime().toString();
return `test_user_${date}`;
}
function email() {
const date = new Date().getTime().toString();
return `test-user-${date}@test.com`;
}
function password() {
const date = new Date().getTime().toString();
return `test-user-password-${date}`;
}
output.credentials = {
email: email(),
password: password(),
username: username(),
};
// Fetches test user from API
function getTestUserFromApi() {
const url = `https://jsonplaceholder.typicode.com/users/1`;
const response = http.get(url);
const data = json(response.body);
return {
username: data.username,
email: data.email,
};
}
output.test_user = getTestUserFromApi();