{"size": 840, "ext": "js", "max_stars_repo_path": "AutomationProject/page_model/test/TestLogout.js", "max_stars_repo_name": "zerepyom/Automation_Assessment_S1_TestCafe", "max_stars_repo_stars_event_min_datetime": "2021-03-15T15:54:50.000Z", "max_stars_repo_stars_event_max_datetime": "2021-03-15T15:54:50.000Z", "max_issues_repo_path": "AutomationProject/page_model/test/TestLogout.js", "max_issues_repo_name": "zerepyom/Automation_Assessment_S1_TestCafe", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "AutomationProject/page_model/test/TestLogout.js", "max_forks_repo_name": "zerepyom/Automation_Assessment_S1_TestCafe", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 42.0, "max_line_length": 101, "alphanum_fraction": 0.7333333333}
import LoginPage from  '../pages/LoginPage'
import ProductsPage from '../pages/ProductsPage'
import { CREDENTIALS } from '../data/Constant'

fixture('Login feature testing: Test Scenario 3')
    .page `https://www.saucedemo.com/`;

/*  Test Scenario 3: Logout from product's page
    Using constants to provide invalid credentials  */
test ('Test Scenario 3: User logout from Products Page', async t => {
    await LoginPage.submitLoginform(CREDENTIALS.VALID_USER.USERNAME,CREDENTIALS.VALID_USER.PASSWORD)
    await t.expect(ProductsPage.pageContainer.exists).ok()
    await t.expect(ProductsPage.pageTitle.innerText).eql('Products')
    .click(ProductsPage.burgerButton)
    .click(ProductsPage.logoutButton)
    await t.expect(LoginPage.loginButton.exists).ok()
})

/* testcafe chrome page_model\test\TestLogout.js */ 
