This question already has an answer here:
A common item would require a formula, 100 gp in components, and a minimum of a 3rd level spell caster with a similar spell to be made so it could be treated as a lvl 3 spell.
The dispel magic spell description states:
Choose one creature, object, or magical effect within range. Any spell of 3rd level or lower on the target ends. For each spell of 4th level or higher on the target, make an ability check using your spellcasting ability. The DC equals 10 + the spell's level. On a successful check, the spell ends.
So if somebody cast dispel magic on that Longsword +1 would its effects be negated, or would the caster lose a spell slot?