Skip to content

Commit

Permalink
Add tests for switching the different sdk types
Browse files Browse the repository at this point in the history
  • Loading branch information
MTRNord committed Apr 20, 2024
1 parent d24096c commit eca3b3f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/sdks.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { test, expect } from '@playwright/test';

test('can switch between the different SDK types', async ({ page }) => {
await page.goto('/ecosystem/sdks/');

// Client SDKs
await page.locator("#sdk-purpose-selector > label:nth-child(2)").click()
await expect(page.locator("#purpose-client-panel > p:nth-child(2)")).toHaveText("Client SDKs are used to develop clients humans will interact with. They handle\nall the Matrix heavy lifting and leave it up to the developer to implement a UI.")

// Bot SDKs
await page.locator("#sdk-purpose-selector > label:nth-child(4)").click()
await expect(page.locator("#purpose-bot-panel > p:nth-child(2)")).toHaveText("Bot SDKs are used to develop bots no humans will interact with. They handle all the Matrix heavy lifting so the developer can focus on what the bot is actually useful for.")

// Bridge SDKs
await page.locator("#sdk-purpose-selector > label:nth-child(6)").click()
await expect(page.locator("#purpose-bridge-panel > p:nth-child(2)")).toHaveText("Bridge SDKs are used to develop appservices meant to either connect a Matrix community to a third party chat platform, or to exchange data with another platform.")

});

0 comments on commit eca3b3f

Please sign in to comment.