mirror of
				https://gitlab.nic.cz/turris/reforis/foris-js.git
				synced 2025-11-03 23:00:31 +01:00 
			
		
		
		
	Fix tests
This commit is contained in:
		@@ -43,14 +43,17 @@ describe("AlertContext", () => {
 | 
				
			|||||||
        expect(componentContainer).toMatchSnapshot();
 | 
					        expect(componentContainer).toMatchSnapshot();
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    it("should dismiss alert with alert button", () => {
 | 
					    it("should dismiss alert with alert button", async () => {
 | 
				
			||||||
        fireEvent.click(getByText(componentContainer, "Set alert"));
 | 
					        fireEvent.click(getByText(componentContainer, "Set alert"));
 | 
				
			||||||
        // Alert is present
 | 
					        // Alert is present
 | 
				
			||||||
        expect(getByText(componentContainer, "Alert content")).toBeDefined();
 | 
					        expect(getByText(componentContainer, "Alert content")).toBeDefined();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        fireEvent.click(componentContainer.querySelector(".btn-close"));
 | 
					        fireEvent.click(componentContainer.querySelector(".btn-close"));
 | 
				
			||||||
        // Alert is gone
 | 
					        // Alert is gone
 | 
				
			||||||
        expect(queryByText(componentContainer, "Alert content")).toBeNull();
 | 
					        await (() =>
 | 
				
			||||||
 | 
					            expect(
 | 
				
			||||||
 | 
					                queryByText(componentContainer, "Alert content")
 | 
				
			||||||
 | 
					            ).toBeNull());
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    it("should dismiss alert with external button", () => {
 | 
					    it("should dismiss alert with external button", () => {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user