Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {
- test,
- FormPage,
- loginFixtureUser,
- runTest,
- } from 'autotests-core';
- import {fields} from './3288-field-access-for-itsm-agent-assigned-user.fixtures.js';
- test.setTimeout(120000);
- runTest({
- testLink: 'https://testlink.simpleone.ru/linkto.php?tprojectPrefix=Simple&item=testcase&id=Simple-3288'
- }, async () => {
- test('Simple-3288', async ({I}) => {
- const formPage = new FormPage(I);
- await test.step('Precondition', async () => {
- await loginFixtureUser(I, 'employee.itsm_agent');
- });
- await test.step('Step-1: Доступность полей в статусе "In Progress"', async () => {
- await I.goto(`/record/itsm_request/${__fixtures['itsm_request.in_progress']['sys_id']}?form_view=view3288`);
- // Проверка всех полей выведенных на форме на ReadOnly
- await formPage.seeOnlyFields(fields.in_progress);
- });
- await test.step('Step-2: Доступность полей в статусе "Authorization"', async () => {
- await I.goto(`/record/itsm_request/${__fixtures['itsm_request.authorization']['sys_id']}?form_view=view3288`);
- // Проверка всех полей выведенных на форме на ReadOnly
- await formPage.seeOnlyFields(fields.authorization);
- });
- await test.step('Step-3: Доступность полей в статусе "Registered"', async () => {
- await I.goto(`/record/itsm_request/${__fixtures['itsm_request.registered']['sys_id']}?form_view=view3288`);
- // Проверка всех полей выведенных на форме на ReadOnly
- await formPage.seeOnlyFields(fields.registered);
- });
- await test.step('Step-4: Доступность полей в статусе "Assigned"', async () => {
- await I.goto(`/record/itsm_request/${__fixtures['itsm_request.assigned']['sys_id']}?form_view=view3288`);
- // Проверка всех полей выведенных на форме на ReadOnly
- await formPage.seeOnlyFields(fields.assigned);
- });
- await test.step('Step-5: Доступность полей в статусе "Information Needed"', async () => {
- await I.goto(`/record/itsm_request/${__fixtures['itsm_request.information_needed']['sys_id']}?form_view=view3288`);
- // Проверка всех полей выведенных на форме на ReadOnly
- await formPage.seeOnlyFields(fields.information_needed);
- });
- await test.step('Step-6: Доступность полей в статусе "Postponed"', async () => {
- await I.goto(`/record/itsm_request/${__fixtures['itsm_request.postponed']['sys_id']}?form_view=view3288`);
- // Проверка всех полей выведенных на форме на ReadOnly
- await formPage.seeOnlyFields(fields.postponed);
- });
- await test.step('Step-7: Доступность полей в статусе "External Processing"', async () => {
- await I.goto(`/record/itsm_request/${__fixtures['itsm_request.external_processing']['sys_id']}?form_view=view3288`);
- // Проверка всех полей выведенных на форме на ReadOnly
- await formPage.seeOnlyFields(fields.external_processing);
- });
- await test.step('Step-8: Доступность полей в статусе "Rejected by User"', async () => {
- await I.goto(`/record/itsm_request/${__fixtures['itsm_request.rejected_by_user']['sys_id']}?form_view=view3288`);
- // Проверка всех полей выведенных на форме на ReadOnly
- await formPage.seeOnlyFields(fields.rejected_by_user);
- });
- await test.step('Step-9: Доступность полей в статусе "Completed"', async () => {
- await I.goto(`/record/itsm_request/${__fixtures['itsm_request.completed']['sys_id']}?form_view=view3288`);
- // Проверка всех полей выведенных на форме на ReadOnly
- await formPage.seeOnlyFields(fields.completed);
- });
- await test.step('Step-10: Доступность полей в статусе "Closed"', async () => {
- await I.goto(`/record/itsm_request/${__fixtures['itsm_request.closed']['sys_id']}?form_view=view3288`);
- // Проверка всех полей выведенных на форме на ReadOnly
- await formPage.seeOnlyFields(fields.closed);
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement