Skip to content

Commit

Permalink
Fix: Re-order tests (#2354)
Browse files Browse the repository at this point in the history
  • Loading branch information
Onokaev authored Jan 30, 2023
1 parent cd28b4a commit b999bfc
Show file tree
Hide file tree
Showing 49 changed files with 7 additions and 26 deletions.
8 changes: 4 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ jobs:
npx playwright install
displayName: "Install playwright"
- script: |
npm run test-playwright-accessibility
displayName: "Run accessibility tests"
- script: |
set CI=true
npm run test-playwright
Expand All @@ -140,10 +144,6 @@ jobs:
PLAYWRIGHT_TESTS_PASSWORD: $(PLAYWRIGHT_TESTS_PASSWORD)
displayName: "Run playwright tests"
- script: |
npm run test-playwright-accessibility
displayName: "Run accessibility tests"
- publish: $(System.DefaultWorkingDirectory)/playwright-report
artifact: playwright-report
condition: always()
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const config: PlaywrightTestConfig = {
expect: {
toMatchSnapshot: {
threshold: 0.3,
maxDiffPixelRatio: 0.01
maxDiffPixelRatio: 0.02
}
},
use: {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/tests/ui/anonymous-experiences/request.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ test.describe('Permissions', () => {
await page.locator('[aria-label="Modify permissions"]').click();
await page.evaluate(() => document.fonts.ready);
await page.waitForTimeout(500);
await page.evaluate(() => document.fonts.ready);
const permissionsText = page.locator('text=One of the following permissions is required to run the query. Sign in with an a');
expect(permissionsText).toBeDefined();
expect(await page.screenshot({ clip: { x: 0, y: 0, width: 1920, height: 400 } })).toMatchSnapshot();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 0 additions & 14 deletions src/tests/ui/anonymous-experiences/response.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,14 @@ test.describe('Response section', () => {
await queryInput.click();
queryInput.fill('https://graph.microsoft.com/v1.0/me/messages');
await queryInput.press('Tab');
await page.evaluate(() => document.fonts.ready);
expect(await page.screenshot({ clip: { x: 300, y: -200, width: 1920, height: 1080 } })).toMatchSnapshot();
const snippetTab = page.locator('[aria-label="Code snippets"]');
await snippetTab.click();
await page.waitForTimeout(200);
await page.evaluate(() => document.fonts.ready);
expect(await page.screenshot({ clip: { x: 300, y: -200, width: 1920, height: 1080 } })).toMatchSnapshot();
const cSharpTab = page.locator('button[role="tab"]:has-text("CSharp")');
await cSharpTab.click();
await page.waitForTimeout(200);
await page.evaluate(() => document.fonts.ready);
expect(await page.screenshot({ clip: { x: 300, y: -200, width: 1920, height: 1080 } })).toMatchSnapshot();
await page.locator('button[role="tab"]:has-text("JavaScript")').click();
await page.locator('button[name="Java"]').click();
await page.waitForTimeout(200);
await page.evaluate(() => document.fonts.ready);
expect(await page.screenshot({ clip: { x: 300, y: -200, width: 1920, height: 1080 } })).toMatchSnapshot();
await page.locator('button[role="tab"]:has-text("Go")').click();
await page.locator('button[role="tab"]:has-text("PowerShell")').click();
await page.waitForTimeout(200);
await page.evaluate(() => document.fonts.ready);
expect(await page.screenshot({ clip: { x: 300, y: -200, width: 1920, height: 1080 } })).toMatchSnapshot();
});

test('should show toolkit component for a valid url', async () => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/tests/ui/anonymous-experiences/sidebar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ test.describe.serial('Sample Query tab', () => {
await page.locator('[placeholder="Search sample queries"]').fill('drive');
await page.evaluate(() => document.fonts.ready);
expect(await page.screenshot()).toMatchSnapshot();
await page.locator('[aria-label="all the items in my drive"]').click();
await page.locator('[aria-label="list items in my drive"]').click();
await page.evaluate(() => document.fonts.ready);
await page.waitForTimeout(200);
expect(await page.screenshot()).toMatchSnapshot();
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ test.describe('Request', () => {
test('Access token is available and is decodeable', async () => {
await authenticatedPage.locator('[aria-label="Access token"]').click();
await authenticatedPage.locator('[aria-label="Copy"]').click();
await authenticatedPage.waitForTimeout(100);
await authenticatedPage.evaluate(() => document.fonts.ready);
expect(await authenticatedPage.screenshot({ clip: { x: 300, y: 0, width: 1920, height: 200 } })).toMatchSnapshot();
const [page5] = await Promise.all([
authenticatedPage.waitForEvent('popup'),
authenticatedPage.locator('[aria-label="Get token details \\(Powered by jwt\\.ms\\)"]').click()
Expand All @@ -43,9 +40,6 @@ test.describe('Request', () => {
test.describe.serial('Profile', () => {
test('should show profile', async () => {
await authenticatedPage.locator('[aria-label="profile"]').click();
await authenticatedPage.waitForTimeout(100);
await authenticatedPage.evaluate(() => document.fonts.ready);
expect(await authenticatedPage.screenshot()).toMatchSnapshot();
await expect(authenticatedPage.locator('button:has-text("Consent to permissions")')).toBeVisible();
});

Expand Down
Diff not rendered.

0 comments on commit b999bfc

Please sign in to comment.