tiny-vue/examples/docs/resources/pc/demo/container/custom-with-height.spec.js

12 lines
767 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { test, expect } from '@playwright/test';
test('test', async ({ page }) => {
await page.goto('http://localhost:7130/pc/container/legend');
await page.locator('.f12 > div:nth-child(6)').click();
await page.getByText('header-height80').click();
await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[1]')).toHaveAttribute('style', 'height: 80px;');
await page.getByText('aside-width200').click();
await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[2]')).toHaveAttribute('style', 'width: 200px; top: 80px;');
await page.getByText('footer-height80').click();
await expect(page.locator('//*[@id="preview"]/div[2]/div[2]/div/div[4]')).toHaveAttribute('style', 'height: 80px; left: 200px;');
});