1/* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16import {browser, by, element} from 'protractor'; 17import {E2eTestUtils} from './utils'; 18 19describe('Viewer Transitions', () => { 20 beforeAll(async () => { 21 browser.manage().timeouts().implicitlyWait(1000); 22 await E2eTestUtils.checkServerIsUp('Winscope', E2eTestUtils.WINSCOPE_URL); 23 await browser.get(E2eTestUtils.WINSCOPE_URL); 24 }); 25 it('processes trace and renders view', async () => { 26 await E2eTestUtils.uploadFixture( 27 'traces/elapsed_and_real_timestamp/wm_transition_trace.pb', 28 'traces/elapsed_and_real_timestamp/shell_transition_trace.pb', 29 ); 30 await E2eTestUtils.closeSnackBar(); 31 await E2eTestUtils.clickViewTracesButton(); 32 33 const isViewerRendered = await element( 34 by.css('viewer-transitions'), 35 ).isPresent(); 36 expect(isViewerRendered).toBeTruthy(); 37 38 const isFirstEntryRendered = await element( 39 by.css('viewer-transitions .scroll .entry'), 40 ).isPresent(); 41 expect(isFirstEntryRendered).toBeTruthy(); 42 }); 43}); 44