Update RepositoryDetails test for LoadingSpan component

Replace .loading-message class selector with loadingspan-stub to match
the migrated component structure using LoadingSpan instead of a plain
div with class.
This commit is contained in:
Alireza Heidari
2026-02-06 09:58:10 +01:00
parent c9b95d6cdf
commit 44a9ebbad8
@@ -34,7 +34,7 @@ describe("RepositoryDetails", () => {
const localVue = getLocalVue();
const pinia = createPinia();
const wrapper = shallowMount(Index, {
const wrapper = shallowMount(Index as object, {
propsData: {
repo: {
id: "id",
@@ -47,7 +47,7 @@ describe("RepositoryDetails", () => {
localVue,
pinia,
});
expect(wrapper.find(".loading-message").text()).toBe("Loading repository details...");
expect(wrapper.find("loadingspan-stub").attributes("message")).toBe("Loading repository details");
await flushPromises();
expect(wrapper.findAll(".alert").length).toBe(0);
});