feat : updae
This commit is contained in:
@@ -80,13 +80,13 @@ describe("image export controls", () => {
|
||||
|
||||
it("shows one export trigger and keeps settings in its dialog", () => {
|
||||
const html = renderToStaticMarkup(<GuideImageExport fileName="guide.png">No notes</GuideImageExport>);
|
||||
expect(html).toContain("ส่งออกภาพ");
|
||||
expect(html).toContain("บันทึกภาพ");
|
||||
expect(html.match(/<button\b/gu)).toHaveLength(1);
|
||||
});
|
||||
|
||||
it("shows only one export action when no-note export is disabled", () => {
|
||||
const html = renderToStaticMarkup(<GuideImageExport fileName="guide.png" allowWithoutNotes={false}>Content</GuideImageExport>);
|
||||
expect(html).toContain("ส่งออกภาพ");
|
||||
expect(html).toContain("บันทึกภาพ");
|
||||
expect(html.match(/<button\b/gu)).toHaveLength(1);
|
||||
});
|
||||
|
||||
@@ -96,8 +96,8 @@ describe("image export controls", () => {
|
||||
Poster
|
||||
</GuideImageExport>,
|
||||
);
|
||||
expect(html).toContain("ส่งออกภาพ");
|
||||
expect(html).not.toContain("ตั้งค่าการส่งออกภาพ");
|
||||
expect(html).toContain("บันทึกภาพ");
|
||||
expect(html).not.toContain("ตั้งค่าภาพที่จะบันทึก");
|
||||
expect(html.match(/<button\b/gu)).toHaveLength(1);
|
||||
});
|
||||
|
||||
@@ -115,7 +115,7 @@ describe("image export controls", () => {
|
||||
expect(html).toContain("h-[clamp(8rem,50svh,32rem)]");
|
||||
expect(html).toContain('data-slot="dialog-footer"');
|
||||
expect(html).toContain("sticky bottom-0");
|
||||
expect(html.match(/>ส่งออกภาพ<\/button>/gu)).toHaveLength(1);
|
||||
expect(html.match(/>บันทึกภาพ<\/button>/gu)).toHaveLength(1);
|
||||
});
|
||||
|
||||
it("hides the persistent language chooser when language is prompted on export", () => {
|
||||
|
||||
Reference in New Issue
Block a user