// Path: rss-2-kindle-web-test/src/main/java/org/roag/pages/modules/NavigationItem.java
// public enum NavigationItem {
//     SIGN_IN,
//     SIGN_UP,
//     HOWTO,
//     ABOUT,
//     CONTACT,
//     PROFILE,
//     SUBSCRIBERS,
//     SERVICES,
//     LOGOUT
// }
// 
// Path: rss-2-kindle-web-test/src/main/java/org/roag/pages/PageUtils.java
// public static <T extends Page> T at(Class<T> pageClazz) {
//     return verifyAtPage(extractPageName(pageClazz), pageClazz);
// }
// 
// Path: rss-2-kindle-web-test/src/main/java/org/roag/pages/PageUtils.java
// public static <T extends Page> T to(Class<T> pageClazz) {
//     String pageName = extractPageName(pageClazz);
// 
//     if (pageClazz == LoginPage.class) {
//         return navigateToPage(pageName, pageClazz);
//     } else {
//         // navigate to requested page
//         navigateToPage(pageName, pageClazz);
// 
//         // then make sure we actually arrived by checking with 'at'
//         return at(pageClazz);
//     }
// }


import com.github.javafaker.Faker;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.roag.pages.*;
import org.roag.pages.modules.NavigationItem;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
import static org.junit.jupiter.params.provider.Arguments.arguments;
import static org.roag.pages.PageUtils.at;
import static org.roag.pages.PageUtils.to;
package org.roag.web;




@DisplayName("Performance tests")
@Tag("PERFORMANCE")
public class PerformanceTest {

    private Faker faker = new Faker();

    @DisplayName("create a user and poll subscriptions for it")
    @ParameterizedTest(name = "{index} ==> username={0}, password={1}, email={2}")
    @MethodSource("userProvider")
    void createUserAndPoll(String user, String password, String email) {
        to(SignUpPage.class)
                .signUpWith(user, password, email);
// Path: rss-2-kindle-web-test/src/main/java/org/roag/pages/modules/NavigationItem.java
// public enum NavigationItem {
//     SIGN_IN,
//     SIGN_UP,
//     HOWTO,
//     ABOUT,
//     CONTACT,
//     PROFILE,
//     SUBSCRIBERS,
//     SERVICES,
//     LOGOUT
// }
// 
// Path: rss-2-kindle-web-test/src/main/java/org/roag/pages/PageUtils.java
// public static <T extends Page> T at(Class<T> pageClazz) {
//     return verifyAtPage(extractPageName(pageClazz), pageClazz);
// }
// 
// Path: rss-2-kindle-web-test/src/main/java/org/roag/pages/PageUtils.java
// public static <T extends Page> T to(Class<T> pageClazz) {
//     String pageName = extractPageName(pageClazz);
// 
//     if (pageClazz == LoginPage.class) {
//         return navigateToPage(pageName, pageClazz);
//     } else {
//         // navigate to requested page
//         navigateToPage(pageName, pageClazz);
// 
//         // then make sure we actually arrived by checking with 'at'
//         return at(pageClazz);
//     }
// }


// Path: rss-2-kindle-web-test/src/test/java/org/roag/web/PerformanceTest.java
import com.github.javafaker.Faker;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.roag.pages.*;
import org.roag.pages.modules.NavigationItem;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
import static org.junit.jupiter.params.provider.Arguments.arguments;
import static org.roag.pages.PageUtils.at;
import static org.roag.pages.PageUtils.to;

package org.roag.web;




@DisplayName("Performance tests")
@Tag("PERFORMANCE")
public class PerformanceTest {

    private Faker faker = new Faker();

    @DisplayName("create a user and poll subscriptions for it")
    @ParameterizedTest(name = "{index} ==> username={0}, password={1}, email={2}")
    @MethodSource("userProvider")
    void createUserAndPoll(String user, String password, String email) {
        to(SignUpPage.class)
                .signUpWith(user, password, email);
        to(LoginPage.class).loginWith(user, password);