qe-fe-automation
Version:
FE test automation framework using cypress
49 lines (44 loc) • 1.56 kB
text/typescript
import { LoginPage } from '@admin-lib/index';
import { Provider_Type, User_Type } from '@support-onboard/index';
import { Utility } from '@utility-lib/index';
import { TripsPage } from 'cypress/e2e/trips/lib';
import { HomePage } from '../lib/home-page';
import { NavigationMenu } from '../lib/navigation_bar';
describe('Trips: Tests for the navigation bar', () => {
beforeEach(() => {
LoginPage.createNewCompanyAndLoginWithUserByType({
providers: [Provider_Type.EXPEDIA_FLIGHT, Provider_Type.PRICELINE_FLIGHT],
users: [User_Type.ADMIN]
});
Utility.visitSearchPage();
});
it('C127208: Verify users can navigate to home screen', { tags: ['@tier2'] }, () => {
const selection = 'TRAVEL_BOOKINGS_BUSINESS';
TripsPage.visitPage();
NavigationMenu.openPlatformDropdown();
NavigationMenu.selectMeunButton(selection);
HomePage.verifyHomePage();
});
it(
'C127201: Verify admin users can navigate to admin dashboard',
{ tags: ['@tier2'] },
() => {
const selection = 'ADMIN';
HomePage.visitHomePage();
NavigationMenu.openPlatformDropdown();
NavigationMenu.selectMeunButton(selection);
NavigationMenu.verifyAdminDashboard();
}
);
it(
'C127205: Verify users can navigate to "invite guest" screen',
{ tags: ['@tier2'] },
() => {
const selection = 'TRAVEL_GUEST';
HomePage.visitHomePage();
NavigationMenu.openPlatformDropdown();
NavigationMenu.selectMeunButton(selection);
NavigationMenu.verifyGuestInvitesPage();
}
);
});