Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
updated snapshots
updated remote image use in sample markdowns to local base64 ones
  • Loading branch information
dogusata committed Nov 5, 2024
1 parent 94a95c5 commit 65942ae
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/src/samples/sample-all-in-one.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ___Bold and italic text___
<https://github.com/aws/mynah-ui>


![Alt text](https://placehold.co/600x400)
![Alt text](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iNDAwIiB2aWV3Qm94PSIwIDAgNjAwIDQwMCI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0iI0RERERERCIvPjxwYXRoIGZpbGw9IiM5OTk5OTkiIGQ9Im0xNTUuNTIgMTcxLjA4LTE3LjE2IDIxLTIgMi40OHExLjY4LS44NCAzLjYyLTEuMyAxLjk0LS40NiA0LjE4LS40NiAzLjI4IDAgNi4zOCAxLjA4dDUuNDYgMy4yNnEyLjM2IDIuMTggMy44IDUuNDIgMS40NCAzLjI0IDEuNDQgNy41NiAwIDQuMDQtMS40OCA3LjU4dC00LjE2IDYuMThxLTIuNjggMi42NC02LjQ2IDQuMTZ0LTguMzQgMS41MnEtNC42NCAwLTguMzItMS40OC0zLjY4LTEuNDgtNi4yOC00LjE0LTIuNi0yLjY2LTMuOTgtNi40dC0xLjM4LTguM3EwLTQuMDggMS42Ni04LjM4IDEuNjYtNC4zIDUuMTQtOC45NGwxMy44LTE4LjUycS43Mi0uOTYgMi4xLTEuNjQgMS4zOC0uNjggMy4xOC0uNjhoOC44Wm0tMTQuOTIgNTAuNHEyLjM2IDAgNC4zNC0uOHQzLjQtMi4yNHExLjQyLTEuNDQgMi4yMi0zLjM4LjgtMS45NC44LTQuMj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MiAxLjYyIDUuNTYgMS42MiAxMy4xNlptLTEwLjIgMHEwLTYuMjgtLjkyLTEwLjR0LTIuNDYtNi41NnEtMS41NC0yLjQ0LTMuNTQtMy40MnQtNC4xNi0uOThxLTIuMTIgMC00LjEuOTgtMS45OC45OC0zLjUgMy40MnQtMi40MiA2LjU2cS0uOSA0LjEyLS45IDEwLjR0LjkgMTAuNHEuOSA0LjEyIDIuNDIgNi41NiAxLjUyIDIuNDQgMy41IDMuNDJ0NC4xLjk4cTIuMTYgMCA0LjE2LS45OHQzLjU0LTMuNDJxMS41NC0yLjQ0IDIuNDYtNi41Ni45Mi00LjEyLjkyLTEwLjRaIi8+PC9zdmc+)


> This is a blockquote.
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.
3 changes: 2 additions & 1 deletion ui-tests/__test__/flows/markdown-parser/all-markdown-tags.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const img = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MDAiIGhlaWdodD0iNDAwIiB2aWV3Qm94PSIwIDAgNjAwIDQwMCI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0iI0RERERERCIvPjxwYXRoIGZpbGw9IiM5OTk5OTkiIGQ9Im0xNTUuNTIgMTcxLjA4LTE3LjE2IDIxLTIgMi40OHExLjY4LS44NCAzLjYyLTEuMyAxLjk0LS40NiA0LjE4LS40NiAzLjI4IDAgNi4zOCAxLjA4dDUuNDYgMy4yNnEyLjM2IDIuMTggMy44IDUuNDIgMS40NCAzLjI0IDEuNDQgNy41NiAwIDQuMDQtMS40OCA3LjU4dC00LjE2IDYuMThxLTIuNjggMi42NC02LjQ2IDQuMTZ0LTguMzQgMS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jQtNi43NiA1LjQyLTMuOSAxLjc4LTguNDIgMS43OHQtOC4zOC0xLjc4cS0zLjg2LTEuNzgtNi43LTUuNDItMi44NC0zLjY0LTQuNDQtOS4yMi0xLjYtNS41OC0xLjYtMTMuMTQgMC03LjYgMS42LTEzLjE2IDEuNi01LjU2IDQuNDQtOS4yIDIuODQtMy42NCA2LjctNS40MiAzLjg2LTEuNzggOC4zOC0xLjc4IDQuNTIgMCA4LjQyIDEuNzggMy45IDEuNzggNi43NiA1LjQyIDIuODYgMy42NCA0LjQ4IDkuMiAxLjYyIDUuNTYgMS42MiAxMy4xNlptLTEwLjIgMHEwLTYuMjgtLjkyLTEwLjR0LTIuNDYtNi41NnEtMS41NC0yLjQ0LTMuNTQtMy40MnQtNC4xNi0uOThxLTIuMTIgMC00LjEuOTgtMS45OC45OC0zLjUgMy40MnQtMi40MiA2LjU2cS0uOSA0LjEyLS45IDEwLjR0LjkgMTAuNHEuOSA0LjEyIDIuNDIgNi41NiAxLjUyIDIuNDQgMy41IDMuNDJ0NC4xLjk4cTIuMTYgMCA0LjE2LS45OHQzLjU0LTMuNDJxMS41NC0yLjQ0IDIuNDYtNi41Ni45Mi00LjEyLjkyLTEwLjRaIi8+PC9zdmc+';
export default `# Heading 1
## Heading 2
### Heading 3
Expand Down Expand Up @@ -32,7 +33,7 @@ ___Bold and italic text___
<https://github.com/aws/mynah-ui>
![Alt text](https://placehold.co/600x400)
![Alt text](${img})
> This is a blockquote.
Expand Down
4 changes: 2 additions & 2 deletions ui-tests/__test__/flows/markdown-parser/markdown-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export const parseMarkdown = async (page: Page, skipScreenshots?: boolean): Prom
codeReference: [ {
information: 'Hello Reference Tracker',
recommendationContentSpan: {
start: 466,
end: 475
start: 4828, // because of base64 image length calculation
end: 4837
}
} ],
body
Expand Down
1 change: 0 additions & 1 deletion ui-tests/__test__/flows/welcome-mode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export const welcomeMode = async (page: Page, skipScreenshots?: boolean): Promis
}, newTabId);
await waitForAnimationEnd(page);
const chatWrapperClasses = await (await page.waitForSelector(chatWrapperSelector)).evaluate(el => Array.from(el.classList));
console.log(chatWrapperClasses);
expect(chatWrapperClasses).toContain('with-background');

expect(await page.waitForSelector(getSelector(testIds.prompt.label))).toBeDefined();
Expand Down

0 comments on commit 65942ae

Please sign in to comment.