window.spec.ts 882 B

123456789101112131415161718192021
  1. import { expect } from '@playwright/test'
  2. import { test } from './fixtures'
  3. import { IsMac } from './utils';
  4. if (!IsMac) {
  5. test('Window should not be maximized on first launch', async ({ page, app }) => {
  6. await expect(page.locator('.window-controls .maximize-toggle.maximize')).toHaveCount(1)
  7. })
  8. test('Window should be maximized and icon should change on maximize-toggle click', async ({ page }) => {
  9. await page.click('.window-controls .maximize-toggle.maximize')
  10. await expect(page.locator('.window-controls .maximize-toggle.restore')).toHaveCount(1)
  11. })
  12. test('Window should be restored and icon should change on maximize-toggle click', async ({ page }) => {
  13. await page.click('.window-controls .maximize-toggle.restore')
  14. await expect(page.locator('.window-controls .maximize-toggle.maximize')).toHaveCount(1)
  15. })
  16. }